2016-07-03 21 views
1

ラズベリーパイ3のQtライブラリをビルドする際にこのエラーが発生しましたか?ラズベリーパイリンクエラーのQtライブラリを構築中にエラーが発生しました

/ssd/rpi/rpi-tools2/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld.gold: error: /ssd/rpi/tmp/qt-everywhere-opensource-src-5.7.0/qtbase/lib/libqtpcre.a(pcre16_chartables.o): unknown CPU architecture 

私は、このリンク(https://stackoverflow.com/questions/13626726/an-error-building-qt-libraries-for-the-raspberry-pi#=を)読んだが、私はこの上の任意の手掛かりを見つけることができません。

これは私がUbuntuの16.04 ..に

をしようとしているものです、GCC 5.3.1、

ジェシーをマウント

sudo mount -o loop,offset=70254592 /ssd/rpi/2016-05-27-raspbian-jessie.img /mnt/rasp-pi-rootfs/ 

修正ライブラリ・パス

./fixQualifiedLibraryPaths /mnt/rasp-pi-rootfs/ /ssd/rpi/rpi-tools2/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc 

輸出

export RPI_TOOLCHAIN=/ssd/rpi/rpi-tools2/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- 
export RPI_SYSROOT=/mnt/rasp-pi-rootfs 

のconfigure ..

./configure -opengl es2 -c++std 11 -device linux-rpi3-g++ -fontconfig -device-option CROSS_COMPILE=$RPI_TOOLCHAIN -sysroot $RPI_SYSROOT -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt57pi -hostprefix /usr/local/qt57pi -v 

make -j4 

答えて

2

実行して、パラメータで再び "-no-使用-金リンカー" を設定します。

この問題は、ARMv8の金リンカーに関連しているようです。 Makefileを変更して "-fuse-ld = gold"を "-fuse-ld = bfd"に変更しました。 リンクはうまく動作します。

++/qmake.confコメントを確認することができますのlinux-rpi3-VC4-G/qtbase/mkspecs /デバイスで:

# Example configure command below. We disable using the GNU gold 
# linker as it apparently has issues with ARMv8. In the configure 
# output check that "EGLFS GBM .......... yes" is present, otherwise 
# eglfs will not be functional. 
# 
# ./configure -release -opengl es2 -device linux-rpi3-vc4-g++ \ 
# -device-option CROSS_COMPILE=~/raspbian/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- \ 
# -sysroot ~/raspbian/sysroot \ 
# -prefix /usr/local/qt5pi -extprefix ~/raspbian/qt5pi -hostprefix ~/raspbian/qt5 \ 
# -v -nomake examples -nomake tests -no-use-gold-linker 
関連する問題