[OpenIndiana-discuss] undefined symbol __gnu_cxx::__pool<true>::_M_reserve_block(unsigned int, unsigned int)
James Carlson
carlsonj at workingcode.com
Thu Oct 31 18:48:28 UTC 2013
On 10/31/13 14:26, Apostolos Syropoulos wrote:
> Hello, I am trying to compile Qt 4.8.5 with g++ 4.7.2 on OpenIndiana/OpenSolaris
> Typically, I get the following error message: Text relocation remains referenced
> against symbol offset in file
> QSqlDriver::qt_static_metacall(QObject*, QMetaObject::Call, int,
> void**) 0x442 .obj/release-shared/moc_qsqldriver.o Note that LFLAGS = -Wl,-R,/opt/gnu/qt4/lib -Wl,-R,/opt/gnu/qt4/lib -shared
> -h libQtSql.so.4 Now when I change -shared to -G linking finishes with no problem. But
> then compilation stops
> with a message like the following one: ndefined first referenced
> symbol in file
> __gnu_cxx::__pool<true>::_M_reserve_block(unsigned int, unsigned int)
> /extra/sources/qt/qt-everywhere-opensource-src-4.8.5/lib/libQtCLucene.so.
> 4
> __gnu_cxx::__pool<true>::_M_get_thread_id()
> /extra/sources/qt/qt-everywhere-opensource-src-4.8.5/lib/libQtCLucene.so.
> 4 Note gcc has been build among others with the following options --without-gnu-ld --with-ld=/usr/ccs/bin/ld --with-gnu-as
> --with-as=/usr/sfw/bin/gas
>
> In the past I solved the same problem by using a gcc that uses the GNU
> ld but this does not work always and it was suggested not to build gcc on
> Solaris this way.
What happens with GNU ld? It sure looks like you're ending up with the
wrong set of system libraries due to the mix of tools involved. Oddly
enough, it looks like you've been here before:
http://gcc.gnu.org/ml/gcc-help/2011-05/msg00245.html
and that the Qt documentation says that for 4.8, they don't even bother
trying on Solaris. (With 4.7, they at least seem to have compiled with
Sun Studio 12, not gcc.)
> So does anybodyhave any idea how to solve this problem? It is a pitty
that one has to struggle to compile something on any version
> of Solaris...
It's not necessarily Solaris. Qt/C++/gcc have been giving other people
fits as well:
http://forums.gentoo.org/viewtopic-t-395044-start-0-postdays-0-postorder-asc-highlight-.html
and even without Qt involved:
http://board.zsnes.com/phpBB3/viewtopic.php?f=3&t=5281
Google's filled with tons of references to this sort of incompatibility,
but is rather sparse on fixes.
I guess the good part about open source is that when it breaks, you get
to keep both pieces.
--
James Carlson 42.703N 71.076W <carlsonj at workingcode.com>
More information about the OpenIndiana-discuss
mailing list