[Interest] Qt 4.8.6 static UB failing due to "global weak symbol vtable"

Bob Hood bhood2 at comcast.net
Wed Jun 11 01:48:58 CEST 2014


Sorry to dredge this up again, but I posted about this last January, and I
don't think (or recall) that I ever got a usable answer.  I'm running into it
again.

I'm building Qt 4.8.6 static UB under OS X using Xcode 4.x:

i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658)
(LLVM build 2336.11.00)).

My Qt configure line is:

./configure -opensource -confirm-license -static -fast -cocoa -sdk
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
-arch i386 x86_64 -prefix /usr/local/qt/4.8.6/macx_static -nomake examples
-nomake demos -openssl -I /Users/bob/openssl_macx_101h/include -L
/Users/bob/openssl_macx_101h/lib

I'm getting a link error with Assistant:

ld: warning: directory not found for option
'-L/usr/local/qt/4.8.6/macx_static/plugins/sqldrivers'
ld: warning: directory not found for option
'-L/usr/local/qt/4.8.6/macx_static/plugins/sqldrivers'
ld: bad codegen, pointer diff in
fulltextsearch::clucene::QHelpSearchIndexReaderClucene::run()     to global
weak symbol vtable for QtSharedPointer::ExternalRefCountDatafor architecture i386
collect2: ld returned 1 exit status

Google isn't turning up much that is helpful.  I've tried various combinations
of the "visibility" flags, as that's about all that's turning up, and it isn't
helping.

Any suggestions, insights, or perhaps is there a configure flag to disable
building Assistant (and any other part of the system that will give me this
problem)?

And, yes, I am deliberately building static, so "-static" is not an accident.



More information about the Interest mailing list