On Wed, 18 May 2011, asyropoulos@xxxxxxx wrote:
I am trying to build the latest Qt (v. 4.7.3) with gcc but it fails and stops
with the following error message:
/extra/sources/qt/qt-everywhere-opensource-src-4.7.3/lib/libQtCLucene.so.
4: undefined reference to `__gnu_cxx::__pool<true>::_M_initialize()'
/extra/sources/qt/qt-everywhere-opensource-src-4.7.3/lib/libQtCLucene.so.
4: undefined reference to `std::_List_node_base::_M_unhook()'
/extra/sources/qt/qt-everywhere-opensource-src-4.7.3/lib/libQtCLucene.so.
4: undefined reference to `__gnu_cxx::__pool<true>::_M_get_thread_id()'
/extra/sources/qt/qt-everywhere-opensource-src-4.7.3/lib/libQtCLucene.so.
4: undefined reference to `__gnu_cxx::__pool<true>::_M_reclaim_block(char*,
unsigned int)'
/extra/sources/qt/qt-everywhere-opensource-src-4.7.3/lib/libQtCLucene.so.
4: undefined reference to `__gnu_cxx::__pool<true>::_M_reserve_block(unsigned
int, unsigned int)'
/extra/sources/qt/qt-everywhere-opensource-src-4.7.3/lib/libQtCLucene.so.
4: undefined reference to
`std::_List_node_base::_M_hook(std::_List_node_base*)'
collect2: ld returned 1 exit status
make: *** [../../../../bin/assistant] Error 1
Try locating all files named libstdc++.*, there may be an older one being
picked up first.
http://doc.qt.nokia.com/4.7-snapshot/platform-notes-x11.html
it is advised that on Solaris one should use GNU ld/as and not the Solaris
ld/as.
Whereas gcc recommends using Sun ld ;-)
$ /opt/gcc-4.6.0/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/opt/gcc-4.6.0/bin/gcc
COLLECT_LTO_WRAPPER=/opt/gcc-4.6.0/libexec/gcc/i386-pc-solaris2.11/4.6.0/
lto-wrapper
Target: i386-pc-solaris2.11
Configured with: ../gcc-4.6.0/configure --prefix=/opt/gcc-4.6.0
--enable-shared --enable-static
--disable-libtool-lock --target= --enable-objc-gc --disable-libada
--enable-libssp
--enable-languages=c,c++,fortran,go,objc,obj-c++ --enable-threads=posix
--enable-tls=yes --with-system-zlib --without-gnu-ld
--with-ld=/usr/ccs/bin/ld
--with-gnu-as --with-as=/usr/sfw/bin/gas --with-gmp-lib=/usr/lib
--with-mpfr-lib=/usr/lib
--enable-c99 --enable-nls --enable-wchar_t --enable-libstdcxx-allocator=mt
--with-pic --enable-multilib
Wow, that's a long line...
$ ls -l /usr/ccs/bin/ld
lrwxrwxrwx 1 root root 12 2010-10-02 15:41 /usr/ccs/bin/ld -> ../../bin/ld
$ /usr/bin/ld --version
GNU ld (GNU Binutils) 2.19
On Solaris, really? Did you overwrite the system one?
(--without-gnu-ld doesn't fit that well with using gnu ld)
--
Marc Glisse