libtool refers to native bash instead of a cross-compiled bash

  • Open
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Submitted by
Maxime Devos
Severity
minor
M
M
Maxime Devos wrote on 28 Apr 2021 23:42
(address . bug-guix@gnu.org)
1cc7dfe8243ad4618be455688ba1e12b8ee3deed.camel@telenet.be
severity: minor

To reproduce:

$ guix --version
Toggle quote (3 lines)
> guix (GNU Guix) f97e220b45aba1c10f155e760667df7ef4cae382
> [...]

This is on a x86_64-linux-gnu, without transparant qemu emulation.

$ guix build libtool --target=aarch64-linux-gnu
Toggle quote (1 lines)
> /gnu/store/yspdgc9wk8ap20729f6a7k0f640r6h7c-libtool-2.4.6
$ head -n 1 /gnu/store/yspdgc9wk8ap20729f6a7k0f640r6h7c-libtool-2.4.6/bin/libtool
Toggle quote (1 lines)
> #! /gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash
$ objdump -h /gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash
Toggle quote (4 lines)
> /gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash: \
> file format elf64-x86-64
> [...]

It seems the "libtool" script refers to a native bash, instead of the cross bash,
even though I used --target=aarch64-linux-gnu!

What I expected: a libtool package that I could run in a aarch64 VM.

Why? One possible use case, replacing "aarch64-linux-gnu" with "i586-pc-gnu":
(cross-compiled) childhurd images that have a (cross-compiled) GCC, binutils,
autoconf, automake, make, ... in the system profile, ready for Hurd hacking.

There are also some other problems when using libtool in as a cross-compiler,
but unless you're using libtool in a Canadian cross, these are separate issues,
so I'll leave those for a separate bug report.

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

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYInWwhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qd9AQDFv5Bfdpvz6EFcOfm2i3uQq6Rv
6ITHfJi6kNafEO1GngD+O4G1igvdkmWjyY/p8LDugLe4e57SEkwO1hK99NTLUQc=
=v+CU
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 4 May 2021 21:02
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 48086@debbugs.gnu.org)
87h7jimif4.fsf@gnu.org
Hi Maxime,

Maxime Devos <maximedevos@telenet.be> skribis:

Toggle quote (12 lines)
> $ guix build libtool --target=aarch64-linux-gnu
>> /gnu/store/yspdgc9wk8ap20729f6a7k0f640r6h7c-libtool-2.4.6
> $ head -n 1 /gnu/store/yspdgc9wk8ap20729f6a7k0f640r6h7c-libtool-2.4.6/bin/libtool
>> #! /gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash
> $ objdump -h /gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash
>> /gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash: \
>> file format elf64-x86-64
>> [...]
>
> It seems the "libtool" script refers to a native bash, instead of the cross bash,
> even though I used --target=aarch64-linux-gnu!

As discussed as https://issues.guix.gnu.org/48088#1, I think this is
not much of a problem because this ‘libtool’ is unused in practice.

I’d be in favor of dismissing this bug; WDYT?

Thanks,
Ludo’.
?