linuxdeployqt icon indicating copy to clipboard operation
linuxdeployqt copied to clipboard

Cannot find libjasper, not listed by ldd

Open gusmd opened this issue 9 years ago • 10 comments

When running linuxdeployqt on my project, I get the following:

Not using FHS-like mode
app-binary: "/build/linux/ui/ui"
appDirPath: "/build/linux/ui"
relativeBinPath: "ui"
ERROR: ldd outputLine: "libjasper.so.1 => not found"
ERROR: Please ensure that all libraries can be found by ldd. Aborting.

I'm using Qt 5.9 beta3, in a Ubuntu 17.04 fresh installation. ldd does not list libjasper as a dependency. I can run the app directly on this machine, so I do have all the dependencies in place.

Anything I could be doing wrong?

edit.: Want to add that I've ran linuxdeployqt with verbose=3, and this is where the library appears:

Library directory "/opt/Qt/5.9/gcc_64/lib/" 
 Library path "/opt/Qt/5.9/gcc_64/lib/libicudata.so.56" 
 Binary directory "/opt/Qt/5.9/gcc_64/lib/" 
 Binary name "libicudata.so.56" 
 Binary path "/opt/Qt/5.9/gcc_64/lib/libicudata.so.56" 
 Version "" 
 Install name "" 
 Deployed install name "$ORIGIN" 
 Source file Path "/opt/Qt/5.9/gcc_64/lib/libicudata.so.56" 
 Library Destination Directory (relative to bundle) "lib/" 
 Binary Destination Directory (relative to bundle) "lib/" 

Log: bundleLibraryDirectory: "lib"
Log: parsing "/lib/x86_64-linux-gnu/libpthread.so.0"
Log: bundleLibraryDirectory: "lib"
Log: parsing "/lib/x86_64-linux-gnu/libdl.so.2"
Log: bundleLibraryDirectory: "lib"
Log: parsing "/usr/lib/x86_64-linux-gnu/libstdc++.so.6"
Log: bundleLibraryDirectory: "lib"
Log: parsing "/lib/x86_64-linux-gnu/libm.so.6"
Log: bundleLibraryDirectory: "lib"
Log: parsing "/lib/x86_64-linux-gnu/libgcc_s.so.1"
Log: bundleLibraryDirectory: "lib"
Log: parsing "/lib/x86_64-linux-gnu/libc.so.6"
Log: Determining whether to run strip:
Log:  checking whether "/home/amd/passby/pbnStage1/build/linux/ui/lib/libicudata.so.56" has an rpath set
Log: patchelf --print-rpath "/home/amd/passby/pbnStage1/build/linux/ui/lib/libicudata.so.56"
Log: Already contains rpath starting with $, hence not stripping
Log: ""
Log: Changing rpath in "/home/amd/passby/pbnStage1/build/linux/ui/lib/libicudata.so.56" to "$ORIGIN"
Log: Using ldd:
Log:  inspecting "/home/amd/passby/pbnStage1/build/linux/ui/lib//libicudata.so.56"
Log: rpath: "$ORIGIN"
Log: Changing rpath in "/home/amd/passby/pbnStage1/build/linux/ui/plugins/imageformats/libqico.so" to "$ORIGIN/../../lib"
Log: Using ldd:
Log:  inspecting "/opt/Qt/5.9/gcc_64/plugins/imageformats/libqjp2.so"
ERROR: ldd outputLine: "libjasper.so.1 => not found"
ERROR: Please ensure that all libraries can be found by ldd. Aborting.

edit2: Tried compiling my app with Qt 5.7 to make sure it wasn't something funny with Qt 5.9 beta3. Same problem.

gusmd avatar May 10 '17 20:05 gusmd

Hi @gusmd welcome to AppImage!

First of all, I would not recommend to use Ubuntu 17.04 at this point since it is very new and the resulting binaries will not run on pre-2017 systems. Much better to use Ubuntu 14.04 Trusty at this point.

Next, where does libjasper.so.1 live on your build system? linuxdeployqtis using lddto find libraries.

Assuming it lives in /usr/lib/x86_64/jasper/, try

export LD_LIBRARY_PATH=/usr/lib/x86_64/jasper/
./linuxdeployqt*.AppImage ...

For the best reproducible results I recommend to use Ubuntu Trusty and https://launchpad.net/~beineri/+archive/ubuntu/opt-qt58-trusty (because that's what I am using linuxdeployqt with on Travis CI). Can you reproduce the issue with that? That would be a good starting point for further debugging/bugfixing.

probonopd avatar May 14 '17 18:05 probonopd

Please retry with the latest continuous build, is this still an issue for you?

probonopd avatar Jul 22 '17 16:07 probonopd

I just get this error on latest Fedora 26

ERROR: ldd outputLine: "libjasper.so.1 => not found"                                                                                                                                                                                         
ERROR: Please ensure that all libraries can be found by ldd. Aborting

dnf list jasper jasper-devel

Installed Packages
jasper.x86_64                                                                                                         2.0.12-1.fc26                                                                                                   @fedora
jasper-devel.x86_64                                                                                                   2.0.12-1.fc26                                                                                                   @fedora

so i ran locate jasper and here's the output

/usr/lib/libjasper.so
/usr/lib/libjasper.so.4
/usr/lib/libjasper.so.4.0.0
/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jasper.so
/usr/lib64/libjasper.so
/usr/lib64/libjasper.so.4
/usr/lib64/libjasper.so.4.0.0
/usr/lib64/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jasper.so

And now I'm scratching head, it looks like .so.1 is unavailable in Fedora 26. The application itself is Qt 5.9.1 compiling and running works ok on this system

Zaraka avatar Aug 28 '17 12:08 Zaraka

@Zaraka which software are you trying to turn into an AppImage?

probonopd avatar Aug 28 '17 15:08 probonopd

@probonopd Qt app with a single dependency OpenCV. But jasper is used in Qt itself isn't it?

Zaraka avatar Aug 28 '17 15:08 Zaraka

cd to your AppDir, then run grep -r libjasper . to find out what causes it being loaded. If your app is publicly available, I can have a look at it.

probonopd avatar Aug 28 '17 15:08 probonopd

Hi, I'm having same issue - I'm on Ubuntu 17.04

saad@Saad-Home:~/Desktop/app$ ./app.load App Not using FHS-like mode app-binary: "/home/saad/Desktop/app/App" appDirPath: "/home/saad/Desktop/app" relativeBinPath: "App" ERROR: ldd outputLine: "libjasper.so.1 => not found" ERROR: Please ensure that all libraries can be found by ldd. Aborting.

randinterval avatar Oct 23 '17 23:10 randinterval

I figured out why this is happening. Apparently, jasper was removed in Debain (Ubuntu is debian based), hence the error. I was able to find a standalone package for jasper, but decided to just download previous version of Ubuntu trusty and build there as I'm going to deploy on 14.04, so makes no sense to package on 17.04

randinterval avatar Oct 24 '17 09:10 randinterval

If you create the AppImage properly on 14.04, then it should run on subsequent versions like 17.04 as well. If it doesn't, I'd consider it as a bug.

probonopd avatar Oct 25 '17 16:10 probonopd

@probonopd yes, I understand that - I was trying to build it on 17.04, and my target machines which will actually run the application are on 14.04, so figured it would be better to build on 14.04. PS: Thanks for the great tool! Very useful.

randinterval avatar Oct 25 '17 16:10 randinterval