0

i just managed cross compilation using mac os x 10.12 (Sierra) and qt 5.8 for ARM (rasprerry pi). However it would be too easy if i do not encounter any problems. I create a very simple app, configure enviroment to execute it remotely from qt creator however i still got error once i try to execute:

Cannot load library /usr/local/qt5pi/plugins/platforms/libqeglfs.so: (This platform does not support dynamic libraries.)
QLibraryPrivate::loadPlugin failed on "/usr/local/qt5pi/plugins/platforms/libqeglfs.so" : "Cannot load library /usr/local/qt5pi/plugins/platforms/libqeglfs.so: (This platform does not support dynamic libraries.)"
This application failed to start because it could not find or load the Qt platform plugin "eglfs"
in "".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc.

Reinstalling the application may fix this problem.
Aborted

looks like plugin is properly loaded:

QT_DEBUG_PLUGINS=1 ./testrpi 
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/qt5pi/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/local/qt5pi/plugins/platforms/libqeglfs.so"
Found metadata in lib /usr/local/qt5pi/plugins/platforms/libqeglfs.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "eglfs"
        ]
    },
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 329728
}

but i think this line explains everything:

QLibraryPrivate::loadPlugin failed on "/usr/local/qt5pi/plugins/platforms/libqeglfs.so" : "Cannot load library /usr/local/qt5pi/plugins/platforms/libqeglfs.so: (This platform does not support dynamic libraries.)"

and now my question is - what does it mean "This platform does not support dynamic libraries". How can i make my app working?

ldd shows that all libs exist, strace never shows open with negative resutlt. Im stuck, so any help appreciated!

demonplus
  • 5,613
  • 12
  • 49
  • 68
JosiP
  • 2,619
  • 5
  • 29
  • 33

1 Answers1

-1

Ok problem was in build of qtcorelib, in file qtbase/src/corelib/plugin/qtlibrary_unix.cpp in which flag:

#define QT_NO_DYNAMIC_LIBRARY

was defined and caused all problems. Solution was to do" undef QT_NO_DYNAMIC_LIBRARY just after this define and rebuild qtcore library.

regards J

JosiP
  • 2,619
  • 5
  • 29
  • 33
  • I have the same problem, but your answer doesn't solve it. As far as I can see the file you edited is called "qlibrary_unix.cpp" without the "t". I compiled successfully qtbase with your solution but the problem persists. – Charlie Jun 06 '17 at 19:27