AppImage created on Ubuntu 18.04 and does not work in 20.04 because of `GLIBC_2.30' not found error
Created AppImage with appimagetool under Ubuntu 18.04 or Ubuntu 18.04 docker image, however it works in Ubuntu 18.04 and does not work in 20.04 because of following error:
> ./MyApp.docker.AppImage
mkdir: /tmp/appimage_extracted_246844dbdeeca1f1fe512ed8c7848908/Qt/libs/libc.so.6:
version `GLIBC_2.30' not found (required by /lib/x86_64-linux-gnu/libselinux.so.1)
*** stack smashing detected ***: <unknown> terminated
Aborted (core dumped)
Any ideas how to solve this? This happened even if I bundle glibs a well. Use higher level tool? linuxdeploy does now work for me as well as it tries to bundle system Qt libraries but need to bundle custom built Qt version (more modern) than installed in the system and does not create AppImage at all.
How did libc.so.6 end up there? That is not gonna work unless you are using a specialized tool to knows how to handle glibc.
How was this AppImage made? Probably not using linuxdeployqt?
How was this AppImage made?
As I mentioned above: with appimagetool. linuxdeployqt or linuxdeploy (some previous versions does) do not work.
wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod a+x appimagetool-x86_64.AppImage
/appimagetool-x86_64.AppImage ./$APP.AppDir/ ${TMPDIR}/$APP".AppImage"
As I mentioned above: with appimagetool.
appimagetool is a low-level tool to be used when you already have a working AppDir (which you obviously don't). linuxdeployqt and other similar tools use it under the hood.
Can you please elaborate on "do not work" when it comes to https://github.com/probonopd/linuxdeployqt? What happens if you follow https://github.com/probonopd/linuxdeployqt/#using-linuxdeployqt-with-travis-ci exactly?
appimagetool is a low-level tool to be used when you already have a working AppDir (which you obviously don't).
I have.
Can you please elaborate on "do not work" when it comes to
We have custom Qt libraries build like I said so linuxdeployqt does not work with it at all as it tries to use system, which is not what we need. Previously linuxdeploy worked for us however after some time it stopped to work, the error is:
ERROR: Failed to set rpath in ELF file: ./MyApp.AppDir/usr/lib/libQt5Widgets.so.5
linuxdeployqt is capable of bundling custom Qt libraries. In fact, the example I linked to does exactly that!
Tried it several times with no luck. Whether it works on Ubuntu 18.04 or glibc version problems there again?
linuxdeployqtis capable of bundling custom Qt libraries. In fact, the example I linked to does exactly that!
No it install and uses system:
before_install:
- sudo add-apt-repository ppa:beineri/opt-qt-5.10.1-trusty -y
- sudo apt-get update -qq
install:
- sudo apt-get -y install qt510base libgl1-mesa-dev
- source /opt/qt*/bin/qt*-env.sh
I need some LIBDIR pointing to custom Qt.
@akontsevich please feel free to create an issue in linuxdeploy's issue tracker. Otherwise, issues cannot be fixed.
@akontsevich please feel free to create an issue in linuxdeploy's issue tracker. Otherwise, issues cannot be fixed.
I'm not sure what to do here: rise an issue for linuxdeploy or select other tool. While AppDir is prepared and linuxdeploy is useless here.
- source /opt/qt*/bin/qt*-env.sh
This like should make it use the non-system Qt. It works for many other apps.
That is not clear to me: what is it -- /opt/qt*/bin/qt*-env.sh? Some Travis-CI commands? I need bash script to build. Similar to this:
https://github.com/mavlink/qgroundcontrol/blob/master/deploy/create_linux_appimage.sh#L91-L97
linuxdeployqtis capable of bundling custom Qt libraries. In fact, the example I linked to does exactly that!
In any way when linuxdeploy worked for us (I think few month ago) it had the same problem: built on 18.04 does not work on 20.04 or other modern distros and vise versa.
@akontsevich you can also give it a try to appimage-builder it's capable of creating backward/forward compatible bundles no matter which Ubuntu version you use to build it.
@akontsevich you can also give it a try to appimage-builder it's capable of creating backward/forward compatible bundles no matter which Ubuntu version you use to build it.
Thanks @azubieta will try, any link for quick start or small piece of code to modify this: create_linux_appimage.sh#L91-L97 - i.e. for prepared App Image Dir?
Are you creating type 1 AppImage ?
As I can see from your script, several deb packages are extracted manually into the AppDir. This can also be done using appimage-builder. I guess that it would be better to discuss this on a separated issue in the qtgroudcontrol project.
Are you creating type 1 AppImage ?
I do not know, I need whatever working. :wink:
As I can see from your script, several deb packages are extracted manually into the AppDir.
This is not necessary in our AppImage: qgroudcontrol fork (private).
I guess that it would be better to discuss this on a separated issue in the qtgroudcontrol project.
Not sure qgroudcontrol developers interested in fixing this, however we can try to discuss there (I may propose patches for them later) or in whatever other place - what about Your repo? As appimage-builder dumentation is not clear to me:
- Why it is mixed with
appimagetool? - With
appimagetoolI actually need to run 3 commands:
wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod a+x appimagetool-x86_64.AppImage
./appimagetool-x86_64.AppImage some.AppDir
- While for
appimage-builderI need:
- appimagetool
- AppImageBuilder.yml
- python3-pip, etc And all the above only for installation: https://appimage-builder.readthedocs.io/en/latest/intro/install.html
@azubieta tried to use your appimage-builder however it fails on appimage-builder --generate as qgroudcontrol does not follow Linux standards directory structure. They copy manually only necessary Qt libraries to AppDir and run all via bash script with LD_LIBRARY_PATH (qgroundcontrol-start.sh) so it finds all necessary libraries. See attached directory structure: AppDir_tree.txt. I'd like they change deploy dir structure as it is very strange but this can take some time and not sure they accept such PR.
If appimage-builder --generate fails you will have to manually create the recipe file, it should not be a big deal. Just use this template and add/remove packages from the include and exclude list.
For setting LD_LIBRARY_PATH check the section AppDir > runtime > env , there you will find a APPDIR_LIBRARY_PATH which is set as LD_LIBRARY_PATH on runtime.
I see thanks, @azubieta, trying.. What is correct notation for files->include to include all files and dirs recursively?
files:
include:
- Qt/*/*
Correct one? Or Qt/* is enough?
Error: Unable to find any app icon named: myapp.png which is also placed into root of ./AppDir. While appimage-builder looks for it in:
INFO:root:Looking app icon at: /usr/share/icons
INFO:root:Looking app icon at: /usr/share/pixmaps
How to fix? Specify full path?
Copied icon manually to ./AppDir/usr/share/icons, still getting error:
AppImageBuilder.app_dir.app_info.icon_bundler.Error: Unable to find any app icon named: mayapp.png
Next bug:
$ ./AppRun
/app/myapp-start.sh: 11: /app/myapp-start.sh: /app/myapp: not found
$ ./AppRun FAILED, exit code: 127
ERROR:appimage-builder:Tests failed
Why it loos for executable in /app dir?! While it is still in the $APPDIR/ root. Seems all these cool tools not suitable for qgroundcontrol mess.
Created sample PR so You may see the issues: https://github.com/airmap/qgroundcontrol/pull/1 Could You suggest some edits there please, @azubieta?
Any ideas: https://github.com/airmap/qgroundcontrol/pull/1#issuecomment-706224437 @azubieta ?
@akontsevich sorry for being away, I'm dealing here with a IP camera setup. I'll let my comments on the PR.
Regarding the icon issue: appimage-builder follows the XDG specification for icon themes so it expect the icon to be deployed at usr/share/icons/<icon theme>/<icon size>/apps/
But I guess you already figured out that