[PATCH core-updates] build-system/qt: Fix build failures when

  • Done
  • quality assurance status badge
Details
3 participants
  • Maxim Cournoyer
  • Maxime Devos
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Maxime Devos
Severity
normal
M
M
Maxime Devos wrote on 6 Jul 2021 13:25
(address . guix-patches@gnu.org)
37bb64ffbb63ba40b6583d9dea983704c1658377.camel@telenet.be
Hi guix,

From the commit message:

‘One of the features of 'qt-build-system' is that it automatically
creates wrappers, but it needs 'bash' (or 'bash-minimal') to do
so. If "bin/bash" doesn't exist among the 'inputs', then
'search-input-file' (used by 'wrap-all-programs') will raise an
exception. Address this exception by adding "bash-minimal" to
'host-inputs' when cross-compiling.

This change does not impact native compilation; the derivations
for natively-compiled packages remain identical.’

I am unable to test this at the moment (too little substitutes
for core-updates, too little processing power locally ...), but
I intent to do so later.

Greetings,
Maxime/
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYOQ9vxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sO8AQDx1e32R2sLVr5GDkz3guC9kHbg
y/6GI4VGPvcYuwOtFwD+KnDoXJFIdlyXL6YMrLKYbDSausqwCm0NL8oB7xol6AE=
=m3Qi
-----END PGP SIGNATURE-----


M
M
Mathieu Othacehe wrote on 8 Jul 2021 16:45
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 49437@debbugs.gnu.org)
87pmvsvp7v.fsf@gnu.org
Hey Maxime,

Toggle quote (4 lines)
> I am unable to test this at the moment (too little substitutes
> for core-updates, too little processing power locally ...), but
> I intent to do so later.

I think you are missing the attached patch here.

Thanks,

Mathieu
M
M
Maxime Devos wrote on 8 Jul 2021 19:51
(name . Mathieu Othacehe)(address . othacehe@gnu.org)(address . 49437@debbugs.gnu.org)
52c57042714d524c092002e64dfd53e4ebde5b02.camel@telenet.be
Mathieu Othacehe schreef op do 08-07-2021 om 16:45 [+0200]:
Toggle quote (8 lines)
> Hey Maxime,
>
> > I am unable to test this at the moment (too little substitutes
> > for core-updates, too little processing power locally ...), but
> > I intent to do so later.
>
> I think you are missing the attached patch here.

Now attached!

Greetings,
Maxime.
From b9e46156e1f35303b56fbe2ed4694385b6104214 Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Tue, 6 Jul 2021 10:57:49 +0200
Subject: [PATCH core-updates] build-system/qt: Fix build failures when
cross-compiling.

One of the features of 'qt-build-system' is that it automatically
creates wrappers, but it needs 'bash' (or 'bash-minimal') to do
so. If "bin/bash" doesn't exist among the 'inputs', then
'search-input-file' (used by 'wrap-all-programs') will raise an
exception. Address this exception by adding "bash-minimal" to
'host-inputs' when cross-compiling.

This change does not impact native compilation; the derivations
for natively-compiled packages remain identical.

* guix/build-system/qt.scm
(bash-for-wrappers): New procedure.
(lower): Add 'bash-minimal' to 'host-inputs' when cross-compiling.
---
guix/build-system/qt.scm | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

