openwrt / video

56 stars 43 forks source link

Cannot load qt5 driver #1

Closed darcyg closed 9 years ago

darcyg commented 9 years ago

hi Compiling and testing:

root@OpenWrt:/usr/lib/qt5/examples/corelib/threads/mandelbrot# ./mandelbrot
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/qt5/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt5/plugins/platforms/libqlinuxfb.so"
QElfParser: '/usr/lib/qt5/plugins/platforms/libqlinuxfb.so' is an invalid ELF object (shstrtab section header seems to be at 0)
"'/usr/lib/qt5/plugins/platforms/libqlinuxfb.so' is an invalid ELF object (shstrtab section header seems to be at 0)"
         not a plugin
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt5/plugins/platforms/libqminimal.so"
QElfParser: '/usr/lib/qt5/plugins/platforms/libqminimal.so' is an invalid ELF object (shstrtab section header seems to be at 0)
"'/usr/lib/qt5/plugins/platforms/libqminimal.so' is an invalid ELF object (shstrtab section header seems to be at 0)"
         not a plugin
QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt5/plugins/platforms/libqoffscreen.so"
QElfParser: '/usr/lib/qt5/plugins/platforms/libqoffscreen.so' is an invalid ELF object (shstrtab section header seems to be at 0)
"'/usr/lib/qt5/plugins/platforms/libqoffscreen.so' is an invalid ELF object (shstrtab section header seems to be at 0)"
         not a plugin
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/qt5/examples/corelib/threads/mandelbrot/platforms" ...
This application failed to start because it could not find or load the Qt platform plugin "minimal".

Reinstalling the application may fix this problem.
Aborted

How to solve?

mirko commented 9 years ago

You need to specify which platform driver to use - e.g. via the environment variable QT_QPA_PLATFORM ( QT_QPA_PLATFORM=linuxfb ./a.out )

darcyg commented 9 years ago

hi, mirko: I execute QT_QPA_PLATFORM=linuxfb ./a.out or ./a.out -platform Linux -display "LinuxFb:/dev/fb0". message say, load .so file not an invalid ELF object info

QFactoryLoader::QFactoryLoader() looking at "/usr/lib/qt5/plugins/platforms/libqlinuxfb.so"
QElfParser: '/usr/lib/qt5/plugins/platforms/libqlinuxfb.so' is an invalid ELF object (shstrtab section header seems to be at 0)
"'/usr/lib/qt5/plugins/platforms/libqlinuxfb.so' is an invalid ELF object (shstrtab section header seems to be at 0)"
         not a plugin

why?

darcyg commented 9 years ago

My hardware is CPU Intel x86 Celeron 1037u. 2G DDR and 16G SSD disk

mirko commented 9 years ago

Please disable "sstrip" (just use "strip" or "none") and recompile the according shared object files (or in doubt whole Qt). sstrip strips out information which are needed for those shared object plugins being loaded correctly. The stripping method can be changed in menuconfig under "Global build options"

darcyg commented 9 years ago

thanks ! is ok now