This is the mail archive of the gcc-help@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]

gcc-5.2.0 fails to compile itself


Using gcc-5.2.0 to compile itself on an i486 x86 system with glibc-2.22, I am unable to get it to compile with any of the following: 

CC="gcc -msse2 -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe" 
CXX="g++ -msse2 -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe" 
../gcc-5.2.0/configure --prefix=/usr/local --enable-languages=c,c++ --disable-multilib --disable-bootstrap --with-system-zlib --libexecdir=/usr/local/lib --enable-frame-pointer 

CC="gcc -march=i486 -mtune=i686 -Os -pipe" CXX="g++ -march=i486 -mtune=i686 -Os -pipe" ../gcc-5.2.0/configure --prefix=/usr/local --enable-languages=c,c++ --disable-multilib --disable-bootstrap --with-system-zlib --libexecdir=/usr/local/lib --enable-frame-pointer 

CFLAGS="-march=i486 -mtune=i686 -Os -pipe" CXXFLAGS="-march=i486 -mtune=i686 -Os -pipe" ../gcc-5.2.0/configure --prefix=/usr/local --enable-languages=c,c++ --disable-multilib --disable-bootstrap --with-system-zlib --libexecdir=/usr/local/lib --enable-frame-pointer 

../gcc-5.2.0/configure --prefix=/usr/local --enable-languages=c,c++ --disable-multilib --disable-bootstrap --with-system-zlib --libexecdir=/usr/local/lib --enable-frame-pointer 

..the latter was also tried and failed on an i686 x86 system. Oddly enough the errors are different in each case. 

Note that all of the above work without error using gcc-4.9.1 and glibc-2.20. 

Since the errors are different in each case, it's not that obvious what the problem might be? 

Detailed errors below. 

---------- 

CC="gcc -msse2 -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe" 
CXX="g++ -msse2 -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe" 
../gcc-5.2.0/configure --prefix=/usr/local --enable-languages=c,c++ --disable-multilib --disable-bootstrap --with-system-zlib --libexecdir=/usr/local/lib --enable-frame-pointer 

find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \; find . -name config.status -type f -exec sed -i 's/-g -O2//g' {} \; 

time make 
... 
g++ -msse2 -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe 
-DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall 
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -static-libstdc++ 
-static-libgcc -o build/genmatch \ 
build/genmatch.o ../build-i486-pc-linux-gnu/libcpp/libcpp.a 
build/errors.o build/vec.o build/hash-table.o ../build-i486-pc-linux-gnu/libiberty/libiberty.a 
/usr/local/bin/ld: /usr/lib/libstdc++.a(eh_globals.o): undefined reference to symbol '___tls_get_addr@@GLIBC_2.3' 
/lib/ld-linux.so.2: error adding symbols: DSO missing from command line 
collect2: error: ld returned 1 exit status 
Makefile:2613: recipe for target 'build/genmatch' failed 
make[2]: *** [build/genmatch] Error 1 
make[2]: Leaving directory '/usr/src/gcc-build/gcc' 
Makefile:4122: recipe for target 'all-gcc' failed 
make[1]: *** [all-gcc] Error 2 
make[1]: Leaving directory '/usr/src/gcc-build' 
Makefile:875: recipe for target 'all' failed 
make: *** [all] Error 2 
Command exited with non-zero status 2 
real 4m 1.34s 
user 3m 37.60s 
sys 0m 11.58s 

[http://stackoverflow.com/questions/28198965/how-to-resolve-tls-get-addrglib 
c-2-3-error-on-compiling-gcc-itself?] 

