thermald-2.4.7 build fail following upower update to 0.99.15

  • Done
  • quality assurance status badge
Details
4 participants
  • Ludovic Courtès
  • Nicolas Goaziou
  • Maxime Devos
  • Paul Jewell
Owner
unassigned
Submitted by
Paul Jewell
Severity
normal
P
P
Paul Jewell wrote on 18 Feb 2022 18:07
(address . bug-guix@gnu.org)
33f3190d-69aa-627b-0cea-454ea0677699@teulu.org
When building thermald-2.4.7, I am getting a build failure:

------------8<---------------------
src/thd_engine_adaptive.cpp: In member function ‘int
cthd_engine_adaptive::evaluate_lid_condition(condition)’:
src/thd_engine_adaptive.cpp:1002:61: error: ‘gboolean
up_client_get_lid_is_closed(UpClient*)’ is deprecated
[-Werror=deprecated-declarations
]

------------8<---------------------

According to jpoiret (via IRC), this is due to the upower update from
0.99.13 to 0.99.15, and the marking of the "up_client_get_lid_is_closed"
function as deprecated.

I am not sure where the compiler flag setting is made turning this
warning into an error. I have no configuration in my system config which
could be doing this (at least not explicitly).
M
M
Maxime Devos wrote on 19 Feb 2022 15:55
9922be8cfec9a0308994ace899a08e4f9d170525.camel@telenet.be
Paul Jewell schreef op vr 18-02-2022 om 17:07 [+0000]:
Toggle quote (5 lines)
> When building thermald-2.4.7, I am getting a build failure:
>
> [... deprecation error ...]


The attached two patches should fix this.

Greetings,
Maxime.
From eb49c118cb211528adc2bcbb0758d3848b2bcf6b Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Sat, 19 Feb 2022 14:46:33 +0000
Subject: [PATCH 1/2] gnu: thermald: Use G-expressions.

* gnu/packages/admin.scm
(thermald)[arguments]<#:configure-flags,#:make-flags,#:phases>: Convert to
G-exps.
---
gnu/packages/admin.scm | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)

Toggle diff (32 lines)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 17dc0f1315..0e9f0acb68 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -3879,17 +3879,16 @@ hard-coded.")
(build-system gnu-build-system)
(arguments
`(#:configure-flags
- (let ((out (assoc-ref %outputs "out")))
- (list (string-append "--with-dbus-sys-dir="
- out "/etc/dbus-1/system.d")
- "--localstatedir=/var"))
+ ,#~(list (string-append "--with-dbus-sys-dir="
+ #$output "/etc/dbus-1/system.d")
+ "--localstatedir=/var")
#:make-flags
- (list "V=1") ; log build commands
+ ,#~(list "V=1") ; log build commands
#:phases
- (modify-phases %standard-phases
- (add-before 'bootstrap 'no-early-./configure
- (lambda _
- (setenv "NO_CONFIGURE" "yet"))))))
+ ,#~(modify-phases %standard-phases
+ (add-before 'bootstrap 'no-early-./configure
+ (lambda _
+ (setenv "NO_CONFIGURE" "yet"))))))
(native-inputs
(list autoconf
autoconf-archive
--
2.30.2
From d066a7dcd11757fb19edc79028104f7dbcffeab1 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Sat, 19 Feb 2022 14:52:17 +0000
Subject: [PATCH 2/2] gnu: thermald: Fix build failure.

* gnu/packages/admin.scm (thermald)[arguments]<#:configure-flags>: Add
'--disable-werror'.

Reported-by: Paul Jewell <paul@teulu.org>
---
gnu/packages/admin.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 0e9f0acb68..5b2584cfba 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -3881,7 +3881,10 @@ hard-coded.")
`(#:configure-flags
,#~(list (string-append "--with-dbus-sys-dir="
#$output "/etc/dbus-1/system.d")
- "--localstatedir=/var")
+ "--localstatedir=/var"
+ ;; thermald uses deprecated APIs, see
+ ;; <https://github.com/intel/thermal_daemon/issues/340>.
+ "--disable-werror")
#:make-flags
,#~(list "V=1") ; log build commands
#:phases
--
2.30.2
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYhEE6xccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7tlNAQCgc/UKx8Ge7KfMuyJseiDsscyy
PUC8pfvUydmxtYvTxgEA+OvG/ncAGpxS65dxpiZFtBT8hPFd41iDEzQv3ChniAk=
=ovi7
-----END PGP SIGNATURE-----


