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

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

3nids
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:

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
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: issues when building QGIS in Docker with Qt 5.10+, help from Docker experts

Daniele Viganò
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 <[hidden email]> 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:

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
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


--

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: issues when building QGIS in Docker with Qt 5.10+, help from Docker experts

Daniele Viganò
Just an update: it looks like that statx() is now availbale in 18.04 out-of-the-box: https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1755250

Daniele

On Mon, May 27, 2019 at 7:49 AM Daniele Viganò <[hidden email]> wrote:
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 <[hidden email]> 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:

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
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


--


--

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: issues when building QGIS in Docker with Qt 5.10+, help from Docker experts

3nids
In reply to this post by Daniele Viganò
Hi Daniele,

Many thanks for the detailed answer.
I will give a try at installing a new libseccomp.

What is weird is that I didn't have this error when using Trusty on Travis (but hit another issue with SIP).

I'll let you know how it goes.

Cheers,
Denis

Le lun. 27 mai 2019 à 00:49, Daniele Viganò <[hidden email]> a écrit :
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 <[hidden email]> 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:

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
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer


--

_______________________________________________
QGIS-Developer mailing list
[hidden email]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer