[Qbs] Building Qbs for conan/bintray on Gitlab

Richard Weickelt richard at weickelt.de
Mon Mar 23 11:01:13 CET 2020


> I try to build a Qbs conan package (with static linked Qt) so conan could
> just install Qbs with a simple "build_requires". Building the conan package
> works fine on my local machine. But when I use Gitlab-CI to build the
> packages it fails to build.
> To build locally I use the following Dockerfile:
> FROM conanio/gcc8
> ENV CONAN_USERNAME="psy-kai" \
>     CONAN_CHANNEL="testing" \
> CONAN_REMOTES="https://api.bintray.com/conan/bincrafters/public-conan@True@bincrafters"
> RUN sudo pip install --upgrade conan_package_tools && \
>     conan user
> COPY *.py .
> COPY test_package test_package
> RUN python build.py
> Placing this into the cloned repo and running "docker build" works just fine.
> The complete build output of the crashing gitlab-ci build can be found
> at https://gitlab.com/Psy-Kai/conan-qbs/-/jobs/480352993.

I don't see compiler/linker invocations for any of the plugins in the gitlab
output, so it seems to be a build system issue. When running locally in a
Docker container, Qbs builds correctly. I have put above lines (without
invoking python build.py) in a Dockerfile and ran

    docker build

Then I started a container with

    docker run -it --rm -v $PWD:/builds -w /builds qbsconan

and invoked the build with

    docker exec CONTAINER_ID python build.py

I guess this is a bit closer to what gitlab is doing, but maybe not 100%. So
what could be the difference?

> I think a pre-build Qbs
> conan package would help a lot, especially when using CI systems.

Yes, a Qbs Conan package in the bincrafters repo or in
https://conan.io/center/ would be great. I thought about just packaging
prebuilt binaries containing bundled Qt libraries as a first step for the
1.16 release. The next Qbs release could then be built from source using the
Qbs Conan package.

But if you manage to build Qbs from source in a Conan recipe using
bincrafters' Qt package, even better. Would you contribute and maintain a
Qbs Conan package?

> Additionally some off topic: the documentation for the ConanfileProbe
> does not match with the current implementation. Maybe you should fix the
> docs before 1.16 release ;)

In an open source project where almost all participants invest their spare
time to create something useful, it is good practice to not let others
guess. Would you mind sharing your findings? You may file a bug report or
submit a fix right away.


More information about the Qbs mailing list