Re: Bug#888478: systemd FTBFS on mipsel: /usr/bin/ld: BFD (GNU Binutils for Debian) 2.29.90.20180122 assertion fail ../../bfd/elflink.c:9757
Aurelien Jarno <[email protected]>
| Newsgroups | gmane.linux.debian.ports.mips |
|---|---|
| Message-ID | <[email protected]> |
On 2018-01-26 15:19, James Cowgill wrote: > Hi, > > On 26/01/18 08:57, Aurelien Jarno wrote: > >> The build was performed on eller.d.o. > >> > >> If you reassign to binutils, please set affects. > >> > >> I put [email protected] into X-Debbugs-Cc. During cross builds I was able to > >> reproduce a very similar build failure for mips and armhf. A native > >> build on amd64 seems unaffected. Thus I have included [email protected] as > >> well. > > > > Note that the build also fails on i386 on the same files, but in a > > different way: > > > > | FAILED: test-ipv4ll > > | cc -o test-ipv4ll 'test-ipv4ll@exe/src_libsystemd-network_test-ipv4ll.c.o' -flto -Wl,--no-undefined -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -pie -Wl,--gc-sections -g -O2 -fdebug-prefix-map=/tmp/systemd-236=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wl,--start-group src/shared/libsystemd-shared-236.so src/libsystemd-network/libsystemd-network.a -Wl,--end-group '-Wl,-rpath,$ORIGIN/src/shared' -Wl,-rpath-link,/tmp/systemd-236/build-deb/src/shared > > | /usr/bin/ld: /tmp/ccFNIZSq.ltrans0.ltrans.o(.text+0x99f): unresolvable R_386_PLT32 relocation against symbol `__umoddi3' > > | /usr/bin/ld: final link failed: Nonrepresentable section on output > > | collect2: error: ld returned 1 exit status > > > > That might help debugging the issue as it is more understandable than > > a simple assert. > > Fairly minimal testcase which triggers both bugs: > > test.c: > volatile unsigned long long a = 42; > volatile unsigned long long b = 1; > > int main(void) > { > return (int) (a / b); > } > > build with: > gcc -flto -O2 -c test.c > ar rcs libtest.a test.o > gcc -flto -Wl,--whole-archive libtest.a -Wl,--no-whole-archive > > On mipsel: > /usr/bin/ld: BFD (GNU Binutils for Debian) 2.29.90.20180122 assertion fail ../../bfd/elflink.c:9757 > collect2: error: ld returned 1 exit status > > On i386: > /usr/bin/ld: /tmp/cc5ZOEfW.ltrans0.ltrans.o(.text.startup+0x3d): unresolvable R_386_PLT32 relocation against symbol `__udivdi3' > /usr/bin/ld: final link failed: Nonrepresentable section on output > collect2: error: ld returned 1 exit status Thanks for the reduced testcase. It means it can also be easily reproduced on amd64 with the following command but slightly different code: volatile __int128 a = 42; volatile __int128 b = 1; int main(void) { return (int) (a / b); } /usr/bin/ld: /tmp/ccwdC3bA.ltrans0.ltrans.o(.text.startup+0x21): unresolvable R_X86_64_PLT32 relocation against symbol `__divti3' /usr/bin/ld: final link failed: Nonrepresentable section on output Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B [email protected] http://www.aurel32.net
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEUryGlb40+QrX1Ay4E4jA+JnoM2sFAlprS3oACgkQE4jA+Jno M2vogQ/+Iz2MEqXvaQb03a5/r8KGuy4gn6O+zjMgY4OmvDpJkPWSBgb/EKVJoM/M QRmEglG+6YUx5V3uTf5/zF7or3nK4b5BAVBkZ/FZjlmX9bwNPaZUFk56XPLZhwFE 6k+GXM4Z05LeBXl8NBqUQpq3SpPdq7Umjnn2Fs4W1Sz1GX2EuDgxOqwYsLyisKSt H/7JjrD5zbWUQUf1tFMbPI7q9v/au0c8Akm7xp9HLDLZlquA/e0f9fcWMnBLbEf6 5bVJsAscyibVyRsbJgXiMlvXNyUUn0HXvajM4SkE8PFNeziZ0MqdYdCmmM4J9SbB +xa4LtpO7rnbkzL2JUwRcZe9YLRJEgot2uFRXDpB1bT4gbHne6C65BO++D7MS05W 5X4RROKx94Eg/gokdGUWbSNFBWQYPilo/XqWsZ7AtByVNfbXtEaMK4h70BtTAE6x rKTVRucVduLQ/y/lln2YCXJyiG2M5Kq8tBO994DzXZSZ+Qxn8rJx5zpA9DJ7hLiG 0WPOCvIPTENbQZmw6Tpgl6S+rtXJoaHGF0ti6ML63G3sN7n3ykgnycGFEaf6RT7m 2YV9itV7qnGtostQA71r+CkySXmrcnSYM36lMFSyWu1spw056CShFWjbRF0Y46vT 5G6MWftARMhgTfTNEZ8BJmaNgzt/TBIjPi95R9mfTRjA2et23Q8= =onLj -----END PGP SIGNATURE-----