[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#905436: binutils-mipsel-linux-gnu: Cross-compiling glibc fails with BFD assertion errors



On 04.08.2018 16:37, Paul Boddie wrote:
> Package: binutils-mipsel-linux-gnu
> Version: 2.28-5
> Severity: normal
> 
> Dear Maintainer,
> 
> I have been trying to cross-compile glibc using the mipsel-linux-gnu
> cross-toolchains but the outcome is always the same:

the glibc cross build works, as seen in the cross-toolchain-base-ports package.
I don't have the resource to check this build for arbitrary version
combinations, so closing this issue.

> /usr/lib/gcc-cross/mipsel-linux-gnu/6/../../../../mipsel-linux-gnu/bin/ld: BFD (GNU Binutils for Debian) 2.28 assertion fail ../../bfd/elfxx-mips.c:9156
> /usr/lib/gcc-cross/mipsel-linux-gnu/6/../../../../mipsel-linux-gnu/bin/ld: BFD (GNU Binutils for Debian) 2.28 assertion fail ../../bfd/elfxx-mips.c:9156
> /usr/lib/gcc-cross/mipsel-linux-gnu/6/../../../../mipsel-linux-gnu/bin/ld: BFD (GNU Binutils for Debian) 2.28 assertion fail ../../bfd/elfxx-mips.c:9156
> /usr/lib/gcc-cross/mipsel-linux-gnu/6/../../../../mipsel-linux-gnu/bin/ld: BFD (GNU Binutils for Debian) 2.28 assertion fail ../../bfd/elfxx-mips.c:9156
> /usr/lib/gcc-cross/mipsel-linux-gnu/6/../../../../mipsel-linux-gnu/bin/ld: BFD (GNU Binutils for Debian) 2.28 assertion fail ../../bfd/elfxx-mips.c:9156
> collect2: error: ld returned 1 exit status
> ../Makerules:599: recipe for target '.../deps.build/glibc/build/glibc-build/rt/librt.so' failed
> make[2]: *** [.../deps.build/glibc/build/glibc-build/rt/librt.so] Error 1
> make[2]: Leaving directory '.../deps.build/glibc/build/glibc-2.27/rt'
> Makefile:215: recipe for target 'rt/others' failed
> make[1]: *** [rt/others] Error 2
> make[1]: Leaving directory '.../deps.build/glibc/build/glibc-2.27'
> Makefile:9: recipe for target 'all' failed
> make: *** [all] Error 2
> 
> (Here, ... replaces the more verbose directory names involved.)
> 
> I had been attempting to perform this build in Unstable using the more recent
> 2.31 version of binutils, but it fails in the same place and with the same
> "logical" error, having a different line number in the same file:
> 
> BFD (GNU Binutils for Debian) 2.31.1 assertion fail ../../bfd/elfxx-mips.c:9025
> 
> Naturally, I accept that I may be providing faulty arguments to the configure
> script, but I do specify --host, --build and even --target (the latter being
> seemingly superfluous), and the configure script does seem to enter cross-build
> mode. I have also tried to eliminate options from the configure invocation but
> to no effect.
> 
> In any case, and in case of any error of mine, I do not really know how to
> proceed with these assertion errors. If ld is being operated incorrectly, it
> might be useful for this to be signalled in a clearer way.
> 
> An abridged and reformatted form of the command responsible is as follows:
> 
> mipsel-linux-gnu-gcc -mabi=32 \
>   -shared \
>   -static-libgcc \
>   -Wl,-O1 \
>   -Wl,-z,defs \
>   -Wl,-dynamic-linker=/usr/lib/ld.so.1 \
>   -B.../deps.build/glibc/build/glibc-build/csu/ \
>   -Wl,--version-script=.../deps.build/glibc/build/glibc-build/librt.map \
>   -Wl,-soname=librt.so.1 \
>   -Wl,-z,relro \
>   -Wl,--enable-new-dtags,-z,nodelete \
>   -L.../deps.build/glibc/build/glibc-build \
>   -L.../deps.build/glibc/build/glibc-build/math \
>   -L.../deps.build/glibc/build/glibc-build/elf \
>   -L.../deps.build/glibc/build/glibc-build/dlfcn \
>   -L.../deps.build/glibc/build/glibc-build/nss \
>   -L.../deps.build/glibc/build/glibc-build/nis \
>   -L.../deps.build/glibc/build/glibc-build/rt \
>   -L.../deps.build/glibc/build/glibc-build/resolv \
>   -L.../deps.build/glibc/build/glibc-build/crypt \
>   -L.../deps.build/glibc/build/glibc-build/mathvec \
>   -L.../deps.build/glibc/build/glibc-build/support \
>   -L.../deps.build/glibc/build/glibc-build/nptl \
>   -Wl,-rpath-link=.../deps.build/glibc/build/glibc-build:.../deps.build/glibc/build/glibc-build/math:.../deps.build/glibc/build/glibc-build/elf:.../deps.build/glibc/build/glibc-build/dlfcn:.../deps.build/glibc/build/glibc-build/nss:.../deps.build/glibc/build/glibc-build/nis:.../deps.build/glibc/build/glibc-build/rt:.../deps.build/glibc/build/glibc-build/resolv:.../deps.build/glibc/build/glibc-build/crypt:.../deps.build/glibc/build/glibc-build/mathvec:.../deps.build/glibc/build/glibc-build/support:.../deps.build/glibc/build/glibc-build/nptl \
>   -o .../deps.build/glibc/build/glibc-build/rt/librt.so \
>   -T .../deps.build/glibc/build/glibc-build/shlib.lds \
>   .../deps.build/glibc/build/glibc-build/csu/abi-note.o \
>   -Wl,--whole-archive \
>   .../deps.build/glibc/build/glibc-build/rt/librt_pic.a \
>   -Wl,--no-whole-archive \
>   .../deps.build/glibc/build/glibc-build/nptl/libpthread_nonshared.a \
>   .../deps.build/glibc/build/glibc-build/nptl/libpthread.so \
>   -Wl,--start-group \
>   .../deps.build/glibc/build/glibc-build/libc.so \
>   .../deps.build/glibc/build/glibc-build/libc_nonshared.a \
>   -Wl,--as-needed \
>   .../deps.build/glibc/build/glibc-build/elf/ld.so \
>   -Wl,--no-as-needed \
>   -Wl,--end-group
> 
> Apologies if this is not a particularly helpful bug report.
> 
> Paul
> 
> -- System Information:
> Debian Release: 9.5
>   APT prefers stable
>   APT policy: (500, 'stable')
> Architecture: i386 (i686)
> 
> Kernel: Linux 3.2.0-6-486
> Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968), LANGUAGE=C (charmap=ANSI_X3.4-1968)
> Shell: /bin/sh linked to /bin/dash
> Init: unable to detect
> 
> Versions of packages binutils-mipsel-linux-gnu depends on:
> ii  binutils  2.28-5
> ii  libc6     2.24-11+deb9u3
> ii  zlib1g    1:1.2.8.dfsg-5
> 
> binutils-mipsel-linux-gnu recommends no packages.
> 
> Versions of packages binutils-mipsel-linux-gnu suggests:
> pn  binutils-doc  <none>
> 
> -- no debconf information
> 


Reply to: