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

James Cowgill <[email protected]>
Newsgroups gmane.linux.debian.ports.mips
Message-ID <[email protected]>
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

James
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE+Ixt5DaZ6POztUwQx/FnbeotAe8FAlprRxoACgkQx/Fnbeot
Ae8nehAAsQ4NnAtmednPEa8DUT7vMszUR2KaZuQcSJQf1TMT0KJYFesFG4oy217K
nVkH4f567dZkqijuyvwjgMO6BNPX+C1pULTNhfnVdF4cfjiJhY2GxYLOKooX+dZN
ICBssidY48iqnuiWuP4jUqcfh8zKPDmeeThpN1hHZj2i2yjny2Hkb6EMnCNbt7K6
GqXK36scQP4jWaU8iHRjbTQon53lAYBaS4t7zhnWzG3eIspN3BfolEhtgGbmaWWG
rL35KjU0A9vCiPeOqgv/ZXPuAfgSyq02pWYpm/qhS0AI8FJzW2ZxBt7DJp0Gi/0Z
YKuQc5w/A3pJFU6zc2aadttgdmUbZm5kaC4eKAfOkormSQ59Ic1fiQnoSKmzIC1Q
VBguDfF9iGSknrzmFOsudIw6Ei6VNikx+wonafIAktbadPR7AHwZrww2feBya9hJ
k4ZBYR/lURBUfbnIyJ71BxARhxYfymtExiZMAMfGeQvRLppjiRgfXGg/7lB4SY0B
O/rjyYwD5KfYSx7a5mZT+3YUMBplXYQitV02AB/Us4ybwRbbFx9nNBOCictVAEA4
QIDZVeMorDyrLBSWWUCa1/hBky9XyAyz+YK7ROidvOCM2hE7kxsLxsvY9+w7XNrY
S783E4CLV7MYJrA410O+yp8Nv2cfeosfsnMDiY6NEnWwcBI4sC0=
=WXnh
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.