[Bug libstdc++/58514] New: Undefined symbol in libstdc++.so starting with rev 202818

pthaugen at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Sep 23 21:09:00 GMT 2013


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

            Bug ID: 58514
           Summary: Undefined symbol in libstdc++.so starting with rev
                    202818
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pthaugen at gcc dot gnu.org
                CC: bergner at gcc dot gnu.org, dje at gcc dot gnu.org,
                    ppluzhnikov at google dot com
              Host: powerpc64-linux
            Target: powerpc64-linux
             Build: powerpc64-linux

First noticed when cpu2000 benchmark 252.eon failed to build. Can reproduce
with simple Hello world. Only occurs for 32-bit compile. Bisected to r202818.


[pthaugen@igoo ~/temp]$ cat Hello.C
#include <iostream>
using namespace std;
int main()
{
  cout << "Hello World!" << endl;
  return 0;
}
[pthaugen@igoo ~/temp]$ ~/install/gcc/trunk_work/bin/g++ -m64 Hello.C
[pthaugen@igoo ~/temp]$ a.out
Hello World!
[pthaugen@igoo ~/temp]$ ~/install/gcc/trunk_work/bin/g++ -m32 Hello.C
/home/pthaugen/install/gcc/trunk_work/lib/gcc/powerpc64-linux/4.9.0/../../../../lib/libstdc++.so:
undefined reference to `int std::__int_to_char<char, unsigned int>(char*,
unsigned int, char const*, std::_Ios_Fmtflags, bool)'
collect2: error: ld returned 1 exit status



The undefined symbol comes from the added file snprintf_lite.cc

[pthaugen@igoo c++11]$ pwd
/home/pthaugen/work/build/gcc/trunk_work/powerpc64-linux/32/libstdc++-v3/src/c++11
[pthaugen@igoo c++11]$ nm -u snprintf_lite.o | grep int_to_char
         U _ZSt13__int_to_charIcjEiPT_T0_PKS0_St13_Ios_Fmtflagsb


Configure flags for build:
Configured with: /home/pthaugen/src/gcc/trunk_work/gcc/configure
--prefix=/home/pthaugen/install/gcc/trunk_work --target=powerpc64-linux
--host=powerpc64-linux --build=powerpc64-linux --enable-secureplt
--enable-threads=posix --enable-shared --enable-__cxa_atexit
--with-long-double-128 --enable-decimal-float --disable-alsa --enable-checking
--with-lto --with-as=/home/bergner/binutils/install/binutils-power8/bin/as
--with-ld=/home/bergner/binutils/install/binutils-power8/bin/ld
--with-gmp=/home/pthaugen/install/gcc-host-libs
--with-mpfr=/home/pthaugen/install/gcc-host-libs
--with-mpc=/home/pthaugen/install/gcc-host-libs --without-ppl --without-cloog
--enable-languages=c,fortran,c++ --disable-bootstrap



More information about the Gcc-bugs mailing list