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

[Bug libstdc++/12595] link problems with static libstdc++


------- Additional Comments From marek dot rouchal at infineon dot com  2003-11-21 10:55 -------
Subject: RE:  link problems with static libstdc++

> Delete (or move) the shared library and try again?

I already made sure that the libstdc++.so is not used.
But here is what I did:
$ pushd /opt/gcc_3.2.3/lib
$ mkdir .dis
$ mv libstdc++.so* libstdc++.la .dis
$ popd
$ g++ -save-temps -v -shared -o hsw.so hsw.cpp -lstdc++
Reading specs from /opt/gcc_3.2.3/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/specs
Configured with: ./configure --prefix=/opt/gcc_3.2.3 --enable-shared
--enable-threads=posix --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.2.3
 /opt/gcc_3.2.3/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/cpp0 -lang-c++
-D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -v -D__GNUC__=3
-D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=3 -D__GXX_ABI_VERSION=102 -D__ELF__
-Dunix -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__
-D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__
-D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386
-D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ hsw.cpp hsw.ii
GNU CPP version 3.2.3 (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "/opt/gcc_3.2.3/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /opt/gcc_3.2.3/include/c++/3.2.3
 /opt/gcc_3.2.3/include/c++/3.2.3/i686-pc-linux-gnu
 /opt/gcc_3.2.3/include/c++/3.2.3/backward
 /usr/local/include
 /opt/gcc_3.2.3/include
 /opt/gcc_3.2.3/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include
 /usr/include
End of search list.
 /opt/gcc_3.2.3/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/cc1plus -fpreprocessed
hsw.ii -quiet -dumpbase hsw.cpp -version -o hsw.s
GNU CPP version 3.2.3 (cpplib) (i386 Linux/ELF)
GNU C++ version 3.2.3 (i686-pc-linux-gnu)
        compiled by GNU C version 3.1.1.
 
/opt/gcc_3.2.3/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../../i686-pc-linux
-gnu/bin/as -V -Qy -o hsw.o hsw.s
GNU assembler version 2.14 (i686-pc-linux-gnu) using BFD version 2.14
20030612
 /opt/gcc_3.2.3/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/collect2 --eh-frame-hdr
-m elf_i386 -shared -o hsw.so /usr/lib/crti.o
/opt/gcc_3.2.3/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/crtbeginS.o
-L/usr/local/bin -L/opt/gcc_3.2.3/lib/gcc-lib/i686-pc-linux-gnu/3.2.3
-L/opt/gcc_3.2.3/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../../i686-pc-lin
ux-gnu/lib -L/opt/gcc_3.2.3/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../..
hsw.o -lstdc++ -lstdc++ -lm -lgcc_s -lc -lgcc_s
/opt/gcc_3.2.3/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/crtendS.o /usr/lib/crtn.o
/opt/gcc_3.2.3/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../../i686-pc-linux
-gnu/bin/ld: hsw.so: undefined versioned symbol name
std::time_put_w@@GLIBCPP_3.2
/opt/gcc_3.2.3/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/../../../../i686-pc-linux
-gnu/bin/ld: failed to set dynamic section sizes: Bad value
collect2: ld returned 1 exit status


By the way: /usr/local/* is empty on that host.

The binutils are the latest ones:
$ which ld
/opt/gcc_3.2.3/bin/ld
$ ld --version
GNU ld version 2.14 20030612

Let me know if you need anything else...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12595


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