[PATCH core-updates] gnu: libxkbcommon: Fix cross-compile.

  • Done
  • quality assurance status badge
Details
5 participants
  • Efraim Flashner
  • John Kehayias
  • Maxim Cournoyer
  • Bruno Victal
  • Zheng Junjie
Owner
unassigned
Submitted by
Zheng Junjie
Severity
normal
Z
Z
Zheng Junjie wrote on 9 Oct 2023 17:07
[PATCH] gnu: libxkbcommon: Fix cross-compile.
(address . guix-patches@gnu.org)
62c95fe412c55e9350adff139ff33cb6fe91db68.1696864062.git.zhengjunjie@iscas.ac.cn
* gnu/packages/xdisorg.scm (libxkbcommon): Fix cross-compile.
[native-inputs]: When cross-compile add PKG-CONFIG-FOR-BUILD.
---
gnu/packages/xdisorg.scm | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

Toggle diff (25 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index db948a9318..84bdcad031 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -527,9 +527,13 @@ (define-public libxkbcommon
wayland-protocols
xkeyboard-config))
(native-inputs
- (list bison doxygen pkg-config python
- ;; wayland-scanner is required at build time.
- wayland))
+ (append
+ (if (%current-target-system)
+ (list pkg-config-for-build)
+ '())
+ (list bison doxygen pkg-config python
+ ;; wayland-scanner is required at build time.
+ wayland)))
(arguments
(list #:configure-flags
#~(list (string-append "-Dxkb-config-root="

base-commit: 9b77bd0b9b4f3de69390da0ba7db5b9dbc01e554
--
2.41.0
B
B
Bruno Victal wrote on 10 Oct 2023 21:26
control-msg
(address . control@debbugs.gnu.org)
87bkd62s9o.fsf@makinata.eu
tags 64349 + patch moreinfo
retitle 64349 [PATCH] Persistent SSH forwarding service
retitle 66424 [PATCH core-updates] gnu: libxkbcommon: Fix cross-compile.
quit

--
Thanks,
Bruno.
J
J
John Kehayias wrote on 12 Oct 2023 20:07
Re: bug#66424: [PATCH core-updates] gnu: libxkbcommon: Fix cross-compile.
(name . Zheng Junjie)(address . zhengjunjie@iscas.ac.cn)
87r0lz7lzg.fsf@protonmail.com
Hello,

(CC'ing authors of two related commits too)

On Mon, Oct 09, 2023 at 11:07 PM, Zheng Junjie wrote:

Toggle quote (30 lines)
> * gnu/packages/xdisorg.scm (libxkbcommon): Fix cross-compile.
> [native-inputs]: When cross-compile add PKG-CONFIG-FOR-BUILD.
> ---
> gnu/packages/xdisorg.scm | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
> index db948a9318..84bdcad031 100644
> --- a/gnu/packages/xdisorg.scm
> +++ b/gnu/packages/xdisorg.scm
> @@ -527,9 +527,13 @@ (define-public libxkbcommon
> wayland-protocols
> xkeyboard-config))
> (native-inputs
> - (list bison doxygen pkg-config python
> - ;; wayland-scanner is required at build time.
> - wayland))
> + (append
> + (if (%current-target-system)
> + (list pkg-config-for-build)
> + '())
> + (list bison doxygen pkg-config python
> + ;; wayland-scanner is required at build time.
> + wayland)))
> (arguments
> (list #:configure-flags
> #~(list (string-append "-Dxkb-config-root="
>
> base-commit: 9b77bd0b9b4f3de69390da0ba7db5b9dbc01e554

When searching the log it looked like this had already been done on
core-updates in 5841ac3981a3a08968704728cef14accd14e7a1c (Marius) but I
was confused when I didn't see it. Looks like the pkg-config-for-build
was dropped (accidentally?) in 5841ac3981a3a08968704728cef14accd14e7a1c
(Maxim)

Is this still needed?

And if so, I can do it on mesa-updates very soon, since libx11 and
libxpm will be ungrafted and related packages (like mesa) updated too.
Or we can leave it to core-updates if that makes more sense.

WDYT?

Thanks!
John
M
M
Maxim Cournoyer wrote on 13 Oct 2023 16:49
(name . John Kehayias)(address . john.kehayias@protonmail.com)
87jzrq60iq.fsf@gmail.com
Hi John,

John Kehayias <john.kehayias@protonmail.com> writes:

Toggle quote (44 lines)
> Hello,
>
> (CC'ing authors of two related commits too)
>
> On Mon, Oct 09, 2023 at 11:07 PM, Zheng Junjie wrote:
>
>> * gnu/packages/xdisorg.scm (libxkbcommon): Fix cross-compile.
>> [native-inputs]: When cross-compile add PKG-CONFIG-FOR-BUILD.
>> ---
>> gnu/packages/xdisorg.scm | 10 +++++++---
>> 1 file changed, 7 insertions(+), 3 deletions(-)
>>
>> diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
>> index db948a9318..84bdcad031 100644
>> --- a/gnu/packages/xdisorg.scm
>> +++ b/gnu/packages/xdisorg.scm
>> @@ -527,9 +527,13 @@ (define-public libxkbcommon
>> wayland-protocols
>> xkeyboard-config))
>> (native-inputs
>> - (list bison doxygen pkg-config python
>> - ;; wayland-scanner is required at build time.
>> - wayland))
>> + (append
>> + (if (%current-target-system)
>> + (list pkg-config-for-build)
>> + '())
>> + (list bison doxygen pkg-config python
>> + ;; wayland-scanner is required at build time.
>> + wayland)))
>> (arguments
>> (list #:configure-flags
>> #~(list (string-append "-Dxkb-config-root="
>>
>> base-commit: 9b77bd0b9b4f3de69390da0ba7db5b9dbc01e554
>
> When searching the log it looked like this had already been done on
> core-updates in 5841ac3981a3a08968704728cef14accd14e7a1c (Marius) but I
> was confused when I didn't see it. Looks like the pkg-config-for-build
> was dropped (accidentally?) in 5841ac3981a3a08968704728cef14accd14e7a1c
> (Maxim)
>
> Is this still needed?

On the top of my head, I thought pkg-config-for-build had been obsolete
by the pkg-config symbol being dynamically bound to something that makes
sense for the context it's used in, via some macro trickery. I may have
misunderstood things.

Toggle quote (4 lines)
> And if so, I can do it on mesa-updates very soon, since libx11 and
> libxpm will be ungrafted and related packages (like mesa) updated too.
> Or we can leave it to core-updates if that makes more sense.

I guess it depends which branch is expected to be the shortest lived
one; I'm giving about a month to let more time for core-updates to merge
interesting bits and build the branch and fix breakage. Take this with a
grain of salt; it's not fixed in stone.

Thanks,

Maxim
Z
Z
zhengjunjie wrote on 14 Oct 2023 19:30
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
EA947A5D-B228-4922-BA0B-44493A1F6F18@iscas.ac.cn
Toggle quote (8 lines)
> ? 2023?10?13??22:50?Maxim Cournoyer <maxim.cournoyer@gmail.com> ???
>
>
> On the top of my head, I thought pkg-config-for-build had been obsolete
> by the pkg-config symbol being dynamically bound to something that makes
> sense for the context it's used in, via some macro trickery. I may have
> misunderstood things

For cross build,

pkg-config -> xxxx-pkg-config
pkg-config-for-build -> pkg-config

libxkbcommon require wayland-scanner to generate c file, this is why need pkg-config-for-build, pkg-config is require by find library. Is different ,so libxkbcommon need both on cross build.
J
J
John Kehayias wrote on 14 Oct 2023 23:02
(address . zhengjunjie@iscas.ac.cn)
87fs2cc3yy.fsf@protonmail.com
Hi,

On Sun, Oct 15, 2023 at 01:30 AM, zhengjunjie@iscas.ac.cn wrote:

Toggle quote (17 lines)
>> ? 2023?10?13??22:50?Maxim Cournoyer <maxim.cournoyer@gmail.com> ???
>>
>>
>> On the top of my head, I thought pkg-config-for-build had been obsolete
>> by the pkg-config symbol being dynamically bound to something that makes
>> sense for the context it's used in, via some macro trickery. I may have
>> misunderstood things
>
> For cross build,
>
> pkg-config -> xxxx-pkg-config
> pkg-config-for-build -> pkg-config
>
> libxkbcommon require wayland-scanner to generate c file, this is why
> need pkg-config-for-build, pkg-config is require by find library. Is
> different ,so libxkbcommon need both on cross build.

I'm not a cross-builder so I'll rely on you all for this.

If this change depends on other things in core-updates I'll leave it,
or if cross-building has had changes on core-updates. If it is just
something that can be done based on current master, I can cherry pick
the change from core-updates and apply this patch on mesa-updates.

What will work for everyone here?

I think my timeline will be quicker but I don't think this is
critical? I was just starting to gather what to apply on the mesa
branch, just waiting for the next mesa release (normally very quick
but current series has been delayed).

Thanks!
John
J
J
John Kehayias wrote on 16 Oct 2023 04:28
(address . zhengjunjie@iscas.ac.cn)
874jirb8sv.fsf@protonmail.com
Hi all,

cc'ing Efraim too, since...

On Sun, Oct 15, 2023 at 01:30 AM, zhengjunjie@iscas.ac.cn wrote:

Toggle quote (17 lines)
>> ? 2023?10?13??22:50?Maxim Cournoyer <maxim.cournoyer@gmail.com> ???
>>
>>
>> On the top of my head, I thought pkg-config-for-build had been obsolete
>> by the pkg-config symbol being dynamically bound to something that makes
>> sense for the context it's used in, via some macro trickery. I may have
>> misunderstood things
>
> For cross build,
>
> pkg-config -> xxxx-pkg-config
> pkg-config-for-build -> pkg-config
>
> libxkbcommon require wayland-scanner to generate c file, this is why
> need pkg-config-for-build, pkg-config is require by find library. Is
> different ,so libxkbcommon need both on cross build.

looks like the same change was made on master in
bc1634a197dc9ab7aa0dead8c7449bb5db09cea6. Along with other commits
then to do the same thing to other similar packages.

So, I'm closing as I believe this is done but figured I'd loop in
Efraim in case there was anything else on this matter to discuss.

Thanks all!
John
Closed
E
E
Efraim Flashner wrote on 16 Oct 2023 06:42
(name . John Kehayias)(address . john.kehayias@protonmail.com)
ZSy_NXpc42Gr51Mb@3900XT
On Mon, Oct 16, 2023 at 02:28:13AM +0000, John Kehayias wrote:
Toggle quote (30 lines)
> Hi all,
>
> cc'ing Efraim too, since...
>
> On Sun, Oct 15, 2023 at 01:30 AM, zhengjunjie@iscas.ac.cn wrote:
>
> >> ? 2023?10?13??22:50?Maxim Cournoyer <maxim.cournoyer@gmail.com> ???
> >>
> >>
> >> On the top of my head, I thought pkg-config-for-build had been obsolete
> >> by the pkg-config symbol being dynamically bound to something that makes
> >> sense for the context it's used in, via some macro trickery. I may have
> >> misunderstood things
> >
> > For cross build,
> >
> > pkg-config -> xxxx-pkg-config
> > pkg-config-for-build -> pkg-config
> >
> > libxkbcommon require wayland-scanner to generate c file, this is why
> > need pkg-config-for-build, pkg-config is require by find library. Is
> > different ,so libxkbcommon need both on cross build.
>
> looks like the same change was made on master in
> bc1634a197dc9ab7aa0dead8c7449bb5db09cea6. Along with other commits
> then to do the same thing to other similar packages.
>
> So, I'm closing as I believe this is done but figured I'd loop in
> Efraim in case there was anything else on this matter to discuss.

Oh no! I really need to get better about checking the bug tracker to see
if someone else has already worked through changes I'm thinking of.

I tried a bit of pkg-config hackery/trickery for a bunch of the
packages, even messing with the meson cross definitions file, but it
turned out that pkg-config-for-build did the exact wrapping that was
needed AND it provided a symlink from (pkg-config-for-target) to
"pkg-config", which was what meson needed.

I'll cherry-pick the commits over to core-updates and then do some of
the fixups to make everything cleaner.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmUsvzIACgkQQarn3Mo9
g1HzvA//ZB8x08RlUnd5QrMi7kgBegSKrz9/eFuIBT0TlwMwqmzhtCmPFmDetR5F
NxZ/JzYVI40Oc6nNzz2ZwcclabpmB4df2jnZz52f9FTJRzbZH5C6L5H249J4FoCg
j2levPjjHtgueSWzW+EaBw9aNZPjDSKvg/8bEhjkf2eGqu3vGMyViYak67dXj8xQ
/PyZdoZqEF9VMAwFijKeiFmzQXBZoR3JtINst4bh5t6yRwUG7VT1BDD7RalGnZjw
vU9rL2Y4ZGXY6mhkz+CNFF/l/M2NMGii8s0tBAP9WYGCaQ7831d5T4uu3p5hoVDU
Q3Ag+CzlzDruRaQrGG3guIRtUzMDKPTXFvUJ4B32aJNxyj+RKrepisqqRhblJrMR
Ngh+Ys6CLBGXCNzrKtgpoQ85jLTvnPjiJM17QmQtpM2jZTAA0o8ucYXC/nRDGPFN
7JOLZ1AU3Kw/KONVJ4Wg0mrPz3GCjjxTezabk8SLm35MzTDBIxVCrnE5us8Y0x3p
a84djFUUl7eYVJM7jSK9HIl6/r+JTIv15xs1mgSInERm07UBC/Qlxa2NNyhATz3P
icZ/72FzLOBpzxuSVJvjfH98JuLkJCy3cJPLgTn5FsK0v4wjsvOVVBnOIWeTlRu7
jXKbtGlWlK0R+z1JoVIaGWythmcfbEeCRcg3tMfxutwLGOmc/js=
=eS/R
-----END PGP SIGNATURE-----


Closed
M
M
Maxim Cournoyer wrote on 16 Oct 2023 15:48
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87jzrmznio.fsf@gmail.com
Hi Efraim,

Efraim Flashner <efraim@flashner.co.il> writes:

[...]

Toggle quote (19 lines)
>> looks like the same change was made on master in
>> bc1634a197dc9ab7aa0dead8c7449bb5db09cea6. Along with other commits
>> then to do the same thing to other similar packages.
>>
>> So, I'm closing as I believe this is done but figured I'd loop in
>> Efraim in case there was anything else on this matter to discuss.
>
> Oh no! I really need to get better about checking the bug tracker to see
> if someone else has already worked through changes I'm thinking of.
>
> I tried a bit of pkg-config hackery/trickery for a bunch of the
> packages, even messing with the meson cross definitions file, but it
> turned out that pkg-config-for-build did the exact wrapping that was
> needed AND it provided a symlink from (pkg-config-for-target) to
> "pkg-config", which was what meson needed.
>
> I'll cherry-pick the commits over to core-updates and then do some of
> the fixups to make everything cleaner.

Thanks for the resolution, and sorry for the regression I had
introduced.

--
Thanks,
Maxim
Closed
?