https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67067

Alex Lai <zclai at yahoo dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|#error -static-libstdc++    |"Trouble closing elf file"
                   |not implemented             |and "-static-libstdc++ not
                   |                            |implemented"

--- Comment #1 from Alex Lai <zclai at yahoo dot com> ---
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       99G    27G    71G    28%    /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:

Reply via email to