[Interest] QtPlugins statically linked not loading
Nuno Santos
nunosantos at imaginando.pt
Sun May 31 20:18:16 CEST 2015
Thiago,
I understand that it makes no sense. And it makes no sense. But i’m pretty sure this is a static build otherwise I would need to deploy the frameworks inside the bundle and with this build, it isn’t necessary. It’s only complaining about the missing plugins. Now, my confirmation relies on changing qt dir name.
To build the static Qt I have used this line:
configure -prefix /Users/nsantos/Qt/5.4/clang_32_static -platform macx-clang-32 -commercial -release -static -nomake examples -nomake tests -opengl desktop -skip webkit -skip multimedia -D QT_QML_NO_DEBUGGER
Also, on the final qt directory there are no Framework bundles, only static libs as you can see below.
/Users/nsantos/Qt/5.4/clang_32_static/lib
BIGMAC:lib nsantos$ ls -la
total 176024
drwxr-xr-x 123 nsantos staff 4182 29 Mai 22:50 .
drwxr-xr-x 13 nsantos staff 442 29 Mai 21:56 ..
drwxr-xr-x 37 nsantos staff 1258 29 Mai 21:33 cmake
-rw-r--r-- 1 nsantos staff 431936 29 Mai 21:33 libEnginio.a
-rw-r--r-- 1 nsantos staff 885 29 Mai 21:33 libEnginio.la
-rw-r--r-- 1 nsantos staff 1335 29 Mai 21:33 libEnginio.prl
-rw-r--r-- 1 nsantos staff 343024 29 Mai 21:33 libQt5Bluetooth.a
-rw-r--r-- 1 nsantos staff 836 29 Mai 21:33 libQt5Bluetooth.la
-rw-r--r-- 1 nsantos staff 1577 29 Mai 21:33 libQt5Bluetooth.prl
-rw-r--r-- 1 nsantos staff 2342056 29 Mai 21:32 libQt5Bootstrap.a
-rw-r--r-- 1 nsantos staff 673 29 Mai 21:32 libQt5Bootstrap.la
-rw-r--r-- 1 nsantos staff 1112 29 Mai 21:32 libQt5Bootstrap.prl
-rw-r--r-- 1 nsantos staff 2251760 29 Mai 21:33 libQt5CLucene.a
-rw-r--r-- 1 nsantos staff 830 29 Mai 21:33 libQt5CLucene.la
-rw-r--r-- 1 nsantos staff 1278 29 Mai 21:33 libQt5CLucene.prl
-rw-r--r-- 1 nsantos staff 20760 29 Mai 21:32 libQt5Concurrent.a
-rw-r--r-- 1 nsantos staff 839 29 Mai 21:32 libQt5Concurrent.la
-rw-r--r-- 1 nsantos staff 1273 29 Mai 21:32 libQt5Concurrent.prl
-rw-r--r-- 1 nsantos staff 7963752 29 Mai 21:32 libQt5Core.a
BIGMAC:QtQuick.2 nsantos$ pwd
/Users/nsantos/Qt/5.4/clang_32_static/qml/QtQuick.2
BIGMAC:QtQuick.2 nsantos$ ls -la
total 464
drwxr-xr-x 6 nsantos staff 204 29 Mai 21:33 .
drwxr-xr-x 14 nsantos staff 476 29 Mai 23:04 ..
-rw-r--r-- 1 nsantos staff 6408 29 Mai 21:33 libqtquick2plugin.a
-rw-r--r-- 1 nsantos staff 1339 29 Mai 21:33 libqtquick2plugin.prl
-rw-r--r-- 1 nsantos staff 220578 29 Mai 21:33 plugins.qmltypes
-rw-r--r-- 1 nsantos staff 106 29 Mai 21:33 qmldir
BIGMAC:QtQuick.2 nsantos$
When the linking of the plugin takes places, this is the output:
rm -f libdrc.dylib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -arch i386 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -stdlib=libc++ -mmacosx-version-min=10.7 -single_module -dynamiclib -o libdrc.dylib audioeffect.o audioeffectx.o vstplugmain.o IVstWrapper.o qrc_qml.o qrc_resources.o moc_IVstWrapper.o /Users/nsantos/Qt/5.4/clang_32_static/qml/QtQuick.2/libqtquick2plugin.a -L/Users/nsantos/Qt/5.4/clang_32_static/lib -framework DiskArbitration -framework IOKit -framework ApplicationServices -framework CoreServices -framework CoreFoundation -framework Foundation -framework Cocoa -framework OpenGL -framework AGL -framework Security -framework SystemConfiguration /Users/nsantos/Qt/5.4/clang_32_static/qml/QtQuick/Window.2/libwindowplugin.a /Users/nsantos/Qt/5.4/clang_32_static/qml/QtQuick/Controls/libqtquickcontrolsplugin.a -framework Carbon -lQt5Quick -lQt5Qml -lQt5Network -L/Users/nsantos/Qt/5.4/clang_32_static/plugins/platforms -lqcocoa -lcups -lQt5PlatformSupport -lQt5PrintSupport -lQt5Widgets -lQt5Gui -lqtharfbuzzng -lQt5Core -lz -lm
mv -f libdrc.dylib /Users/nsantos/Dropbox/workspace/drc/vst/../vstbuild/32/drc.vst/Contents/MacOS/drc
I have tried to use static and staticlib options on qmake CONFIG variable, but the resulting plugin must be dynamically loaded and not a static lib.
I’m on a dead lock here… :/
Nuno
> On 31/05/2015, at 19:03, Thiago Macieira <thiago.macieira at intel.com> wrote:
>
> On Saturday 30 May 2015 17:58:00 Nuno Santos wrote:
>> Exactly Thiago!
>>
>> Why isn't it able to locate the plugins then on other machines then?
>
> The problem is that you're asking that question.
>
> Static builds of Qt don't look for plugins because they can't load plugins.
> The fact tat you're asking about loading of plugins in a static builds and the
> fact that the absence of loadable plugin files has any effect indicates that you
> don't have a static build of Qt.
>
> So please go back to the beginning and check whether you have a static build.
> If you do, there should be no loadable files and the application shouldn't
> search for them.
>
> If you want to keep using a dynamic build, then you need to deploy the plugins
> on all machines and figure out a way to tell the application where they are.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
> Software Architect - Intel Open Source Technology Center
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
More information about the Interest
mailing list