Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
akontsevich opened this issue Oct 6, 2020 · 25 comments

Comments

@akontsevich
Copy link

akontsevich commented Oct 6, 2020

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.

@probonopd
Copy link
Member

probonopd commented Oct 6, 2020

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?

@akontsevich
Copy link
Author

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"

@probonopd
Copy link
Member

probonopd commented Oct 6, 2020

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?

@akontsevich
Copy link
Author

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

@probonopd
Copy link
Member

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

@akontsevich
Copy link
Author

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

@akontsevich
Copy link
Author

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.

@TheAssassin
Copy link
Member

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

@akontsevich
Copy link
Author

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

@probonopd
Copy link
Member

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

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

@akontsevich
Copy link
Author

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
Copy link
Author

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.

@azubieta

This comment has been minimized.

@akontsevich
Copy link
Author

akontsevich commented Oct 8, 2020

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

@azubieta
Copy link
Contributor

azubieta commented Oct 8, 2020

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.

@akontsevich
Copy link
Author

Are you creating type 1 AppImage ?

I do not know, I need whatever working. 😉

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:

@akontsevich
Copy link
Author

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

@azubieta
Copy link
Contributor

azubieta commented Oct 8, 2020

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.

@akontsevich
Copy link
Author

akontsevich commented Oct 9, 2020

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

@azubieta
Copy link
Contributor

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants