http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58012
Bug ID: 58012 Summary: Gcc bootstrap failed with cloog-isl: undefined reference to std::istream::ignore(long) Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: goughost at yahoo dot com.cn ../gcc-4.8.1/libstdc++-v3/src/c++98/istream.cc:116: error: undefined reference to 'std::istream::ignore(long)' ../gcc-4.8.1/libstdc++-v3/src/c++98/istream.cc:521: error: undefined reference to 'std::basic_istream<wchar_t, std::char_traits<wchar_t> >::ignore(long)' Build failed with system cloog/isl (version 0.18.0 and 0.11.1), when making cc1 in ./gcc/ in stage2. Without cloog/isl, build is ok. It's configured this way: ../gcc-4.8.1/configure --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-lto --disable-multilib --enable-shared --disable-static --enable-__cxa_atexit --enable-threads=posix --enable-languages=c,c++,fortran --enable-plugin --with-system-zlib When making cc1, `-static-libstdc++' is passed to bootstrap compiler, and `libstdc++.a' (a copy of `libstdc++convenience.a') is used. On the other hand, `libstdc++convenience.a' is an incomplete library. At least `std::istream::ignore(long)' (in compatibility.cc) is not included. Without cloog/isl, linking succeeds, since no linked object refers to istream. With cloog/isl, graphite*.c files includes isl headers. In <isl/int.h>, there is a function: `std::ostream &operator<<(std::ostream &os, isl_int i)'. Remove this function definition, recompile graphite*.c, and link: succeed. I'm not sure whether this is a bug in Gcc or there's something wrong with my compile environment.