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]

gcc 3.0 missing __dso_handle in libstdc++



I built a gcc 3.0 branch of two days ago on i386/SuSE 6.4 (that's glibc
2.1 based) 
The gcc was built using configure --prefix=/pkg/gcc-3.0-date 
--enable-languages=c,c++
and installed using make bootstrap ; make install. That configure seems
to imply --enable-shared on the system.  C works fine, but trying simple
C++ programs shows a problem: 

fred:~/wsrc% cat hello.cc 
#include <iostream>

int main()
{
        std::cout << "Hello world\n";
}
fred:~/wsrc% /pkg/gcc-3.0-010526/bin/g++ hello.cc -o hello
fred:~/wsrc% LD_LIBRARY_PATH=/pkg/gcc-3.0-010526/lib ./hello
./hello: error in loading shared libraries: /pkg/gcc-3.0-010526/lib/libstdc++.so.3: undefined symbol: __dso_handle
fred:~/wsrc% 


The linker runs like this:
 /pkg/gcc-3.0-010526/lib/gcc-lib/i586-pc-linux-gnu/3.0/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o hello /usr/lib/crt1.o /usr/lib/crti.o /pkg/gcc-3.0-010526/lib/gcc-lib/i586-pc-linux-gnu/3.0/crtbegin.o -L/pkg/gcc-3.0-010526/lib/gcc-lib/i586-pc-linux-gnu/3.0 -L/pkg/gcc-3.0-010526/lib/gcc-lib/i586-pc-linux-gnu/3.0/../../.. /tmp/ccWAiceA.o -lstdc++ -lm -lgcc_s -lc -lgcc_s /pkg/gcc-3.0-010526/lib/gcc-lib/i586-pc-linux-gnu/3.0/crtend.o /usr/lib/crtn.o

__dso_handle seems to declared in crtstuff.c. It seems to forget to link
that in (?) 


-Andi 
-- 
Life would be so much easier if we could just look at the source code.


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