[QGIS-Developer] issues when building QGIS in Docker with Qt 5.10+, help from Docker experts

Daniele ViganĂ² daniele at vigano.me
Sun May 26 22:49:09 PDT 2019


Hi Denis,

we had the same issue with our QGIS Server Docker containers (see
https://github.com/gem/oq-qgis-server/issues/1). Fedora based containers
use Qt 5.11 thus they need statx().
I did not found a 'final' solution: to be able to use statx() you need, on
the host, Docker 18.04+ _and_ libseccomp2_2.3.1+ which are available when
using a recent Fedora host but not, for example, Ubuntu < 18.10. I know
that Marco Benasocchi was able to use libseccomp2_2.3.1 deb package from
18.10 on 18.04, but I don't know if that works fine on 16.04 (Xenial) which
runs on Travis.

The 'official' answer that I got from the Qt guys is that Qt is smart and
discovers automatically the availability of statx() at compile time (and
there's also a flag to forcefully disable support for it), but the problem
here is that Qt has been compiled on a system that supports statx() so Qt
expects it availability; instead in the runntime environment (Docker) all
the conditions to use statx() are satisfied, but then the request is
blocked by seecomp policies.

Daniele

On Mon, May 27, 2019 at 6:47 AM Denis Rouzaud <denis.rouzaud at gmail.com>
wrote:

> Hi all,
>
> I am trying to update the base Docker image from Cosmic to Disco to get a
> more recent SIP version.
>
> Before Cosmic Docker was building fine on Travis with Trusty.
> I updated the Docker image to Disco and hit a timeout when building sip
> files for QGIS.
> So, I tried to update the Travis dist to Xenial, and now I get this issue:
> 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 (
> https://code.qt.io/cgit/qt/qtbase.git/tree/dist/changes-5.10.0#n502):
>
> 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, the QGIS build is made within the Docker build (and not
> docker run).
> From the Docker docs, it seems that building has full capabilities.
>
> I don't really know what to look for. If anyone has a hint, it is more
> than welcome.
>
> Cheers,
> Denis
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer



-- 
*Daniele ViganĂ²*
http://daniele.vigano.me
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20190527/56597bbf/attachment-0001.html>


More information about the QGIS-Developer mailing list