我試圖交叉編譯QT爲Debian下拉伸樹莓PI 3,但是當我用make -j4
編譯QT,它提供了以下錯誤:未定義的參考`dlsym進行」
$ make -j4>log
/home/charlie/Rpi/qt5/qtbase/lib/libQt5EglSupport.a(qeglplatformcontext.o): In function `QEGLPlatformContext::getProcAddress(char const*)':
qeglplatformcontext.cpp:(.text+0xa4): undefined reference to `dlsym'
collect2: error: ld returned 1 exit status
make[5]: *** [../../../../plugins/platforms/libqminimalegl.so] Error 1
make[4]: *** [sub-minimalegl-make_first] Error 2
make[4]: *** Waiting for unfinished jobs....
/home/charlie/Rpi/qt5/qtbase/lib/libQt5EglSupport.a(qeglplatformcontext.o): In function `QEGLPlatformContext::getProcAddress(char const*)':
qeglplatformcontext.cpp:(.text+0xa4): undefined reference to `dlsym'
collect2: error: ld returned 1 exit status
make[6]: *** [../../../../lib/libQt5EglFSDeviceIntegration.so.5.8.1] Error 1
make[5]: *** [sub-eglfsdeviceintegration-pro-make_first-ordered] Error 2
make[4]: *** [sub-eglfs-make_first] Error 2
make[3]: *** [sub-platforms-make_first] Error 2
make[2]: *** [sub-plugins-make_first] Error 2
make[1]: *** [sub-src-make_first] Error 2
make: *** [module-qtbase-make_first] Error 2
我已閱讀很多類似的帖子包含相同的dlsym錯誤,我嘗試瞭解決方案中給出的解決方案,但目前還沒有運氣。我一直在進行,因爲它在here中顯示,直到現在我仍然懷疑lib目錄中的符號鏈接。
當我運行sudo file * | grep broken
時,即使運行腳本來修復符號鏈接(如sudo),也會報告2個符號鏈接被破壞。
libblas.so.3gf: broken symbolic link to /etc/alternatives/libblas.so.3gf
liblapack.so.3gf: broken symbolic link to /etc/alternatives/liblapack.so.3gf
如下./configure的執行:
./fixQualifiedLibraryPaths /mnt/raspberry-rootfs/ ~/Rpi/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-gcc
,似乎被打破下面列出的符號鏈接
./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/Rpi/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/raspberry-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi
難道你們可以點我什麼我我在做什麼?
PD:我還安裝了libncurses5和lib32z1,我通過git克隆獲得了qt。
你克隆了什麼版本的Qt? – eyllanesc
我克隆了QT的GIT倉庫,所以我認爲它應該是5.8。我也試過5.7.1,並沒有工作。 – Charlie
我遵循以下[教程](https://wiki.qt.io/RaspberryPi2EGLFS),我沒有任何問題。 – eyllanesc