GNU bug report logs -
#78854
Cross-Compiling: ld.lld - "clang_rt.crtbegin.o is incompatible with elf32-littlearm"
Previous Next
Reported by: NR <nroycea+gnu <at> gmail.com>
Date: Sat, 21 Jun 2025 07:27:07 UTC
Severity: normal
Done: Ileana Dumitrescu <ileanadumitrescu95 <at> gmail.com>
To reply to this bug, email your comments to 78854 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-libtool <at> gnu.org
:
bug#78854
; Package
libtool
.
(Sat, 21 Jun 2025 07:27:07 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
NR <nroycea+gnu <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-libtool <at> gnu.org
.
(Sat, 21 Jun 2025 07:27:07 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
```
host-triplet: armv6-pc-linux-gnu
shell: /bin/sh
compiler: /<pathTo>/toolchain/bin/clang
compiler flags: -pipe --target=armv6-pc-linux-gnu
--sysroot=/<pathTo>/sysroot -mfloat-abi=soft
-Wno-unused-command-line-argument
linker: /<pathTo>/toolchain/bin/ld.lld (gnu? yes)
version: libtool (GNU libtool) 2.5.4.1-baa1-dirty
automake: automake (GNU automake) 1.17
autoconf: autoconf (GNU Autoconf) 2.72
```
For some reason, libtool isn't specifying the target for ld.lld:
ld.lld: error: /<pathTo>/toolchain/lib/clang/21/lib/x86_64-unknown-linux-gnu/clang_rt.crtbegin.o
is incompatible with elf32-littlearm
```
/bin/sh ./libtool --tag=CC --mode=link
/<pathTo>/toolchain/bin/clang -Wall -Wextra -Walloca
-Wbad-function-cast -Wcast-align -Wcast-qual -Wconversion -Wformat=2
-Wformat-signedness -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs -Wnull-dereference -Wold-style-definition
-Wpointer-arith -Wshadow -Wstrict-overflow=2 -Wstrict-prototypes
-Wundef -Wvla -Wwrite-strings -Wpedantic -Werror -fno-plt -pipe
--target=armv6-pc-linux-gnu --sysroot=/<pathTo>/sysroot
-mfloat-abi=soft -Wno-unused-command-line-argument -version-info 2:0:1
-Wl,--version-script,./libcrypt.map -Wl,-z,defs -Wl,-z,text
-Wl,-z,relro -Wl,-z,now -pipe --target=armv6-pc-linux-gnu
--sysroot=/<pathTo>/sysroot -o libcrypt.la -rpath /usr/lib
lib/libcrypt_la-alg-des-tables.lo lib/libcrypt_la-alg-des.lo
lib/libcrypt_la-alg-gost3411-2012-core.lo
lib/libcrypt_la-alg-gost3411-2012-hmac.lo
lib/libcrypt_la-alg-hmac-sha1.lo lib/libcrypt_la-alg-md4.lo
lib/libcrypt_la-alg-md5.lo lib/libcrypt_la-alg-sha1.lo
lib/libcrypt_la-alg-sha256.lo lib/libcrypt_la-alg-sha512.lo
lib/libcrypt_la-alg-yescrypt-common.lo
lib/libcrypt_la-alg-yescrypt-opt.lo lib/libcrypt_la-crypt-bcrypt.lo
lib/libcrypt_la-crypt-des.lo lib/libcrypt_la-crypt-gensalt-static.lo
lib/libcrypt_la-crypt-gost-yescrypt.lo lib/libcrypt_la-crypt-md5.lo
lib/libcrypt_la-crypt-nthash.lo lib/libcrypt_la-crypt-pbkdf1-sha1.lo
lib/libcrypt_la-crypt-scrypt.lo lib/libcrypt_la-crypt-sha256.lo
lib/libcrypt_la-crypt-sha512.lo lib/libcrypt_la-crypt-static.lo
lib/libcrypt_la-crypt-sunmd5.lo lib/libcrypt_la-crypt-yescrypt.lo
lib/libcrypt_la-crypt.lo lib/libcrypt_la-util-base64.lo
lib/libcrypt_la-util-gensalt-sha.lo
lib/libcrypt_la-util-get-random-bytes.lo
lib/libcrypt_la-util-make-failure-token.lo
lib/libcrypt_la-util-xbzero.lo lib/libcrypt_la-util-xstrcpy.lo
lib/libcrypt_la-crypt-des-obsolete.lo
libtool: link: /<pathTo>/toolchain/bin/clang -shared -fPIC -DPIC
lib/.libs/libcrypt_la-alg-des-tables.o lib/.libs/libcrypt_la-alg-des.o
lib/.libs/libcrypt_la-alg-gost3411-2012-core.o
lib/.libs/libcrypt_la-alg-gost3411-2012-hmac.o
lib/.libs/libcrypt_la-alg-hmac-sha1.o lib/.libs/libcrypt_la-alg-md4.o
lib/.libs/libcrypt_la-alg-md5.o lib/.libs/libcrypt_la-alg-sha1.o
lib/.libs/libcrypt_la-alg-sha256.o lib/.libs/libcrypt_la-alg-sha512.o
lib/.libs/libcrypt_la-alg-yescrypt-common.o
lib/.libs/libcrypt_la-alg-yescrypt-opt.o
lib/.libs/libcrypt_la-crypt-bcrypt.o lib/.libs/libcrypt_la-crypt-des.o
lib/.libs/libcrypt_la-crypt-gensalt-static.o
lib/.libs/libcrypt_la-crypt-gost-yescrypt.o
lib/.libs/libcrypt_la-crypt-md5.o lib/.libs/libcrypt_la-crypt-nthash.o
lib/.libs/libcrypt_la-crypt-pbkdf1-sha1.o
lib/.libs/libcrypt_la-crypt-scrypt.o
lib/.libs/libcrypt_la-crypt-sha256.o
lib/.libs/libcrypt_la-crypt-sha512.o
lib/.libs/libcrypt_la-crypt-static.o
lib/.libs/libcrypt_la-crypt-sunmd5.o
lib/.libs/libcrypt_la-crypt-yescrypt.o lib/.libs/libcrypt_la-crypt.o
lib/.libs/libcrypt_la-util-base64.o
lib/.libs/libcrypt_la-util-gensalt-sha.o
lib/.libs/libcrypt_la-util-get-random-bytes.o
lib/.libs/libcrypt_la-util-make-failure-token.o
lib/.libs/libcrypt_la-util-xbzero.o
lib/.libs/libcrypt_la-util-xstrcpy.o
lib/.libs/libcrypt_la-crypt-des-obsolete.o -Werror
--sysroot=/<pathTo>/sysroot -mfloat-abi=soft -Wl,--version-script
-Wl,./libcrypt.map -Wl,-z -Wl,defs -Wl,-z -Wl,text -Wl,-z -Wl,relro
-Wl,-z -Wl,now --sysroot=/<pathTo>/sysroot -Wl,-soname
-Wl,libcrypt.so.1 -o .libs/libcrypt.so.1.1.0
```
Note how `--target=armv6-pc-linux-gnu --sysroot=<...>` was set with
the first clang command, but only `--sysroot` exists with the
subsequent clang command for linking.
Information forwarded
to
bug-libtool <at> gnu.org
:
bug#78854
; Package
libtool
.
(Wed, 02 Jul 2025 18:35:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 78854 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 21/06/2025 02:27, NR wrote:
> For some reason, libtool isn't specifying the target for ld.lld:
> ld.lld: error: /<pathTo>/toolchain/lib/clang/21/lib/x86_64-unknown-linux-gnu/clang_rt.crtbegin.o
> is incompatible with elf32-littlearm
>
> Note how `--target=armv6-pc-linux-gnu --sysroot=<...>` was set with
> the first clang command, but only `--sysroot` exists with the
> subsequent clang command for linking.
Thank you for your bug report! I think this is an easy fix to have the
"--target" flag passed through libtool. Would you test the attached
diff? It is based on the development branch, so it may not apply.
--
Ileana Dumitrescu
GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354
[handle-target-architecture-flag.diff (text/x-patch, attachment)]
[OpenPGP_0x6570EA01146F7354.asc (application/pgp-keys, attachment)]
[OpenPGP_signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
bug-libtool <at> gnu.org
:
bug#78854
; Package
libtool
.
(Mon, 14 Jul 2025 15:52:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 78854 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 03/07/2025 09:51, NR wrote:
> Yeah, that worked out fine and the build completed.
Thank you for testing! The patch has been applied to the development
branch.
https://cgit.git.savannah.gnu.org/cgit/libtool.git/commit/?h=development&id=58f12166a05e8041de34a3c90cf01d9c283124fc
--
Ileana Dumitrescu
GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354
[OpenPGP_0x6570EA01146F7354.asc (application/pgp-keys, attachment)]
[OpenPGP_signature.asc (application/pgp-signature, attachment)]
Reply sent
to
Ileana Dumitrescu <ileanadumitrescu95 <at> gmail.com>
:
You have taken responsibility.
(Fri, 08 Aug 2025 14:55:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
NR <nroycea+gnu <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 08 Aug 2025 14:55:03 GMT)
Full text and
rfc822 format available.
Message #16 received at 78854-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
This is applied in the master branch now, so closing.
https://cgit.git.savannah.gnu.org/cgit/libtool.git/commit/?id=9c7772f8a6924ff0d1ad6385e12c56baed96dd71
--
Ileana Dumitrescu
GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354
[OpenPGP_0x6570EA01146F7354.asc (application/pgp-keys, attachment)]
[OpenPGP_signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 8 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.