[I've tried changing LDFLAGS = to LDFLAGS = -lz in the Makefile?] 

---------- 

mkdir ../gcc-build 
cd ../gcc-build 

CC="gcc -march=i486 -mtune=i686 -Os -pipe" CXX="g++ -march=i486 -mtune=i686 -Os -pipe" ../gcc-5.2.0/configure --prefix=/usr/local --enable-languages=c,c++ --disable-multilib --disable-bootstrap --with-system-zlib --libexecdir=/usr/local/lib --enable-frame-pointer 

find . -name Makefile -type f -exec sed -i 's/-O2//g' {} \; find . -name config.status -type f -exec sed -i 's/-O2//g' {} \; 

time make 
... 
/usr/src/gcc-build/./gcc/xgcc -B/usr/src/gcc-build/./gcc/ -B/usr/local/i486-pc-linux-gnu/bin/ -B/usr/local/i486-pc-linux-gnu/lib/ 
-isystem /usr/local/i486-pc-linux-gnu/include -isystem 
/usr/local/i486-pc-linux-gnu/sys-include -g -O2 -g -DIN_GCC -W -Wall 
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes 
-Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic 
-mlong-double-80 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fpic -mlong-double-80 -I. -I. -I../.././gcc -I../../../gcc-5.2.0/libgcc -I../../../gcc-5.2.0/libgcc/. -I../../../gcc-5.2.0/libgcc/../gcc 
-I../../../gcc-5.2.0/libgcc/../include 
-I../../../gcc-5.2.0/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o bid_decimal_globals.o -MT bid_decimal_globals.o -MD -MP -MF bid_decimal_globals.dep -c ../../../gcc-5.2.0/libgcc/config/libbid/bid_decimal_globals.c 
In file included from /usr/include/fenv.h:57:0, 
from 
../../../gcc-5.2.0/libgcc/config/libbid/bid_decimal_globals.c:47: 
/usr/include/bits/fenv.h: In function '__feraiseexcept_invalid_divbyzero': 
/usr/include/bits/fenv.h:128:7: internal compiler error: Segmentation fault 
float __f = 1.0; 
^ 

/usr/include/bits/fenv.h:128:7: internal compiler error: Aborted 
xgcc: internal compiler error: Aborted (program cc1) Please submit a full bug report, with preprocessed source if appropriate. 
See < http://gcc.gnu.org/bugs.html > for instructions. 
Makefile:611: recipe for target 'bid_decimal_globals.o' failed 
make[2]: *** [bid_decimal_globals.o] Error 4 
make[2]: Leaving directory '/usr/src/gcc-build/i486-pc-linux-gnu/libgcc' 
Makefile:12423: recipe for target 'all-target-libgcc' failed 
make[1]: *** [all-target-libgcc] Error 2 
make[1]: Leaving directory '/usr/src/gcc-build' 
Makefile:875: recipe for target 'all' failed 
make: *** [all] Error 2 
Command exited with non-zero status 2 
real 13m 38.03s 
user 13m 11.36s 
sys 0m 22.38s 

[https://sourceware.org/ml/glibc-bugs/2014-12/msg00203.html?] 

---------- 

CC="gcc -msse2 -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe" 
CXX="g++ -msse2 -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe" 
../gcc-5.2.0/configure --prefix=/usr/local --enable-languages=c,c++ --disable-multilib --disable-bootstrap --with-system-zlib --libexecdir=/usr/local/lib --enable-frame-pointer 

find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \; find . -name config.status -type f -exec sed -i 's/-g -O2//g' {} \; 

time make 
... 
g++ -msse2 -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe 
-DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall 
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -static-libstdc++ 
-static-libgcc -o build/genmatch \ 
build/genmatch.o ../build-i486-pc-linux-gnu/libcpp/libcpp.a 
build/errors.o build/vec.o build/hash-table.o ../build-i486-pc-linux-gnu/libiberty/libiberty.a 
/usr/local/bin/ld: /usr/lib/libstdc++.a(eh_globals.o): undefined reference to symbol '___tls_get_addr@@GLIBC_2.3' 
/lib/ld-linux.so.2: error adding symbols: DSO missing from command line 
collect2: error: ld returned 1 exit status 
Makefile:2613: recipe for target 'build/genmatch' failed 
make[2]: *** [build/genmatch] Error 1 
make[2]: Leaving directory '/usr/src/gcc-build/gcc' 
Makefile:4122: recipe for target 'all-gcc' failed 
make[1]: *** [all-gcc] Error 2 
make[1]: Leaving directory '/usr/src/gcc-build' 
Makefile:875: recipe for target 'all' failed 
make: *** [all] Error 2 
Command exited with non-zero status 2 
real 4m 1.34s 
user 3m 37.60s 
sys 0m 11.58s 

[http://stackoverflow.com/questions/28198965/how-to-resolve-tls-get-addrglib 
c-2-3-error-on-compiling-gcc-itself?] 

[I've tried changing LDFLAGS = to LDFLAGS = -lz in the Makefile?] 

---------- 

CFLAGS="-march=i486 -mtune=i686 -Os -pipe" CXXFLAGS="-march=i486 -mtune=i686 -Os -pipe" ../gcc-5.2.0/configure --prefix=/usr/local --enable-languages=c,c++ --disable-multilib --disable-bootstrap --with-system-zlib --libexecdir=/usr/local/lib --enable-frame-pointer 

find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \; find . -name config.status -type f -exec sed -i 's/-g -O2//g' {} \; 

time make 
... 
/usr/src/gcc-build/./gcc/xgcc -B/usr/src/gcc-build/./gcc/ -B/usr/local/i486-pc-linux-gnu/bin/ -B/usr/local/i486-pc-linux-gnu/lib/ 
-isystem /usr/local/i486-pc-linux-gnu/include -isystem 
/usr/local/i486-pc-linux-gnu/sys-include -march=i486 -mtune=i686 -Os 
-pipe -O2 -march=i486 -mtune=i686 -Os -pipe -DIN_GCC -W -Wall 
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes 
-Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic 
-mlong-double-80 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fpic -mlong-double-80 -I. -I. -I../.././gcc -I../../../gcc-5.2.0/libgcc -I../../../gcc-5.2.0/libgcc/. -I../../../gcc-5.2.0/libgcc/../gcc 
-I../../../gcc-5.2.0/libgcc/../include 
-I../../../gcc-5.2.0/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _mulxc3.o -MT _mulxc3.o -MD -MP -MF _mulxc3.dep 
-DL_mulxc3 -c ../../../gcc-5.2.0/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS 
../../../gcc-5.2.0/libgcc/libgcc2.c: In function '__mulxc3': 
../../../gcc-5.2.0/libgcc/libgcc2.c:1957:21: internal compiler error: 
Segmentation fault 
if (isnan (c)) c = COPYSIGN (0, c); 
^ 

../../../gcc-5.2.0/libgcc/libgcc2.c:1957:21: internal compiler error: 
Aborted 
xgcc: internal compiler error: Aborted (program cc1) Please submit a full bug report, with preprocessed source if appropriate. 
See < http://gcc.gnu.org/bugs.html > for instructions. 
Makefile:466: recipe for target '_mulxc3.o' failed 
make[2]: *** [_mulxc3.o] Error 4 
make[2]: Leaving directory '/usr/src/gcc-build/i486-pc-linux-gnu/libgcc' 
Makefile:12423: recipe for target 'all-target-libgcc' failed 
make[1]: *** [all-target-libgcc] Error 2 
make[1]: Leaving directory '/usr/src/gcc-build' 
Makefile:875: recipe for target 'all' failed 
make: *** [all] Error 2 
Command exited with non-zero status 2 
real 11m 38.94s 
user 11m 5.37s 
sys 0m 19.72s 

---------- 

../gcc-5.2.0/configure --prefix=/usr/local --enable-languages=c,c++ --disable-multilib --disable-bootstrap --with-system-zlib --libexecdir=/usr/local/lib --enable-frame-pointer 

time make 
... 
/usr/src/gcc-build/./gcc/xgcc -B/usr/src/gcc-build/./gcc/ -B/usr/local/i486-pc-linux-gnu/bin/ -B/usr/local/i486-pc-linux-gnu/lib/ 
-isystem /usr/local/i486-pc-linux-gnu/include -isystem 
/usr/local/i486-pc-linux-gnu/sys-include -g -O2 -O2 -g -O2 -DIN_GCC 
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes 
-Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic 
-mlong-double-80 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fpic -mlong-double-80 -I. -I. -I../.././gcc -I../../../gcc-5.2.0/libgcc -I../../../gcc-5.2.0/libgcc/. -I../../../gcc-5.2.0/libgcc/../gcc 
-I../../../gcc-5.2.0/libgcc/../include -DHAVE_CC_TLS -DUSE_TLS -o sfp-exceptions.o -MT sfp-exceptions.o -MD -MP -MF sfp-exceptions.dep -c ../../../gcc-5.2.0/libgcc/config/i386/sfp-exceptions.c -fvisibility=hidden -DHIDE_EXPORTS 
../../../gcc-5.2.0/libgcc/config/i386/sfp-exceptions.c: In function 
'__sfp_handle_exceptions': 
../../../gcc-5.2.0/libgcc/config/i386/sfp-exceptions.c:69:7: internal compiler error: Segmentation fault 
float f = 1.0f, g = 0.0f; 
^ 

../../../gcc-5.2.0/libgcc/config/i386/sfp-exceptions.c:69:7: internal compiler error: Aborted 
xgcc: internal compiler error: Aborted (program cc1) Please submit a full bug report, with preprocessed source if appropriate. 
See < http://gcc.gnu.org/bugs.html > for instructions. 
../../../gcc-5.2.0/libgcc/shared-object.mk:14: recipe for target 'sfp-exceptions.o' failed 
make[2]: *** [sfp-exceptions.o] Error 4 
make[2]: Leaving directory '/usr/src/gcc-build/i486-pc-linux-gnu/libgcc' 
Makefile:12423: recipe for target 'all-target-libgcc' failed 
make[1]: *** [all-target-libgcc] Error 2 
make[1]: Leaving directory '/usr/src/gcc-build' 
Makefile:875: recipe for target 'all' failed 
make: *** [all] Error 2 
Command exited with non-zero status 2 
real 14m 58.34s 
user 14m 12.29s 
sys 0m 22.28s 

---------- 

i686 

../gcc-5.2.0/configure --prefix=/usr/local --enable-languages=c,c++ --disable-multilib --disable-bootstrap --with-system-zlib --libexecdir=/usr/local/lib --enable-frame-pointer 

time make 
... 
/usr/src/gcc-build/./gcc/xgcc -B/usr/src/gcc-build/./gcc/ -B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/local/i686-pc-linux-gnu/lib/ 
-isystem /usr/local/i686-pc-linux-gnu/include -isystem 
/usr/local/i686-pc-linux-gnu/sys-include -g -O2 -O2 -g -O2 -DIN_GCC 
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes 
-Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic 
-mlong-double-80 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fpic -mlong-double-80 -I. -I. -I../.././gcc -I../../../gcc-5.2.0/libgcc -I../../../gcc-5.2.0/libgcc/. -I../../../gcc-5.2.0/libgcc/../gcc 
-I../../../gcc-5.2.0/libgcc/../include -DHAVE_CC_TLS -DUSE_TLS -o _mulxc3.o -MT _mulxc3.o -MD -MP -MF _mulxc3.dep -DL_mulxc3 -c ../../../gcc-5.2.0/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS 
../../../gcc-5.2.0/libgcc/libgcc2.c: In function '__mulxc3': 
../../../gcc-5.2.0/libgcc/libgcc2.c:1955:6: internal compiler error: 
Segmentation fault 
a = COPYSIGN (isinf (a) ? 1 : 0, a); 
^ 

../../../gcc-5.2.0/libgcc/libgcc2.c:1955:6: internal compiler error: Aborted 
xgcc: internal compiler error: Aborted (program cc1) Please submit a full bug report, with preprocessed source if appropriate. 
See < http://gcc.gnu.org/bugs.html > for instructions. 
Makefile:466: recipe for target '_mulxc3.o' failed 
make[2]: *** [_mulxc3.o] Error 4 
make[2]: Leaving directory '/usr/src/gcc-build/i686-pc-linux-gnu/libgcc' 
Makefile:12423: recipe for target 'all-target-libgcc' failed 
make[1]: *** [all-target-libgcc] Error 2 
make[1]: Leaving directory '/usr/src/gcc-build' 
Makefile:875: recipe for target 'all' failed 
make: *** [all] Error 2 
Command exited with non-zero status 2 
real 14m 56.45s 
user 14m 10.99s 
sys 0m 22.03s 


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