配置qtbase失败并显示错误:"找不到qmake spec''."

Ren*_*nat 9 qt

我正在尝试交叉编译qtbase-everywhere-5.11.0 for Raspberry Pi 3并在qmake编译后配置阶段退出,并给出以下错误:

make: Nothing to be done for 'first'.
Could not find qmake spec ''.
Error processing project file: /work/qtbase-everywhere-src-5.11.0
Run Code Online (Sandbox Code Playgroud)

我在一个docker容器里面做.这里是Dockerfile

FROM ubuntu:18.04

COPY sources.list /etc/apt/

RUN apt update -q -yy && \
    apt upgrade -q -yy && \
    apt install -q -yy aptitude curl

RUN dpkg --add-architecture armhf

RUN apt install -q -yy --allow-downgrades \
        build-essential \
        linux-libc-dev:armhf=4.15.0-20.21 linux-libc-dev:amd64=4.15.0-20.21 \
        crossbuild-essential-armhf \
        libncurses5:amd64=6.1-1ubuntu1 \
        libncursesw5:amd64=6.1-1ubuntu1 \
        libtinfo5:amd64=6.1-1ubuntu1 \
        libgles2-mesa-dev:armhf \
        libpcre3-dev:armhf \
        libasound2-dev:armhf \
        libasound2-data=1.1.3-5
Run Code Online (Sandbox Code Playgroud)

configure论点

configure \
     -device linux-rasp-pi3-g++ \
     -examplesdir /usr/lib/qt/examples \
     -headerdir /usr/include/qt5 \
     -no-rpath \
     -nomake tests \
     -plugindir /usr/lib/qt/plugins \
     -prefix /usr \
     -v \
     -confirm-license \
     -eglfs \
     -no-cups \
     -no-iconv \
     -no-kms \
     -no-pch \
     -no-use-gold-linker \
     -no-xcb \
     -no-sql-sqlite \
     -no-sql-mysql \
     -no-sql-psql \
     -no-sql-tds \
     -no-sql-odbc \
     -no-linuxfb \
     -no-widgets \
     -opengl es2 \
     -opensource \
     -release \
     -shared \
     -system-zlib \
     -device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf-
Run Code Online (Sandbox Code Playgroud)

我意识到使用默认参数配置它也不起作用../configure -v在源目录内运行会产生相同的错误.

我发现当我使用dockcross/linux-armhf7基于docker的图像构建时不会发生这种情况.

j_s*_*ltz 5

这是由于 Ubuntu 18.04 (v2.3.1) 附带的 libseccomp 版本不够新,无法了解statx系统调用,因此无法将其列入白名单(需要 v2.3.3,它将随下一个 Ubuntu 版本一起提供) )。不过,Qt 5.10 在其构建过程中使用了这个系统调用。

作为临时解决方法,您可以添加--security-opt seccomp:unconfined到 docker 命令行,但您应该注意安全隐患,并且仅在受信任的 docker 容器上使用它。或者,您当然可以尝试升级libseccomp2包。