Toggle diff (42 lines)
diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm
index ccee89d5ef..9fa90baeeb 100644
--- a/guix/build-system/qt.scm
+++ b/guix/build-system/qt.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -63,6 +64,13 @@
(let ((module (resolve-interface '(gnu packages cmake))))
(module-ref module 'cmake-minimal)))
+(define (bash-for-wrappers)
+ "Return the bash package to use for wrappers."
+
+ ;; Do not use `@' to avoid introducing circular dependencies.
+ (let ((module (resolve-interface '(gnu packages bash))))
+ (module-ref module 'bash-minimal)))
+
;; This barely is a copy from (guix build-system cmake), only adjusted to use
;; the variables defined here.
(define* (lower name
@@ -91,7 +99,12 @@
'())
;; Keep the standard inputs of 'gnu-build-system'.
,@(standard-packages)))
- (host-inputs inputs)
+ ;; Make sure the 'qt-wrap' phase has a cross-compiled bash
+ ;; for wrappers when cross-compiling.
+ (host-inputs `(,@(if target
+ `(("bash-minimal" ,(bash-for-wrappers)))
+ '())
+ ,@inputs))
;; The cross-libc is really a target package, but for bootstrapping
;; reasons, we can't put it in 'host-inputs'. Namely, 'cross-gcc' is a
--
2.32.0
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYOc7HRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ijNAP4p1g5Y2xDqzYMzlMhe6bYQMQkj
AdWJLI1PR1mohQc31wD+NGQ5WVtveXXQNrbHwRVrp2+t9AuqErg5V/lFRC4mdwo=
=R9/k
-----END PGP SIGNATURE-----


M
M
Mathieu Othacehe wrote on 8 Jul 2021 21:37
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 49437@debbugs.gnu.org)
87wnq0ppfz.fsf@gnu.org
Hey,

Toggle quote (7 lines)
> One of the features of 'qt-build-system' is that it automatically
> creates wrappers, but it needs 'bash' (or 'bash-minimal') to do
> so. If "bin/bash" doesn't exist among the 'inputs', then
> 'search-input-file' (used by 'wrap-all-programs') will raise an
> exception. Address this exception by adding "bash-minimal" to
> 'host-inputs' when cross-compiling.

I'd like to test it but it looks like qt-build-system drags glib which
uses the meson-build-system that doesn't support cross-compilation.

Did you test this patch, on top of your meson series?

Otherwise, it looks fine to me.

Thanks,

Mathieu
M
M
Maxime Devos wrote on 8 Jul 2021 22:59
(name . Mathieu Othacehe)(address . othacehe@gnu.org)(address . 49437@debbugs.gnu.org)
f6c38c054ffdec02b446f21eb8abe5d471a0910b.camel@telenet.be
Mathieu Othacehe schreef op do 08-07-2021 om 21:37 [+0200]:
Toggle quote (14 lines)
> Hey,
>
> > One of the features of 'qt-build-system' is that it automatically
> > creates wrappers, but it needs 'bash' (or 'bash-minimal') to do
> > so. If "bin/bash" doesn't exist among the 'inputs', then
> > 'search-input-file' (used by 'wrap-all-programs') will raise an
> > exception. Address this exception by adding "bash-minimal" to
> > 'host-inputs' when cross-compiling.
>
> I'd like to test it but it looks like qt-build-system drags glib which
> uses the meson-build-system that doesn't support cross-compilation.
>
> Did you test this patch, on top of your meson series?

I had started "./pre-inst-env guix build qtsvg" but that's no
cross-compilation. I'll rebase the meson series and test it!

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYOdnHBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7nE0APkBvOLw8I4B+sxDmb1uRE2c6ZYN
VyJURmtNmCdjoCJc/gD/Q/6vieM2qXLWRCfoAE9hCVZas8xHw6K719cbbIEcFQM=
=awoo
-----END PGP SIGNATURE-----


M
M
Maxim Cournoyer wrote on 23 Sep 2021 05:53
(name . Maxime Devos)(address . maximedevos@telenet.be)
87bl4kkkwf.fsf_-_@gmail.com
Hello,

Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (18 lines)
> Mathieu Othacehe schreef op do 08-07-2021 om 21:37 [+0200]:
>> Hey,
>>
>> > One of the features of 'qt-build-system' is that it automatically
>> > creates wrappers, but it needs 'bash' (or 'bash-minimal') to do
>> > so. If "bin/bash" doesn't exist among the 'inputs', then
>> > 'search-input-file' (used by 'wrap-all-programs') will raise an
>> > exception. Address this exception by adding "bash-minimal" to
>> > 'host-inputs' when cross-compiling.
>>
>> I'd like to test it but it looks like qt-build-system drags glib which
>> uses the meson-build-system that doesn't support cross-compilation.
>>
>> Did you test this patch, on top of your meson series?
>
> I had started "./pre-inst-env guix build qtsvg" but that's no
> cross-compilation. I'll rebase the meson series and test it!

Did it test fine?

Thanks,

Maxim
M
M
Maxime Devos wrote on 3 Oct 2021 10:56
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
c46b795b03ccf4eb42dbae7d4456e0b848306c19.camel@telenet.be
Maxim Cournoyer schreef op wo 22-09-2021 om 23:53 [-0400]:
Toggle quote (24 lines)
> Hello,
>
> Maxime Devos <maximedevos@telenet.be> writes:
>
> > Mathieu Othacehe schreef op do 08-07-2021 om 21:37 [+0200]:
> > > Hey,
> > >
> > > > One of the features of 'qt-build-system' is that it automatically
> > > > creates wrappers, but it needs 'bash' (or 'bash-minimal') to do
> > > > so. If "bin/bash" doesn't exist among the 'inputs', then
> > > > 'search-input-file' (used by 'wrap-all-programs') will raise an
> > > > exception. Address this exception by adding "bash-minimal" to
> > > > 'host-inputs' when cross-compiling.
> > >
> > > I'd like to test it but it looks like qt-build-system drags glib which
> > > uses the meson-build-system that doesn't support cross-compilation.
> > >
> > > Did you test this patch, on top of your meson series?
> >
> > I had started "./pre-inst-env guix build qtsvg" but that's no
> > cross-compilation. I'll rebase the meson series and test it!
>
> Did it test fine?

Didn't test it yet, because I first wanted the meson series merged.
Now the meson series and the gtk+ cross-compilation fixes are merged,
I'll take a look again.

Toggle quote (3 lines)
> Thanks,
>
> Maxim
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYVlwTRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7lB2AQD4zv0IhIe4cOoBO+din7CD63Wd
gLuxeWn/89TK1NEP8AEAtbfv7HLXwtwMRe6Dtl1vhi5EUHpXuI0MWipe1lmovQ0=
=7HNk
-----END PGP SIGNATURE-----


M
M
Maxim Cournoyer wrote on 29 Mar 2023 04:15
(name . Maxime Devos)(address . maximedevos@telenet.be)
87h6u4481q.fsf_-_@gmail.com
Hi Maxime,

I hope you are doing well.

Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (29 lines)
> Maxim Cournoyer schreef op wo 22-09-2021 om 23:53 [-0400]:
>> Hello,
>>
>> Maxime Devos <maximedevos@telenet.be> writes:
>>
>> > Mathieu Othacehe schreef op do 08-07-2021 om 21:37 [+0200]:
>> > > Hey,
>> > >
>> > > > One of the features of 'qt-build-system' is that it automatically
>> > > > creates wrappers, but it needs 'bash' (or 'bash-minimal') to do
>> > > > so. If "bin/bash" doesn't exist among the 'inputs', then
>> > > > 'search-input-file' (used by 'wrap-all-programs') will raise an
>> > > > exception. Address this exception by adding "bash-minimal" to
>> > > > 'host-inputs' when cross-compiling.
>> > >
>> > > I'd like to test it but it looks like qt-build-system drags glib which
>> > > uses the meson-build-system that doesn't support cross-compilation.
>> > >
>> > > Did you test this patch, on top of your meson series?
>> >
>> > I had started "./pre-inst-env guix build qtsvg" but that's no
>> > cross-compilation. I'll rebase the meson series and test it!
>>
>> Did it test fine?
>
> Didn't test it yet, because I first wanted the meson series merged.
> Now the meson series and the gtk+ cross-compilation fixes are merged,
> I'll take a look again.

core-updates is pretty "hot" at the moment, so it may be a good time to
test.

On the other hand, there aren't that many Qt packages, so it could also
go to staging IMO. And if it only touches cross-compilation drv,
perhaps it's good for master too?

It just needs testing.

--
Thanks,
Maxim
M
M
Maxime Devos wrote on 4 Apr 2023 20:59
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
92014e75-5007-bcdd-93e0-9565df2660a2@telenet.be
Op 29-03-2023 om 04:15 schreef Maxim Cournoyer:
Toggle quote (14 lines)
> Hi Maxime,
>
> I hope you are doing well.
>
> [...]
>
> core-updates is pretty "hot" at the moment, so it may be a good time to
> test.
>
> On the other hand, there aren't that many Qt packages, so it could also
> go to staging IMO. And if it only touches cross-compilation drv,
> perhaps it's good for master too?
>
> It just needs testing.
I am not participating in Guix development anymore, except perhaps for
bug reports and for when Guix intersects GNUnet, and currently it
appears a permanent decision.
Greetings,
Maxime.
Attachment: OpenPGP_signature
M
M
Maxim Cournoyer wrote on 7 Apr 2023 23:15
(name . Maxime Devos)(address . maximedevos@telenet.be)
878rf3tmwb.fsf@gmail.com
Hi,

Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (17 lines)
> Op 29-03-2023 om 04:15 schreef Maxim Cournoyer:
>> Hi Maxime,
>> I hope you are doing well.
>> [...]
>> core-updates is pretty "hot" at the moment, so it may be a good time
>> to
>> test.
>> On the other hand, there aren't that many Qt packages, so it could
>> also
>> go to staging IMO. And if it only touches cross-compilation drv,
>> perhaps it's good for master too?
>> It just needs testing.
>
> I am not participating in Guix development anymore, except perhaps for
> bug reports and for when Guix intersects GNUnet, and currently it
> appears a permanent decision.

OK. It's sad that it's come to this, but I respect your decision;
thanks for making it clear. Your thoughtful inputs and high-impact Guix
contributions will be missed!

--
Maxim
M
M
Maxim Cournoyer wrote on 20 Jan 22:11 +0100
(name . Maxime Devos)(address . maximedevos@telenet.be)
87le8jd81u.fsf_-_@gmail.com
Hi,

Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (34 lines)
> Mathieu Othacehe schreef op do 08-07-2021 om 16:45 [+0200]:
>> Hey Maxime,
>>
>> > I am unable to test this at the moment (too little substitutes
>> > for core-updates, too little processing power locally ...), but
>> > I intent to do so later.
>>
>> I think you are missing the attached patch here.
>
> Now attached!
>
> Greetings,
> Maxime.
>
> From b9e46156e1f35303b56fbe2ed4694385b6104214 Mon Sep 17 00:00:00 2001
> From: Maxime Devos <maximedevos@telenet.be>
> Date: Tue, 6 Jul 2021 10:57:49 +0200
> Subject: [PATCH core-updates] build-system/qt: Fix build failures when
> cross-compiling.
>
> One of the features of 'qt-build-system' is that it automatically
> creates wrappers, but it needs 'bash' (or 'bash-minimal') to do
> so. If "bin/bash" doesn't exist among the 'inputs', then
> 'search-input-file' (used by 'wrap-all-programs') will raise an
> exception. Address this exception by adding "bash-minimal" to
> 'host-inputs' when cross-compiling.
>
> This change does not impact native compilation; the derivations
> for natively-compiled packages remain identical.
>
> * guix/build-system/qt.scm
> (bash-for-wrappers): New procedure.
> (lower): Add 'bash-minimal' to 'host-inputs' when cross-compiling.

I don't think our Qt packages can be already cross-built; hence there's
no current value in adding this before addressing cross-compilation of
the qt-build-system in the first place.

Also, 'guix lint' would still complain, so for now I'm opting to close
this without applying it.

--
Thanks,
Maxim
Closed
?