[Bug bootstrap/92733] New: linker errors for missing std::__alloc_on_move with a cross-compiler

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Nov 29 18:42:00 GMT 2019


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

            Bug ID: 92733
           Summary: linker errors for missing std::__alloc_on_move with a
                    cross-compiler
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

Building a cross-compiler (for all targets I've tried) fails with linker errors
like those below:

/build/gcc-svn/gcc/xg++ -B /build/gcc-svn/gcc -nostdinc++ -I
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu -I
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include -I
/src/gcc/svn/libstdc++-v3/libsupc++ -I
/src/gcc/svn/libstdc++-v3/include/backward -L
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -no-pie   -O0 -g3
-DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -static-libstdc++
-static-libgcc  -o cc1 c/c-lang.o c-family/stub-objc.o attribs.o c/c-errors.o
c/c-decl.o c/c-typeck.o c/c-convert.o c/c-aux-info.o c/c-objc-common.o
c/c-parser.o c/c-fold.o c/gimple-parser.o c-family/c-common.o
c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o
c-family/c-gimplify.o c-family/c-indentation.o c-family/c-lex.o
c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o
c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o
c-family/c-ada-spec.o c-family/c-ubsan.o c-family/known-headers.o
c-family/c-attribs.o c-family/c-warn.o c-family/c-spellcheck.o glibc-c.o
rs6000-c.o \
  cc1-checksum.o libbackend.a main.o libcommon-target.a libcommon.a
../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a
../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a 
-L/ssd/build/powerpc64le-linux/gcc-svn/./isl/.libs  -lisl
-L/ssd/build/powerpc64le-linux/gcc-svn/./gmp/.libs
-L/ssd/build/powerpc64le-linux/gcc-svn/./mpfr/src/.libs
-L/ssd/build/powerpc64le-linux/gcc-svn/./mpc/src/.libs -lmpc -lmpfr -lgmp
-rdynamic -ldl  -L./../zlib -lz 
/usr/bin/ld:
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.a(string-inst.o):
in function `std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::operator=(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >&&)':
/ssd/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:716:
undefined reference to `void std::__alloc_on_move<std::allocator<char>
>(std::allocator<char>&, std::allocator<char>&)'
/usr/bin/ld:
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.a(string-inst.o):
in function `std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >::assign(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)':
/ssd/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:1363:
undefined reference to `void std::__alloc_on_copy<std::allocator<char>
>(std::allocator<char>&, std::allocator<char> const&)'
/usr/bin/ld:
/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.a(string-inst.o):
in function `__gnu_cxx::__alloc_traits<std::allocator<char>,
char>::_S_on_swap(std::allocator<char>&, std::allocator<char>&)':
/ssd/build/gcc-svn/x86_64-pc-linux-gnu/libstdc++-v3/include/ext/alloc_traits.h:101:
undefined reference to `void std::__alloc_on_swap<std::allocator<char>
>(std::allocator<char>&, std::allocator<char>&)'
collect2: error: ld returned 1 exit status
make[2]: *** [/src/gcc/svn/gcc/c/Make-lang.in:85: cc1] Error 1
make[2]: Leaving directory '/ssd/build/powerpc64le-linux/gcc-svn/gcc'
make[1]: *** [Makefile:4370: all-gcc] Error 2
make[1]: Leaving directory '/ssd/build/powerpc64le-linux/gcc-svn'
make: *** [Makefile:966: all] Error 2
make: Leaving directory '/ssd/build/powerpc64le-linux/gcc-svn'
Command exited with non-zero status 2


More information about the Gcc-bugs mailing list