[Bug c++/67067] New: #error -static-libstdc++ not implemented
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67067 Bug ID: 67067 Summary: #error -static-libstdc++ not implemented Product: gcc Version: 5.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zclai at yahoo dot com Target Milestone: ---
[Bug c++/67067] "Trouble closing elf file" and "-static-libstdc++ not implemented"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67067 Alex Lai changed: What|Removed |Added Summary|#error -static-libstdc++|"Trouble closing elf file" |not implemented |and "-static-libstdc++ not ||implemented" --- Comment #1 from Alex Lai --- on Solaris x86, I downloaded MPC, GMP and MPFR and extracted them into GCC source directory as mpc,gmp and mpfr directories and configure GCC source with: $ ../gcc-5.2.0.src/configure --prefix=$HOME/gcc-5.2.0 --enable-languages=c,c++ $ gmake I got the following error: Assembler: optimize.c "/var/tmp//ccMndPR3.s", line 85111 : Trouble closing elf file gmake[3]: *** [cp/optimize.o] Error 1 The file mentioned in the error message doesn’t exist. $ ls -l "/var/tmp//ccEtAJ5n.s" /var/tmp//ccEtAJ5n.s: No such file or directory The file system has plenty of room: $ df -h /var/tmp Filesystem size used avail capacity Mounted on /dev/dsk/c0t0d0s6 99G27G71G28%/var $ uname -a SunOS sbdsvrwm566 5.10 Generic_150401-20 i86pc i386 i86pc the only error message in config.log is as follows: configure:5091: g++ -o conftest -g -O2 -static-libstdc++ -static-libgcc conftest.cpp >&5 g++: unrecognized option `-static-libstdc++' conftest.cpp:11:2: #error -static-libstdc++ not implemented configure:5091: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | /* end confdefs.h. */ | | #if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) | #error -static-libstdc++ not implemented | #endif | int main() {} the lib exists and its path is included in lib search path: $ ls -l /usr/local/lib/libstdc++.so lrwxrwxrwx 1 root root 18 May 31 2012 /usr/local/lib/libstdc++.so -> libstdc++.so.6.0.3 $ echo $LD_LIBRARY_PATH /opt/SUNWspro11/SUNWspro/prod/lib:/usr/local/lib:/usr/lib:/usr/lib/X11 the error apparently is due to the missing space between -static and -libstdc++. however,none of the mentioned confdefs.h conftest.cpp exist either under the source or build directory or installed packages. obviously the older gcc was used to compile the new gcc: configure:4074: checking for gcc configure:4090: found /usr/sfw/bin/gcc configure:4101: result: gcc configure:4330: checking for C compiler version configure:4339: gcc --version >&5 gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath) Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ echo $PATH /usr/ccs/bin:/usr/bin:/usr/sfw/bin:/usr/sbin:/usr/local/bin:/opt/SUNWspro/bin:/bin:/usr/bin:/usr/sbin:/usr/ucb:/bns/bin:/usr/openwin/bin:
[Bug lto/67069] New: ld: fatal: file .libs/lto-plugin.o: wrong ELF class: ELFCLASS32 during gcc compilation on Solaris 10 x86-64
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67069 Bug ID: 67069 Summary: ld: fatal: file .libs/lto-plugin.o: wrong ELF class: ELFCLASS32 during gcc compilation on Solaris 10 x86-64 Product: gcc Version: 5.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: zclai at yahoo dot com Target Milestone: --- During gcc 5.2.0 compilation, libtool attempted to make 32bit lto-plugin.o and failed: libtool: link: gcc -shared -Wl,-z -Wl,text -Wl,-h -Wl,liblto_plugin.so.0 -o .libs/liblto_plugin.so.0.0.0 .libs/lto-plugin.o -lc -static-libgcc -m64 ../libiberty/pic/libiberty.a ld: fatal: file .libs/lto-plugin.o: wrong ELF class: ELFCLASS32 ld: fatal: file processing errors. No output written to .libs/liblto_plugin.so.0.0.0 collect2: ld returned 1 exit status gmake[4]: *** [liblto_plugin.la] Error 1 gmake[4]: Leaving directory `/home/alelai/gcc-5.2.0.obj/lto-plugin' gmake[3]: *** [all] Error 2 gmake[3]: Leaving directory `/home/alelai/gcc-5.2.0.obj/lto-plugin' gmake[2]: *** [all-stage1-lto-plugin] Error 2 gmake[2]: Leaving directory `/home/alelai/gcc-5.2.0.obj' gmake[1]: *** [stage1-bubble] Error 2 gmake[1]: Leaving directory `/home/alelai/gcc-5.2.0.obj' gmake: *** [all] Error 2 GCC was onfigured as follows: ../gcc-5.2.0.src/configure --prefix=$HOME/gcc-5.2.0 --with-gmp=$HOME/gmp-6.0.0 --with-mpfr=$HOME/mpfr-3.1.3 --with-mpc=$HOME/mpc-1.0.3 --enable-languages=c,c++ "CFLAGS=-m64" "CXXFLAGS=-m64" "LDFLAGS=-m64" --enable-shared gmp, mpfr and mpc had been compiled as 64 bit libs: $ file libgmp.so.10.2.0 libgmp.so.10.2.0: ELF 64-bit LSB shared object, x86-64, version 1, dynamically linked, not stripped $ file libmpfr.so.4.1.3 libmpfr.so.4.1.3: ELF 64-bit LSB shared object, x86-64, version 1, dynamically linked, not stripped $ file libmpc.so.3.0.0 libmpc.so.3.0.0: ELF 64-bit LSB shared object, x86-64, version 1, dynamically linked, not stripped
[Bug c++/67067] "Trouble closing elf file" and "-static-libstdc++ not implemented"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67067 --- Comment #3 from Alex Lai --- (In reply to Jonathan Wakely from comment #2) > (In reply to Alex Lai from comment #1) > > the error apparently is due to the missing space between -static and > > -libstdc++. > > There is no missing space, that's a valid gcc option. Thanks Jonathan for the information.
[Bug lto/67069] ld: fatal: file .libs/lto-plugin.o: wrong ELF class: ELFCLASS32 during gcc compilation on Solaris 10 x86-64
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67069 --- Comment #2 from Alex Lai --- (In reply to Andrew Pinski from comment #1) > Don't use: > "CFLAGS=-m64" "CXXFLAGS=-m64" "LDFLAGS=-m64" > > Instead set CC/CXX to include -m64 instead. > Also you might need to default GCC to 64bit too. Setting CC/CXX to include -m64 worked. Thanks a lot.
[Bug c++/67067] "Trouble closing elf file" and "-static-libstdc++ not implemented"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67067 --- Comment #4 from Alex Lai --- (In reply to Alex Lai from comment #1) > on Solaris x86, I downloaded MPC, GMP and MPFR and extracted them into GCC > source directory as mpc,gmp and mpfr directories and configure GCC source > with: > > $ ../gcc-5.2.0.src/configure --prefix=$HOME/gcc-5.2.0 > --enable-languages=c,c++ > $ gmake > > I got the following error: > > Assembler: optimize.c > "/var/tmp//ccMndPR3.s", line 85111 : Trouble closing elf file > gmake[3]: *** [cp/optimize.o] Error 1 > > > The file mentioned in the error message doesn’t exist. > > $ ls -l "/var/tmp//ccEtAJ5n.s" > /var/tmp//ccEtAJ5n.s: No such file or directory > > The file system has plenty of room: > > $ df -h /var/tmp > Filesystem size used avail capacity Mounted on > /dev/dsk/c0t0d0s6 99G27G71G28%/var > > $ uname -a > SunOS sbdsvrwm566 5.10 Generic_150401-20 i86pc i386 i86pc > > > the only error message in config.log is as follows: > > configure:5091: g++ -o conftest -g -O2 -static-libstdc++ -static-libgcc > conftest.cpp >&5 > g++: unrecognized option `-static-libstdc++' > conftest.cpp:11:2: #error -static-libstdc++ not implemented > configure:5091: $? = 1 > configure: failed program was: > | /* confdefs.h */ > | #define PACKAGE_NAME "" > | #define PACKAGE_TARNAME "" > | #define PACKAGE_VERSION "" > | #define PACKAGE_STRING "" > | #define PACKAGE_BUGREPORT "" > | #define PACKAGE_URL "" > | /* end confdefs.h. */ > | > | #if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) > | #error -static-libstdc++ not implemented > | #endif > | int main() {} > > > the lib exists and its path is included in lib search path: > > $ ls -l /usr/local/lib/libstdc++.so > lrwxrwxrwx 1 root root 18 May 31 2012 > /usr/local/lib/libstdc++.so -> libstdc++.so.6.0.3 > $ echo $LD_LIBRARY_PATH > /opt/SUNWspro11/SUNWspro/prod/lib:/usr/local/lib:/usr/lib:/usr/lib/X11 > > > the error apparently is due to the missing space between -static and > -libstdc++. however,none of the mentioned confdefs.h conftest.cpp exist > either under the source or build directory or installed packages. > > obviously the older gcc was used to compile the new gcc: > > configure:4074: checking for gcc > configure:4090: found /usr/sfw/bin/gcc > configure:4101: result: gcc > configure:4330: checking for C compiler version > configure:4339: gcc --version >&5 > gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath) > Copyright (C) 2004 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > > $ echo $PATH > /usr/ccs/bin:/usr/bin:/usr/sfw/bin:/usr/sbin:/usr/local/bin:/opt/SUNWspro/ > bin:/bin:/usr/bin:/usr/sbin:/usr/ucb:/bns/bin:/usr/openwin/bin: such issue doesn't appear if I compile gmp, mpfr and mpc separately before compiling gcc.