qt-build icon indicating copy to clipboard operation
qt-build copied to clipboard

Evaluate adding linuxdeployqt

Open darkmattercoder opened this issue 5 years ago • 2 comments

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; https://github.com/NixOS/patchelf/issues/124

Building linuxdeployqt git clone https://github.com/probonopd/linuxdeployqt.git cd linuxdeployqt && qmake && make && make install

Originally posted by @somlioy in https://github.com/darkmattercoder/qt-build/issues/5#issuecomment-578063955

darkmattercoder avatar Jan 24 '20 11:01 darkmattercoder

It is to be noted that linuxdeployqt technically does not support 18.04 until 2021, which is when 16.04 LTS no longer is supported.

We do not support linuxdeployqt on systems newer than the oldest Ubuntu LTS release https://github.com/probonopd/linuxdeployqt/issues/340;

The oldest supported LTS release is currently 16.04. They have however added a flag (-unsupported-allow-new-glibc) to allow the program to run with newer glibc version used on 18.04.

I'm not quite sure where the limitation lies, or if this was implemented just due to "best practice" reasons: "Build on old systems, run on newer systems"

Another possibility would be to use linuxdeploy with linuxdeploy-plugin-qt instead (as mentioned in Issue # 5), I however havent tried that if it is the case not supporting 18.04 aswell.

somlioy avatar Jan 24 '20 11:01 somlioy

https://github.com/linuxdeploy/linuxdeploy + https://github.com/linuxdeploy/linuxdeploy-plugin-qt work great on Ubuntu 18.04. linuxdeployqt could in principle work as well, but the author (rightfully) has opinions you should create appimages linked against the oldest still supported glibc, meaning compiling from Ubuntu 16.04 indeed.

To ship linuxdeploy, it's enough to do

RUN wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -P /usr/local/bin && chmod +x /usr/local/bin/linuxdeploy-x86_64.AppImage

RUN wget -q https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage -P /usr/local/bin && chmod +x /usr/local/bin/linuxdeploy-plugin-qt-x86_64.AppImage

and then package things like

QML_SOURCES_PATHS=to/your/qml linuxdeploy-x86_64.AppImage --appdir AppDir --plugin qt --output appimage

haampie avatar Jan 24 '20 20:01 haampie