__gnu_cxx error in OpenSolaris

Dennis Clarke dclarke@blastwave.org
Wed May 18 20:32:00 GMT 2011


>
> Hello,
>
> 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
>
> I am using OpenSolaris and both gcc 4.5.4 and 4.6.0 stop with the same
> error.  In the "Platform and Compiler Notes"
>
> 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.  Now, gcc has been configured
> as follows:
>
> $ /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
> Thread model: posix
> gcc version 4.6.0 (GCC)
>
>
> and
> $ 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
> Copyright 2007 Free Software Foundation, Inc.
> This program is free software; you may redistribute it under the terms
> of
> the GNU General Public License version 3 or (at your option) a later
> version.
> This program has absolutely no warranty.
>
> So I am using gld when compiling. I would appreciate and
> comment/suggestion/idea
> that would help me.
>
> Regards,
>
> Apostolos


see http://gcc.gnu.org/gcc-4.6/buildstat.html

for i386-pc-solaris2.8
http://gcc.gnu.org/ml/gcc-testresults/2011-04/msg00175.html

and for sparc-sun-solaris2.8
http://gcc.gnu.org/ml/gcc-testresults/2011-03/msg02959.html

I have had good results for both Sparc and i386/AMD64 with or without gas
( GNU as ) however you must always use Sun provided LD=/usr/ccs/bin/ld if
you want things to work.


-- 
Dennis Clarke
dclarke@opensolaris.ca  <- Email related to the open source Solaris
dclarke@blastwave.org   <- Email related to open source for Solaris




More information about the Gcc-help mailing list