qmake 找不到正确的 mkspec

问题描述 投票:0回答:0

我正在尝试使用我刚刚从开源编译的 qmake。我在 RH9 主机上编译,为 arm64 构建它,这样我就可以为 Raspberry 交叉编译。当我运行以下配置时,我的密码是 /raspi/build:

../qt-everywhere-src-6.5.0/configure -release -no-opengl -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=/raspi/arm-gnu-toolchain-12.2.mpacbti-rel1-x86_64-arm-none-eabi/bin/arm-none-eabi- -sysroot /raspi/sysroot -opensource -confirm-license -skip qtwayland -skip qtlocation -skip qtscript -make libs -prefix /raspi/qt6 -no-use-gold-linker -no-gbm

应该将编译后的代码放入/raspi/qt6/bin/qmake。所以现在当我使用 /raspi/qt6/bin/qmake 为我的测试程序创建我的 makefile 时得到这个错误:

Info: creating stash file /tmp/myapp/bin/debug/.qmake.stash
Project ERROR: Cannot run compiler 'g++'. Output:
===================
Using built-in specs.
COLLECT_GCC=g++
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
g++: error: unrecognized command-line option '-mfpu=crypto-neon-fp-armv8'
g++: error: unrecognized command-line option '-mfloat-abi=hard'
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-host-pie --enable-host-bind-now --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugs.almalinux.org/ --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --without-isl --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_64=x86-64-v2 --with-arch_32=x86-64 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.3.1 20220421 (Red Hat 11.3.1-2) (GCC)
===================
Maybe you forgot to setup the environment?

这没有意义。配置的行看起来与我以前配置的完全不同。所以使用 find 命令我在我的构建目录中找到了另一个 qmake 所以我改为运行它:

Using qmake: /raspi/build/qtbase/bin/qmake
Could not find qmake spec 'devices/linux-rasp-pi3-g++'.
Error processing project file: /project/myapp.pro

所以这也行不通。我试图找到用于这两个 qmake 的 mkspecs:

[comp]# /raspi/build/qtbase/bin/qmake -query QMAKE_MKSPECS
**Unknown**
[come]# /raspi/qt6/bin/qmake -query QMAKE_MKSPECS
**Unknown**

所以我很困惑。我应该使用哪个 qmake?为什么默认情况下不使用用于构建 qmake 的 mkspecs?并且必须传递 mkspecs 文件的路径?

qmake configure
© www.soinside.com 2019 - 2024. All rights reserved.