AppImageKit icon indicating copy to clipboard operation
AppImageKit copied to clipboard

AppImage created on Ubuntu 18.04 and does not work in 20.04 because of `GLIBC_2.30' not found error

Open akontsevich opened this issue 5 years ago • 25 comments

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.

akontsevich avatar Oct 06 '20 05:10 akontsevich

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?

probonopd avatar Oct 06 '20 06:10 probonopd

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"

akontsevich avatar Oct 06 '20 07:10 akontsevich

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?

probonopd avatar Oct 06 '20 17:10 probonopd

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

akontsevich avatar Oct 06 '20 17:10 akontsevich

linuxdeployqt is capable of bundling custom Qt libraries. In fact, the example I linked to does exactly that!

probonopd avatar Oct 06 '20 17:10 probonopd

Tried it several times with no luck. Whether it works on Ubuntu 18.04 or glibc version problems there again?

akontsevich avatar Oct 06 '20 17:10 akontsevich

linuxdeployqt is 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 avatar Oct 06 '20 17:10 akontsevich

@akontsevich please feel free to create an issue in linuxdeploy's issue tracker. Otherwise, issues cannot be fixed.

TheAssassin avatar Oct 06 '20 18:10 TheAssassin

@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.

akontsevich avatar Oct 06 '20 19:10 akontsevich

  - source /opt/qt*/bin/qt*-env.sh

This like should make it use the non-system Qt. It works for many other apps.

probonopd avatar Oct 06 '20 19:10 probonopd

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

akontsevich avatar Oct 06 '20 19:10 akontsevich

linuxdeployqt is 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 avatar Oct 07 '20 18:10 akontsevich

@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.

azubieta avatar Oct 07 '20 21:10 azubieta

@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?

akontsevich avatar Oct 08 '20 01:10 akontsevich

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.

azubieta avatar Oct 08 '20 04:10 azubieta

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:

  1. Why it is mixed with appimagetool?
  2. With appimagetool I 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
  1. While for appimage-builder I need:
  • appimagetool
  • AppImageBuilder.yml
  • python3-pip, etc And all the above only for installation: https://appimage-builder.readthedocs.io/en/latest/intro/install.html

akontsevich avatar Oct 08 '20 04:10 akontsevich

@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.

akontsevich avatar Oct 08 '20 08:10 akontsevich

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.

azubieta avatar Oct 08 '20 14:10 azubieta

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?

akontsevich avatar Oct 09 '20 11:10 akontsevich

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?

akontsevich avatar Oct 09 '20 11:10 akontsevich

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

akontsevich avatar Oct 09 '20 12:10 akontsevich

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.

akontsevich avatar Oct 09 '20 12:10 akontsevich

Created sample PR so You may see the issues: https://github.com/airmap/qgroundcontrol/pull/1 Could You suggest some edits there please, @azubieta?

akontsevich avatar Oct 09 '20 13:10 akontsevich

Any ideas: https://github.com/airmap/qgroundcontrol/pull/1#issuecomment-706224437 @azubieta ?

akontsevich avatar Oct 09 '20 14:10 akontsevich

@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

azubieta avatar Oct 10 '20 04:10 azubieta