AppImage

AppImage with Openframeworks release don't load shared libraries from its AppDir

I’m using Openframeworks in ArchLinux (note if someone want to try it in ArchLinux “make” needs to be 4.2.x branch).

This is my AppDir structure:

AppDir
├── AppRun (final release of my binary app made with Openframeworks)
├── data (data folder used by the aplication, it needs to be in the same directory, the data is loaded and works)
├── mono.desktop
├── mono.png
└── usr
    └──lib 

notes:
I’m packaging the release binary of my application made with Openframeworks, I’m not trying to make an AppImage of Openframeworks itself

the release binary and the data folders works on the root of AppDir as equal as putting them inside of /usr/bin/ and making an AppRun script pointing to it (that’s isn’t a problem)

the lib folder contains all libraries inside that are needed by the release binary, I got them with this command ldd MY_BINARY | grep -o "\/[^ ]*" and then I’ve copied to the folder.

The AppImage runs perfectly in the system in which Openframeworks is installed, all the shared libraries are loaded by the application from /usr/lib/ from the main system, not from the AppDir.

I got that conclusion by testing the AppImage in 2 different OSes that haven’t Openframeworks installed and consequently not any shared libraries the release binary needs.

The output shows one by one the shared libraries needed, but if I provide all of them to the /usr/lib/ folder of the testing OS, it works.

The AppImage creation with this software is crucial because Openframeworks works with specific libraries when get compiled, that said each release won’t work in the future because it needs each library and its specific version, let’s say libfoo.so.4.5, so libfoo.4.6 won’t work.

This is a real problem to an app that must be released/shipped and in this case AppImage fit perfectly to the needs of creators using a powerful project like Openframeworks.

My actual state is: I have finished an application that I can’t release under this circumstances.
Simply isn’t a possibility to ship my application to an art gallery to an art exhibition because it’s a very tricky for non-developers people to compile the app under each computer that it needs to run, which needs lots of dependencies and steps.

I don’t know what to do, any help on this will be highly appreciated.
I really hope that AppImage project is the way to solve this!

Thanks in advance.

Ok, I solved on my own by exporting an enviroment variable in AppRun bash script:
export LD_LIBRARY_PATH="${APPDIR}/usr/lib" , now the libraries from the AppDir are loaded,

after that the app seems to run and don’t ask for any library, but another problem arose,
Please help with this!

this is the output from bash console:

*** stack smashing detected ***: terminated
Aborted (core dumped)

Hello @alexfreyre, hard to say without debugging it. Your best bet is to run it with strace and/or LD_DEBUG=libs and observe what is going on. If you upload your AppDir somewhere, others can have a look too.