This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Build failure for sparc-sun-solaris2.10


Hi.

I've had no luck building GCC on a Sparc-based Solaris machine here
since early March - right around the time some LTO related patches
landed. I've started trying again and the build fails when linking
libgcc_so at the end of stage1. Here's the end of the build log:

{ ... snip ... }
/bin/bash /export/home/arth/src/gcc.git/libgcc/../mkinstalldirs sparcv9
mkdir -p -- sparcv9
/export/home/arth/src/gcc-0731/./gcc/xgcc -B/export/home/arth/src/gcc-0731/./gcc/ -B/export/home/arth/local/sparc-sun-solaris2.10/bin
/ -B/export/home/arth/local/sparc-sun-solaris2.10/lib/ -isystem /export/home/arth/local/sparc-sun-solaris2.10/include -isystem /expor
t/home/arth/local/sparc-sun-solaris2.10/sys-include    -O2  -g -O2 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -W
no-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fPIC -g -DIN_LIBGCC2 -fbuilding-libg
cc -fno-stack-protector  -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc.map -o sparcv9/libgcc_s.so.1.t
mp -g -O2 -m64 -B./ _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _trampol
ine_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s
.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcou
ntsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulsc3_s.o _muldc3_s.o 
_mulxc3_s.o _multc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _clrsbsi2_s.o _clrsbdi2_s.o _fixu
nssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixtfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixun
sxfdi_s.o _fixunstfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatditf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_
s.o _floatunditf_s.o _divdi3_s.o _moddi3_s.o _udivdi3_s.o _umoddi3_s.o _udiv_w_sdiv_s.o _udivmoddi4_s.o enable-execute-stack_s.o unwi
nd-dw2_s.o unwind-dw2-fde-dip_s.o unwind-sjlj_s.o unwind-c_s.o emutls_s.o libgcc.a -lc && rm -f sparcv9/libgcc_s.so && if [ -f sparcv
9/libgcc_s.so.1 ]; then mv -f sparcv9/libgcc_s.so.1 sparcv9/libgcc_s.so.1.backup; else true; fi && mv sparcv9/libgcc_s.so.1.tmp sparc
v9/libgcc_s.so.1 && ln -s libgcc_s.so.1 sparcv9/libgcc_s.so
collect2: fatal error: ld terminated with signal 10 [Bus Error], core dumped
compilation terminated.
gmake[5]: *** [libgcc_s.so] Error 1
gmake[5]: Leaving directory `/export/home/arth/src/gcc-0731/sparc-sun-solaris2.1
0/sparcv9/libgcc'
gmake[4]: *** [multi-do] Error 1
gmake[4]: Leaving directory `/export/home/arth/src/gcc-0731/sparc-sun-solaris2.1
0/libgcc'
gmake[3]: *** [all-multi] Error 2
gmake[3]: *** Waiting for unfinished jobs....
gmake[3]: Leaving directory `/export/home/arth/src/gcc-0731/sparc-sun-solaris2.1
0/libgcc'
gmake[2]: *** [all-stage1-target-libgcc] Error 2
gmake[2]: Leaving directory `/export/home/arth/src/gcc-0731'
gmake[1]: *** [stage1-bubble] Error 2
gmake[1]: Leaving directory `/export/home/arth/src/gcc-0731'
gmake: *** [bootstrap] Error 2

The machine has the 2.24 release of GNU binutils installed. The crash
leaves a core file which contains this backtrace:

$ cd ~/src/gcc-0731/sparc-sun-solaris2.10/sparcv9/libgcc
$ pstack core
core 'core' of 20626:   /export/home/arth/local/bin/ld -plugin /export/home/arth/src/gcc-0731/
 fbb54bc0 claim_file_handler (ffbfb664, ffbfb5fc, 0, 0, 0, 0) + 38
 0003198c plugin_maybe_claim (ffbfb664, 186840, 2, 181000, 181000, 189220) + 6c
 0002ecf0 ldfile_try_open_bfd (1, 186840, fbb43800, 0, 6, ffbfbf59) + 1b0
 0002f3ec ldfile_open_file (186840, 1, e8070, fba563a0, fbb3e3c0, fbb485b8) + ac
 00022560 load_symbols (186840, ffbfb7a0, ffffffff, fffffff8, 0, 186840) + 20
 000233a0 open_input_bfds (186840, 0, 1b174, 1, 1859ac, 1811ac) + 1a0
 000259a4 lang_process (185800, 185800, 181000, 0, 181000, 1859d8) + a4
 000129e4 main     (185a64, 181000, 185800, 185ab8, 1859d8, 0) + 604
 00012f9c _start   (0, 0, 0, 0, 0, 0) + 5c
$

I hope the backtrace is helpful to some degree even though the crash is
in the GNU 'ld' linker.

When looking over the mailing list archives I found the long thread
regarding the LTO linker change and the resulting fallout:

Patch lands:
https://gcc.gnu.org/ml/gcc-patches/2014-03/msg00157.html

Maintainer notes it breaks the build:
https://gcc.gnu.org/ml/gcc-patches/2014-03/msg00391.html

After several days a fix was applied, but my builds still fail. Is there
a configuration change needed to activate the fix?

Here's the info for my last successful GCC build:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/export/home/arth/local/libexec/gcc/sparc-sun-solaris2.10/4.9.0/lto-wrapper
Target: sparc-sun-solaris2.10
Configured with: /export/home/arth/src/gcc.git/configure --prefix=/export/home/arth/local --enable-languages=c,c++,objc --disable-nls --with-gmp=/export/home/arth/local --with-mpfr=/export/home/arth/local --with-mpc=/export/home/arth/local --enable-checking=release --enable-threads --with-gnu-as --with-as=/export/home/arth/local/bin/as --with-gnu-ld --with-ld=/export/home/arth/local/bin/ld --enable-libstdcxx-pch=no
Thread model: posix
gcc version 4.9.0 20140305 (experimental) [master revision 1a3ae6f:67f9942:8ecf2b4ab9881c344ac9ee5d1692343397923977] (GCC)
$

Thanks in advance for any help resolving this, and my thanks to everyone
working on GCC.

Art Haas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]