Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configuring qtbase fails with an error: "Could not find qmake spec ''."

Tags:

qt

I am trying to cross-compile qtbase-everywhere-5.11.0 for the Raspberry Pi 3 and configure phase exits after the qmake compilation with the error given below:

make: Nothing to be done for 'first'.
Could not find qmake spec ''.
Error processing project file: /work/qtbase-everywhere-src-5.11.0

I do it inside a docker container. Here is the 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

and the configure arguments

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-

I realized that configuring it with default parameters doesn't work either. Running just ./configure -v inside a source directory gives the same error.

I found that it doesn't happen when I am building using dockcross/linux-armhf7 based docker image.

like image 790
Renat Avatar asked Jun 10 '18 16:06

Renat


1 Answers

This is caused by the libseccomp version that ships with Ubuntu 18.04 (v2.3.1) not being recent enough to know the statx syscall, so it cannot be whitelisted (v2.3.3 would be required for that, which will be shipped with the next Ubuntu version). Qt 5.10 uses this syscall in its build process, though.

As a temporary workaround, you can add --security-opt seccomp:unconfined to your docker command line, but you should be aware of the security implications and only use this on trusted docker containers. Alternatively, you can of course try upgrading the libseccomp2 package.

like image 82
j_schultz Avatar answered Oct 06 '22 01:10

j_schultz