【问题标题】:An error building Qt libraries for the raspberry pi linking error为树莓派链接错误构建 Qt 库时出错
【发布时间】:2016-07-03 01:55:57
【问题描述】:

在为 raspberry pi 3 构建 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 -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 

【问题讨论】:

    标签: qt


    【解决方案1】:

    使用参数“-no-use-gold-linker”再次运行配置。

    问题似乎与带有 ARMv8 的黄金链接器有关。我已经更改了一个 Makefile 进行测试,将“-fuse-ld=gold”更改为“-fuse-ld=bfd”。 链接运行良好。

    在 qtbase/mkspecs/devices/linux-rpi3-vc4-g++/qmake.conf 你可以检查 cmets:

    # 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
    

    【讨论】:

      猜你喜欢
      • 2012-11-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-08
      • 1970-01-01
      • 2015-02-13
      相关资源
      最近更新 更多