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++/42377] New: libstdc++.dll.a misses a definition of std::string::reserve


Even though libstdc++-6.dll has: 000000006fc94700 T
std::string::reserve(unsigned long long),
libstdc++.dll.a misses a definition of std::string::reserve!

Which makes it impossible to build libgmpxx against a shared version of
libstdc++-6, see:

/bin/sh ./libtool --mode=link g++  -O2 -pedantic -m64 -mtune=k8   -o
libgmpxx.la -rpath /home/rainer/tmp/install/lib -no-undefined
-Wl,--export-all-symbols -Wl,--output-def,.libs/libgmp-3.dll.def
-Wl,--output-def,.libs/libgmpxx-3.dll.def -version-info 5:0:1 dummy.lo
cxx/isfuns.lo cxx/ismpf.lo cxx/ismpq.lo cxx/ismpz.lo cxx/ismpznw.lo
cxx/osdoprnti.lo cxx/osfuns.lo cxx/osmpf.lo cxx/osmpq.lo cxx/osmpz.lo libgmp.la 
rm -fr  .libs/libgmpxx.dll.a
g++ -shared -nostdlib
c:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.5.0/../../../../x86_64-w64-mingw32/lib/dllcrt2.o
c:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.5.0/../../../../x86_64-w64-mingw32/lib/crtbegin.o
 .libs/dummy.o cxx/.libs/isfuns.o cxx/.libs/ismpf.o cxx/.libs/ismpq.o
cxx/.libs/ismpz.o cxx/.libs/ismpznw.o cxx/.libs/osdoprnti.o cxx/.libs/osfuns.o
cxx/.libs/osmpf.o cxx/.libs/osmpq.o cxx/.libs/osmpz.o  ./.libs/libgmp.dll.a
-Lc:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.5.0
-Lc:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../lib/gcc
-Lc:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.5.0/../../../../lib64
-Lc:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.5.0/../../../../x86_64-w64-mingw32/lib
-Lc:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.5.0/../../..
-Lc:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../../mingw/mingw/lib
/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/lib/../lib64/libstdc++.dll.a
-L/home/rainer/software/build/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/gcc-4.5.0-bootstrap/x86_64-w64-mingw32/libstdc++-v3/src
-L/home/rainer/software/build/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/gcc-4.5.0-bootstrap/x86_64-w64-mingw32/libstdc++-v3/src/.libs
-L/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/x86_64-w64-mingw32/lib
-L/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/mingw/lib
-lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32
-ladvapi32 -lshell32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt
c:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.5.0/../../../../x86_64-w64-mingw32/lib/crtend.o
 -m64 -mtune=k8 -Wl,--export-all-symbols -Wl,--output-def
