darkmattercoder / qt-build Goto Github PK
View Code? Open in Web Editor NEWa (nearly) full qt build environment as a docker image, small footprint, lots of versions
License: GNU General Public License v3.0
a (nearly) full qt build environment as a docker image, small footprint, lots of versions
License: GNU General Public License v3.0
Hello,
I am new to docker and i try to build a Qt project through the detailed usage. As an example, I coloned the test project "helloword" that you propose and i build it from the docker container.
docker run -it -u $UID -v /root/qt-build/tests/helloworld/:/var/build darkmattercoder/qt-build:5.11.3 bash
cd /var/build/
qmake helloworld.pro
make
However, when i try to run the builded file inside the container,
./helloworld
I get a linking problem related to libQt5Core.so.5 library. Even if I add the path of the missed library in LD_LIBRARY_PATH, i obtain the same problem.
Do I miss something ? Could you help me please ?
Hi,
How can I run make install?
Thanks!!!
It would also be nice to bundle linuxdeployqt with the Docker images. Linuxdeployqt also requires patchelf:
curl -sLO https://ftp.fau.de/debian/pool/main/p/patchelf/patchelf_0.8-2_amd64.deb
dpkg -i patchelf_0.8-2_amd64.deb
Newer patchelf versions apparantly cripples libQt5Core; NixOS/patchelf#124
Building linuxdeployqt
git clone https://github.com/probonopd/linuxdeployqt.git
cd linuxdeployqt && qmake && make && make install
Originally posted by @somlioy in #5 (comment)
https://hub.docker.com/r/darkmattercoder/qt-build/
The list of builds tags/version seems disrupted at Qt version 5.9 and lower.
Travis Ci is kinda buggy and build time is very long.
I already got my hands on the task in a new branch #8 to verify that it at least builds.
Shows that the build time drops to about 2h from about 3h in travis.
So the task is to make the travis ci build matrix work 1:1 with github actions in an elegant way.
Just a note that in my usecase I would have needed some of these as well : http://download.qt.io/official_releases/qt/5.12/5.12.9/submodules/
I just found out this project, and it could help me build Qt in CI without having to do the heavy lifting of rebuilding the Qt world... so first, thanks for that !
I am trying to build a Qt project leveraging Gitlab CI (it uses docker as base image) and use qt-build as a base image to do the build in...
My CI script will take care of calling the right commands (cmake in my case).
Currently I get :
If you wanted to use the container to build a qmake project, you have to invoke the container with command "build" and mount the project to /var/build
Invoking container with command(s) sh -c if [ -x /usr/local/bin/bash ]; then
exec /usr/local/bin/bash
How can I do that? Is there an example around ? I couldn't see anything in the doc, but maybe there could be another entrypoint for this usecase ?
Hello,
First off, thank you very much for this project, installing Qt inside Docker is a real pain!
Now I successfully compiled a Qt program with your build container, but when I tried to start it, I got the following message:
##W: Could not find the Qt platform plugin "xcb" in ""
##F: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: linuxfb, minimal, offscreen, vnc, webgl.
I saw that you recently closed #15, but I'm not sure if it's really fixed. I did find a libqxcb.so
in /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms
but if I add that plugin dir to the QT_QPA_PLATFORM_PLUGIN_PATH
I get another error:
##W: QLibraryPrivate::loadPlugin failed on "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so" : "Cannot load library /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so: (/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: symbol _ZN11QFontEngine14bitmapForGlyphEj6QFixedRK10QTransform version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)"
Could not load the Qt platform plugin "xcb" in "/usr/lib/x86_64-linux-gnu/qt5/plugins" even though it was found.
##F: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb, webgl.
I'm not sure what to do at this point โฆ Can you confirm that the xcb platform plugin is actually working? If so, do you maybe have an idea what I'm doing wrong?
Thank you very much!
Alex
I recently got an inquiry wether I was able to include qtopcua
in my images.
I like the idea a lot however adding modules from the -- as i call it -- extended qt universe is out of scope in my opinion for this very project.
However, I think I can create a new project where I rely on the images built in here as base images and add extended stuff from qt for automation, qt for automotive and so on to it.
I will set that up at least in a prototyped manner soon.
We are considering using this image to build our debugging version of the app, but currently all compilation .o-objects are removed making the process really slow.
Is it possible to add a flag SKIP_REMOVE to not remove all objects in the volume and thus speed up builds for development purposes?
We can take care of removing the unused .o objects ourselves (make command) thus giving back control to the developer.
Hi darkmattercoder
I came across qt-build and would like to use it for raspberry pi (armf)
Have you build qt-build docker for raspberry?
James
This is more of a question than an issue: why was the -qt-xcb
flag removed from 5.12.1 and onwards? I'm using a deployment tool that assumes plugins/platforms/libqxcb.so
exists.
As the description says "A (nearly) full qt build environment", you might want to also build plugins from source. When installed from official web site Qt comes with a huge amount of plugins, sql drivers being one of them.
When building from source configure script checks whether a certain backend sql library is available to include a plugin to make file https://doc.qt.io/qt-5/sql-driver.html.
Let's say I want to build application which uses QtSql module and deploy it to run against mariadb. It won't depend on sqldrivers/qsqlmysql.so at build time. But if I am to run interation tests or to copy binaries for deployment I am going to require sqldrivers/qsqlmysql.so along with libmysqlclient.so.18.
Do you mind to prebuild those countless plugins like Qt does? Or should one use darkmattercoder/qt-build:builder-??? to build required plugins.
Hi,
I'm trying to build an image for Qt 5.15.2 with qtwebengine. I'm using your script build-dockerfile-local.sh and I removed -skip qtwebengine
from buildconfig/configure-5.15.2.sh. I build it, but I don't have webenginewidgets
in the image. What should I do?
As I understand I should use image darkmattercoder/qt-build:5.15.2, because darkmattercoder/qt-build:builder-5.15.2 and darkmattercoder/qt-build:base-5.15.2 are only images necessary for build process?
Looks like libssl-dev is missing https://github.com/darkmattercoder/qt-build/blob/master/Dockerfile#L17
Hello,
I try to setup CI/CD pipeline in Gitlab for a Qt project, and I use your qt-build image to do so.
the .gitlab-ci.yml is like this:
image: darkmattercoder/qt-build:5.13.0
stages:
- Build
- Run
Build code:
stage: Build
script:
- qmake QuarkEmu.pro -spec linux-g++
Nominal Run:
stage: Run
script:
- ./QuarkEmu
I get this error message from gitlab
Running with gitlab-runner 12.2.0 (a987417a)
on docker-auto-scale 72989761
Using Docker executor with image darkmattercoder/qt-build:5.13.0 ...
Pulling docker image darkmattercoder/qt-build:5.13.0 ...
Using docker image sha256:996f9afbe8fa9fe4849f86c5bdf4895d06a616aa407ae3d1ddb61ff8f8f23731 for darkmattercoder/qt-build:5.13.0 ...
Running on runner-72989761-project-3880142-concurrent-0 via runner-72989761-srm-1568616334-11a1c98d...
Fetching changes...
Initialized empty Git repository in /builds/hexabyte23/Quark/.git/
Created fresh repository.
From https://gitlab.com/hexabyte23/Quark
* [new branch] master -> origin/master
Checking out d905a954 as master...
Skipping Git submodules setup
/usr/local/bin/entrypoint.sh: line 20: cd: /home/qt: No such file or directory
If you wanted to use the container to build a qmake project, you have to invoke the container with command "build" and mount the project to /var/build
Invoking container with command(s) sh -c if [ -x /usr/local/bin/bash ]; then
exec /usr/local/bin/bash
elif [ -x /usr/bin/bash ]; then
exec /usr/bin/bash
elif [ -x /bin/bash ]; then
exec /bin/bash
elif [ -x /usr/local/bin/sh ]; then
exec /usr/local/bin/sh
elif [ -x /usr/bin/sh ]; then
exec /usr/bin/sh
elif [ -x /bin/sh ]; then
exec /bin/sh
elif [ -x /busybox/sh ]; then
exec /busybox/sh
else
echo shell not found
exit 1
fi
...
$ ./QuarkEmu
/bin/bash: line 84: ./QuarkEmu: No such file or directory
/usr/local/bin/entrypoint.sh: line 20: cd: /home/qt: No such file or directory
If you wanted to use the container to build a qmake project, you have to invoke the container with command "build" and mount the project to /var/build
Invoking container with command(s) sh -c if [ -x /usr/local/bin/bash ]; then
exec /usr/local/bin/bash
elif [ -x /usr/bin/bash ]; then
exec /usr/bin/bash
elif [ -x /bin/bash ]; then
exec /bin/bash
elif [ -x /usr/local/bin/sh ]; then
exec /usr/local/bin/sh
elif [ -x /usr/bin/sh ]; then
exec /usr/bin/sh
elif [ -x /bin/sh ]; then
exec /bin/sh
elif [ -x /busybox/sh ]; then
exec /busybox/sh
else
echo shell not found
exit 1
fi
...
ERROR: Job failed: exit code 1
But I don't see any mistake, should I use a builder image instead ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.