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

Error while loading shared libraries on AppImage run #405

Closed
akontsevich opened this issue Nov 28, 2019 · 10 comments
Closed

Error while loading shared libraries on AppImage run #405

akontsevich opened this issue Nov 28, 2019 · 10 comments

Comments

@akontsevich
Copy link

akontsevich commented Nov 28, 2019

Hi @probonopd and @TheAssassin. As You may remember I was able to build and run AppImage successfully under CentOS 7.x based docker image here: AppImage/AppImageKit#998 (comment)

However when we migrate to Ubuntu 18.04 and added libgdal and boost dependencies to the app some problems appeared with shared libraries on AppImage run:

error while loading shared libraries: <lib_name>: cannot open shared object file: 
No such file or directory

And this happens with tens or hundreds shared libraries so I can't solve the issue copying them manually to app lib dir like in the link above. So copying libraries like this:

# copy some missed libs to the bundle
libs=(libssl.so.1 libcrypto.so.1 libicui18n.so libicuuc.so libicudata.so \
     libgdal.so libarmadillo.so libproj.so libjson-c.so libqhull.so libwebp.so \
     libpoppler.so libepsilon.so libkmlbase.so libkmldom.so libkmlengine.so \
     libnetcdf.so libhdf5_serial.so libmfhdfalt.so libdfalt.so libogdi.so \
     libgeotiff.so libdapclient.so libdap.so libpcre.s)
for lib in "${libs[@]}"
do
    cp $(ldconfig -p | grep ${lib} | head -n1 | tr ' ' '\n' | grep /) ./$APP.AppDir/Qt/libs/    
done

does not work any more as there are too much libraries and previous 80 MB AppImage which worked everywhere grows now in more than 2 times and does not work. I saw ./linuxdeploy-x86_64.AppImage output and it strips these libraries from final AppImage for some reason - see libs list above after adding gdal and boost (previously it was necessary to deploy manually only following libssl.so.1, libcrypto.so.1, libicui18n.so, libicuuc.so, libicudata.so).

See ./linuxdeploy-x86_64.AppImage output: appimage_bug.txt

If I run create AppImage outside docker it builds and runs fine, however have size: 377 MB.

Any ideas? What the problem could be, how to solve? Thanks!

@probonopd
Copy link
Owner

The tested and supported way of using linuxdeployqt is https://github.com/probonopd/linuxdeployqt#using-linuxdeployqt-with-travis-ci - what happens if you follow that?

@akontsevich
Copy link
Author

@probonopd sorry, I put this to wrong topic again. I mean we use linuxdeploy not linuxdeployqt.

@akontsevich
Copy link
Author

Sorry, I thought linuxdeploy is also Yours. What AppImage tool better to use?

@akontsevich
Copy link
Author

Your tools fails on Ubuntu 18.04 completely:

ERROR: The host system is too new.
Please run on a system with a glibc version no newer than what comes with the oldest
currently still-supported mainstream distribution (xenial), which is glibc 2.23.
This is so that the resulting bundle will work on most still-supported Linux distributions.
For more information, please see
https://github.com/probonopd/linuxdeployqt/issues/340

@probonopd
Copy link
Owner

probonopd commented Nov 30, 2019

@akontsevich this is intentional. It does not fail, it actively prevents you from producing defective AppImages that would not work on all still-supported releases of Ubuntu.

Please build your software on the oldest still-supported LTS release of Ubuntu or another similarly old distribution. The reasons are given in #340.

@akontsevich
Copy link
Author

I can't do as I have Ubuntu 18.04 as a requirement.

@probonopd
Copy link
Owner

I can't do as I have Ubuntu 18.04 as a requirement.

For building?

How are users that are not using that version of Ubuntu supposed to run your application then?

@akontsevich
Copy link
Author

Users use Ubuntu 18.04.

@azubieta
Copy link

I can't do as I have Ubuntu 18.04 as a requirement.

@akontsevich please check out https://github.com/AppImageCrafters/appimage-builder/

@akontsevich
Copy link
Author

I can't do as I have Ubuntu 18.04 as a requirement.

@akontsevich please check out https://github.com/AppImageCrafters/appimage-builder/

Thanks @azubieta! Will try in case of a necessity.

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

3 participants