P
P
Paul Jewell wrote on 19 Feb 2022 15:15
bug#54061: thermald-2.4.7 build fail following upower update to 0.99.15
(address . 54061@debbugs.gnu.org)
9734b3ba-f458-5b33-ae6c-6d7e95e139e0@teulu.org
I have reported this upstream:

It seems the problem was known (at least by the upower developers) for 9
months, but there was no comment on the thermald github issue list.
N
N
Nicolas Goaziou wrote on 19 Feb 2022 21:52
(name . Maxime Devos)(address . maximedevos@telenet.be)
87bkz24lzu.fsf@nicolasgoaziou.fr
Hello,

Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (9 lines)
> `(#:configure-flags
> - (let ((out (assoc-ref %outputs "out")))
> - (list (string-append "--with-dbus-sys-dir="
> - out "/etc/dbus-1/system.d")
> - "--localstatedir=/var"))
> + ,#~(list (string-append "--with-dbus-sys-dir="
> + #$output "/etc/dbus-1/system.d")
> + "--localstatedir=/var")

The patches look good, but I'm not sure it is a good idea to publicize
the unquote+ungexp, alias ",#~", style. IIUC, in
reasoning against the abuse of unquoting. This kind of defeat the
simplicity introduced with G-expressions. So, I would favor writing:

(list
#:configure-flags
#~(list ...))

WDYT?

Regards,
--
Nicolas Goaziou
P
P
Paul Jewell wrote on 19 Feb 2022 21:58
63c72f12-aa2b-3ca6-11c3-2962e716f0ce@teulu.org
On 19/02/2022 14:55, Maxime Devos wrote:
Toggle quote (11 lines)
> Paul Jewell schreef op vr 18-02-2022 om 17:07 [+0000]:
>> When building thermald-2.4.7, I am getting a build failure:
>>
>> [... deprecation error ...]
>
>
> The attached two patches should fix this.
>
> Greetings,
> Maxime.

Hi Maxime,
Many thanks for this - with the patches everything builds OK.

I also noted a pull request is outstanding for thermald which will
remove the need for the deprecated functions, so hopefully the changes
can be reversed with the next version of thermald.

When do you think these patches can be merged (notwithstanding the
comments from Nicolas of course)?

Best regards,
Paul
L
L
Ludovic Courtès wrote on 2 Mar 2022 18:03
(name . Maxime Devos)(address . maximedevos@telenet.be)
8735k01e3a.fsf@gnu.org
Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

Toggle quote (11 lines)
> From d066a7dcd11757fb19edc79028104f7dbcffeab1 Mon Sep 17 00:00:00 2001
> From: Maxime Devos <maximedevos@telenet.be>
> Date: Sat, 19 Feb 2022 14:52:17 +0000
> Subject: [PATCH 2/2] gnu: thermald: Fix build failure.
>
> * gnu/packages/admin.scm (thermald)[arguments]<#:configure-flags>: Add
> '--disable-werror'.
>
> Fixes: <https://issues.guix.gnu.org/54061>
> Reported-by: Paul Jewell <paul@teulu.org>

Guillaume fixed it independently in commit
73db69bea15e390a31289fdfadb1d5b9a7d13557.

Closing!

Ludo’.
Closed
P
P
Paul Jewell wrote on 3 Mar 2022 17:33
6e838035-e2ed-270e-4354-c389aa0b05bb@teulu.org
Good afternoon,

Thanks Ludo, and also Maxime and Guillaume.

Upstream have also merged a fix to the original problem, so I guess the
change made here can be removed again after the next release.

Best regards,
Paul

On 02/03/2022 17:03, Ludovic Courtès wrote:
Toggle quote (20 lines)
> Hi,
>
> Maxime Devos<maximedevos@telenet.be> skribis:
>
>> From d066a7dcd11757fb19edc79028104f7dbcffeab1 Mon Sep 17 00:00:00 2001
>> From: Maxime Devos<maximedevos@telenet.be>
>> Date: Sat, 19 Feb 2022 14:52:17 +0000
>> Subject: [PATCH 2/2] gnu: thermald: Fix build failure.
>>
>> * gnu/packages/admin.scm (thermald)[arguments]<#:configure-flags>: Add
>> '--disable-werror'.
>>
>> Fixes:<https://issues.guix.gnu.org/54061>
>> Reported-by: Paul Jewell<paul@teulu.org>
> Guillaume fixed it independently in commit
> 73db69bea15e390a31289fdfadb1d5b9a7d13557.
>
> Closing!
>
> Ludo’.
Attachment: file
Closed
?