building libstdc++-v3 from the 20000105 snapshot dies with multiple def errors.

Benjamin Kosnik bkoz@cygnus.com
Wed May 10 10:10:00 GMT 2000


I noticed this too. I can't tell from your error message if the duplicate 
symbols are all marked inline, or what. Can investigate?


> gcc 2.95.2
> glibc 2.1.2
> binutils 2.9.0.5.41
> 
> I built libstdc++-v3 by: 
> 
> (1) replacing gcc-2.95.2/libstdc++ with egcs-20000501/libstdc++-v3,
> (2) renaming gcc-2.95.2/libio to gcc-2.95.2/libio-v2, 
> (3) 
>     $mkdir gcc-2.95.2.objdir
>     $cd gcc-2.95.2.objdir
>     $../gcc-2.95.2/configure
>       --prefix=/usr/local/libstdc++-cvs --enable-shared
>       --enable-threads=posix &> configure.out &
>     $make bootstrap &> make.bootstrap.out &
> 
> and make dies with (looks like a multiple def error for every
>   basic_string<> instantiation):
> 
> .libs/libinst-string.al(stringCTORDUPAL.lo): In function `std::messages_base type_info function':
> /usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/src/../../../../gcc-2.95.2/libstdc++/bits/st
> ring.tcc:54:
> multiple definition of
> `
> std::basic_string
> <
>   char,
>   std::char_traits<char>,
>   std::allocator<char>
> >::basic_string(unsigned int, char, std::allocator<char> const &)
> '
> .libs/libinst-string.al(stringCTORNC.lo):/usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/src
> /../../../../gcc-2.95.2/libstdc++/bits/string.tcc:54: first defined here
> .libs/libinst-string.al(stringREPIIPP2.lo): In function `std::messages_base type_info function':
> /usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/src/../../../../gcc-2.95.2/libstdc++/bits/st
> ring.tcc:54: multiple definition of `std::basic_string<char, std::char_traits<char>, std::allocator<char> > & std::basic
> _string<char, std::char_traits<char>, std::allocator<char> >::_M_replace<char *>(std::__normal_iterator<char *, std::bas
> ic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__normal_iterator<char *, std::basic_string<char,
>  std::char_traits<char>, std::allocator<char> > >, char *, char *, std::forward_iterator_tag)'
> .libs/libinst-string.al(stringREPIIPP.lo):/usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/sr
> c/../../../../gcc-2.95.2/libstdc++/bits/string.tcc:54: first defined here
> .libs/libinst-string.al(stringCONPPF2.lo): In function `std::messages_base type_info function':
> /usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/src/../../../../gcc-2.95.2/libstdc++/bits/st
> ring.tcc:54: multiple definition of `char * std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_c
> onstruct<char *>(char *, char *, std::allocator<char> const &, std::forward_iterator_tag)'
> .libs/libinst-string.al(stringCONPPF.lo):/usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/src
> /../../../../gcc-2.95.2/libstdc++/bits/string.tcc:54: first defined here
> .libs/libinst-string.al(stringCOMPARE2.lo): In function `std::messages_base type_info function':
> /usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/src/../../../../gcc-2.95.2/libstdc++/bits/st
> ring.tcc:54: multiple definition of `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(uns
> igned int, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const &) const'
> .libs/libinst-string.al(stringCOMPARE.lo):/usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/sr
> c/../../../../gcc-2.95.2/libstdc++/bits/string.tcc:54: first defined here
> .libs/libinst-string.al(stringCOMPAREP2.lo): In function `std::basic_string<char, std::char_traits<char>, std::allocator
> <char> >::compare(char const *) const':
> /usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/src/../../../../gcc-2.95.2/libstdc++/bits/st
> ring.tcc(.text+0x0): multiple definition of `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::com
> pare(char const *) const'
> .libs/libinst-string.al(stringCOMPAREP.lo)(.text+0x0):/usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/
> libstdc++/src/../../../../gcc-2.95.2/libstdc++/bits/string.tcc: first defined here
> .libs/libinst-wstring.al(wstringCTORDUPAL.lo): In function `std::messages_base type_info function':
> /usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/src/../../../../gcc-2.95.2/libstdc++/bits/st
> ring.tcc:54: multiple definition of `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::ba
> sic_string(unsigned int, wchar_t, std::allocator<wchar_t> const &)'
> .libs/libinst-wstring.al(wstringCTORNC.lo):/usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/s
> rc/../../../../gcc-2.95.2/libstdc++/bits/string.tcc:54: first defined here
> .libs/libinst-wstring.al(wstringREPIIPP2.lo): In function `std::messages_base type_info function':
> /usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/src/../../../../gcc-2.95.2/libstdc++/bits/st
> ring.tcc:54: multiple definition of `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > & s
> td::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_M_replace<wchar_t *>(std::__normal_iter
> ator<wchar_t *, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, std::__normal_iterato
> r<wchar_t *, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >, wchar_t *, wchar_t *, st
> d::forward_iterator_tag)'
> .libs/libinst-wstring.al(wstringREPIIPP.lo):/usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/
> src/../../../../gcc-2.95.2/libstdc++/bits/string.tcc:54: first defined here
> .libs/libinst-wstring.al(wstringCONPPF2.lo): In function `std::messages_base type_info function':
> /usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/src/../../../../gcc-2.95.2/libstdc++/bits/st
> ring.tcc:54: multiple definition of `wchar_t * std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wcha
> r_t> >::_S_construct<wchar_t *>(wchar_t *, wchar_t *, std::allocator<wchar_t> const &, std::forward_iterator_tag)'
> .libs/libinst-wstring.al(wstringCONPPF.lo):/usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/s
> rc/../../../../gcc-2.95.2/libstdc++/bits/string.tcc:54: first defined here
> .libs/libinst-wstring.al(wstringCOMPARE2.lo): In function `std::messages_base type_info function':
> /usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/src/../../../../gcc-2.95.2/libstdc++/bits/st
> ring.tcc:54: multiple definition of `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::co
> mpare(unsigned int, unsigned int, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const 
> &) const'
> .libs/libinst-wstring.al(wstringCOMPARE.lo):/usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/
> src/../../../../gcc-2.95.2/libstdc++/bits/string.tcc:54: first defined here
> .libs/libinst-wstring.al(wstringCOMPAREP2.lo): In function `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::a
> llocator<wchar_t> >::compare(wchar_t const *) const':
> /usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/src/../../../../gcc-2.95.2/libstdc++/bits/st
> ring.tcc(.text+0x0): multiple definition of `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_
> t> >::compare(wchar_t const *) const'
> .libs/libinst-wstring.al(wstringCOMPAREP.lo)(.text+0x0):/usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gn
> u/libstdc++/src/../../../../gcc-2.95.2/libstdc++/bits/string.tcc: first defined here
> collect2: ld returned 1 exit status
> make[4]: *** [libstdc++.la] Error 1
> make[4]: Leaving directory `/usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++/src'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory `/usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++'
> make[2]: *** [all-recursive-am] Error 2
> make[2]: Leaving directory `/usr/building/libstdc++-devel/gcc-2.95.2.objdir/i686-pc-linux-gnu/libstdc++'
> make[1]: *** [all-target-libstdc++] Error 2
> make[1]: Leaving directory `/usr/building/libstdc++-devel/gcc-2.95.2.objdir'
> make: *** [bootstrap] Error 2
> Command exited with non-zero status 2
> 
> 
> 
> 


More information about the Libstdc++ mailing list