Solved Qt on Raspberry relocation error
-
Hi,
I cross-compiled Qt 5.11 for Raspian Stretch. When trying out my qt application I get the following error:
./myprog: relocation error: /usr/local/qt5pi/lib/libQt5Quick.so.5: symbol _ZNK14QWindowPrivate12shareContextEv, version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time referencewhat is the problem?
-
@maxwell31
you should at least show the configure call of your cross compilation -
./configure -release -opengl es2 -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=/home/username/raspberry/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /home/username/raspberry/sysroot/ -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /home/username/raspberry/qt5pi -hostprefix /home/username/raspberry/qt5pi_host -v
-
@maxwell31
where is your-xplatform
parameter. i guess you are not compiling on an ARM device, since you are cross compiling?!
See this -
I was compiling under Ubuntu 16.04.
Hm, the error went away after setting
export LD_LIBRARY_PATH=/usr/local/qt5pi/lib/I don't understand why this was necessary, as ldd already reported that it found the shared objects.
Now I get the following error:
QQmlApplicationEngine failed to load component
qrc:/main.qml:4 module "QtQuick.Controls" is not installed -
Hi,
Did you copy your cross-compiled version of Qt on your target ?
-
Ok :-)
During make install my disk ran out of space and I did not notice the error and only copied a partial qt install
-
it is working fine now
-
Great !
Since you have it working now, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)