[Interest] Bug when building Qt statically? Undefined symbols for architecture i386: "QTcpServerConnection::QTcpServerConnection()"

Thiago Macieira thiago.macieira at intel.com
Sat May 30 01:21:27 CEST 2015


On Friday 29 May 2015 22:46:22 Nuno Santos wrote:
> Hi,
> 
> I have been faced with this problem on Windows and now I have the same
> problem on Mac OSX. This happens when I build Qt statically
> 
> Undefined symbols for architecture i386:
>   "QTcpServerConnection::QTcpServerConnection()", referenced from:
>       QQmlDebugServerThread::run() in libQt5Qml.a(qqmldebugserver.o)
> ld: symbol(s) not found for architecture i386
> 
> My quick workaround is to configure with QT_QML_NO_DEBUGGER
> 
> I haven’t dig deeper to understand the exact problem.
> 
> Should I report this as a bug?

Yes. The use of QTcpServerConnection appears intentional in static builds:

#if defined(QT_STATIC) && ! defined(QT_NO_QML_DEBUGGER)
    QQmlDebugServerConnection *connection
            = new QTcpServerConnection;
#else
    QQmlDebugServerConnection *connection
            = server->d_func()->loadConnectionPlugin(m_pluginName);
#endif

Probably because of the lack of plugins in static builds.

But QTcpServerConnection is not provided inside QtQml. It's still in the 
plugin (src/plugins/qmltooling/qmldbg_tcp) and I don't see anything in QtQml 
making the inclusion of that code.

So, yes, this is a bug. The QML TCP debugger should be built into QtQml if the 
static code tries to use it.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list