-Wl,.libs/libgmp-3.dll.def -Wl,--output-def -Wl,.libs/libgmpxx-3.dll.def -o
.libs/libgmpxx-4.dll -Wl,--enable-auto-image-base -Xlinker --out-implib
-Xlinker .libs/libgmpxx.dll.a
Info: resolving std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::_Rep::_S_empty_rep_storage by linking to
__imp___ZNSs4_Rep20_S_empty_rep_storageE (auto-import)
Creating library file:
.libs/libgmpxx.dll.ac:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
warning: auto-importing has been activated without --enable-auto-import
specified on the command line.
This should work unless it involves constant data structures referencing
symbols from auto-imported DLLs.
cxx/.libs/isfuns.o:isfuns.cc:(.text+0x180): undefined reference to
`std::string::reserve(unsigned long long)'
cxx/.libs/isfuns.o:isfuns.cc:(.text+0x228): undefined reference to
`std::string::reserve(unsigned long long)'
cxx/.libs/isfuns.o:isfuns.cc:(.text+0x2a8): undefined reference to
`std::string::reserve(unsigned long long)'
cxx/.libs/ismpf.o:ismpf.cc:(.text+0x2f8): undefined reference to
`std::string::reserve(unsigned long long)'
cxx/.libs/ismpf.o:ismpf.cc:(.text+0x3a7): undefined reference to
`std::string::reserve(unsigned long long
)'
/bin/sh ./libtool --mode=link g++  -O2 -pedantic -m64 -mtune=k8   -o
libgmpxx.la -rpath /home/rainer/tmp/install/lib -no-undefined
-Wl,--export-all-symbols -Wl,--output-def,.libs/libgmp-3.dll.def
-Wl,--output-def,.libs/libgmpxx-3.dll.def -version-info 5:0:1 dummy.lo
cxx/isfuns.lo cxx/ismpf.lo cxx/ismpq.lo cxx/ismpz.lo cxx/ismpznw.lo
cxx/osdoprnti.lo cxx/osfuns.lo cxx/osmpf.lo cxx/osmpq.lo cxx/osmpz.lo libgmp.la 
rm -fr  .libs/libgmpxx.dll.a
g++ -shared -nostdlib
c:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.5.0/../../../../x86_64-w64-mingw32/lib/dllcrt2.o
c:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.5.0/../../../../x86_64-w64-mingw32/lib/crtbegin.o
 .libs/dummy.o cxx/.libs/isfuns.o cxx/.libs/ismpf.o cxx/.libs/ismpq.o
cxx/.libs/ismpz.o cxx/.libs/ismpznw.o cxx/.libs/osdoprnti.o cxx/.libs/osfuns.o
cxx/.libs/osmpf.o cxx/.libs/osmpq.o cxx/.libs/osmpz.o  ./.libs/libgmp.dll.a
-Lc:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.5.0
-Lc:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../lib/gcc
-Lc:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.5.0/../../../../lib64
-Lc:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.5.0/../../../../x86_64-w64-mingw32/lib
-Lc:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.5.0/../../..
-Lc:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../../mingw/mingw/lib
/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/lib/../lib64/libstdc++.dll.a
-L/home/rainer/software/build/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/gcc-4.5.0-bootstrap/x86_64-w64-mingw32/libstdc++-v3/src
-L/home/rainer/software/build/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/gcc-4.5.0-bootstrap/x86_64-w64-mingw32/libstdc++-v3/src/.libs
-L/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/x86_64-w64-mingw32/lib
-L/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/mingw/lib
-lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32
-ladvapi32 -lshell32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt
c:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.5.0/../../../../x86_64-w64-mingw32/lib/crtend.o
 -m64 -mtune=k8 -Wl,--export-all-symbols -Wl,--output-def
-Wl,.libs/libgmp-3.dll.def -Wl,--output-def -Wl,.libs/libgmpxx-3.dll.def -o
.libs/libgmpxx-4.dll -Wl,--enable-auto-image-base -Xlinker --out-implib
-Xlinker .libs/libgmpxx.dll.a
Info: resolving std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::_Rep::_S_empty_rep_storage by linking to
__imp___ZNSs4_Rep20_S_empty_rep_storageE (auto-import)
Creating library file:
.libs/libgmpxx.dll.ac:/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.5.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
warning: auto-importing has been activated without --enable-auto-import
specified on the command line.
This should work unless it involves constant data structures referencing
symbols from auto-imported DLLs.
cxx/.libs/isfuns.o:isfuns.cc:(.text+0x180): undefined reference to
`std::string::reserve(unsigned long long)'
cxx/.libs/isfuns.o:isfuns.cc:(.text+0x228): undefined reference to
`std::string::reserve(unsigned long long)'
cxx/.libs/isfuns.o:isfuns.cc:(.text+0x2a8): undefined reference to
`std::string::reserve(unsigned long long)'
cxx/.libs/ismpf.o:ismpf.cc:(.text+0x2f8): undefined reference to
`std::string::reserve(unsigned long long)'
cxx/.libs/ismpf.o:ismpf.cc:(.text+0x3a7): undefined reference to
`std::string::reserve(unsigned long long
)'


beyond that libstdc++.la on *-*-mingw32 has strange dependency_libs definition.
For x86_64-w64-mingw32:
# Libraries that this one depends upon.
dependency_libs='
-L/home/rainer/software/build/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0/gcc-4.5.0-bootstrap/x86_64-w64-mingw32/libstdc++-v3/src
-L/home/rainer/software/build/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0/gcc-4.5.0-bootstrap/x86_64-w64-mingw32/libstdc++-v3/src/.libs
-L/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0/mingw/x86_64-w64-mingw32/lib
-L/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0/mingw/mingw/lib'

Which contains build locations!

On my linux system dependency_libs is empty:
# Libraries that this one depends upon.
dependency_libs=''
what I think is right.

this is for trunk rev. 155209

gcc build with static gmp, mpfr, mpc , ppl, cloog and libelf.

configure:
../../../../../../src/gcc-4.5.0/configure
- --prefix=/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw
- --with-sysroot=/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw
- --with-gmp=/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw
- --with-mpfr=/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw
- --with-mpc=/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw
- --with-ppl=/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw
- --with-cloog=/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw
- --with-libelf=/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw
- --with-gnu-as
-
--with-as=/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/as.exe
- --with-gnu-ld
-
--with-ld=/mingw/x86_64-w64/x86_64-w64/x86_64-w64/gcc-4.5.0-test/mingw/bin/ld.exe
- --enable-bootstrap --enable-threads=win32 --enable-languages=c,c++
- --enable-checking=release --disable-werror --disable-multilib
- --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32
--target=x86_64-w64-mingw32

Rainer


-- 
           Summary: libstdc++.dll.a misses a definition of
                    std::string::reserve
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rainer at emrich-ebersheim dot de
 GCC build triplet: x86_64-w64-mingw32
  GCC host triplet: x86_64-w64-mingw32
GCC target triplet: x86_64-w64-mingw32


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


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