0

I am building a Qt c++ app in a Docker on Travis. I am trying to update the base Docker image from Cosmic to Disco.

I did these updates: Travis dist: Trusty => Xenial Docker image: Cosmic => Disco

Now I get this error when building:

clang: error: no such file or directory: 'src/native/moc_qgsnative.cpp'

This seems to be a known issue in Qt 5.10+ which requires statx calls:

From the Qt release notes:

Qt uses the statx(2) system call for obtaining file information on kernels 4.12 and later. Some older container systems install system call protection rules that do not include this system call. If you experience problems running Qt applications inside containers (such as the report of a file not existing when it does), ensure the statx(2) is allowed in the container configuration.

I found some information saying that this could be solved by using the privileged mode when doing docker run. But in our case, th build is made within the Docker build (and not docker run). From the Docker docs, it seems that building has full capabilities.

2
  • This is a QGIS compile error, not Qt itself. The error indicates that something probably went wrong when moc was invoked, and the corresponding moc_* file was not (yet?) generated. This can be a bug or incompatibility in QGIS with your current env or Qt version. I'm not sure how it relates to statx really, if it does. Commented May 27, 2019 at 22:03
  • @AdrienLeravat nope, I finally found reference for it: bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1755250/… Commented May 29, 2019 at 1:25

1 Answer 1

0

This is indeed due to statx calls.

This has been fixed in 18.04 (host).

For 16.04, one can install a more recent libseccomp and it fixes the issue:

wget https://launchpad.net/ubuntu/+archive/primary/+files/libseccomp2_2.4.1-0ubuntu0.16.04.2_amd64.deb
sudo dpkg -i libseccomp2_2.4.1-0ubuntu0.16.04.2_amd64.deb
sudo apt-get install -f
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.