Could not find dependency

Hi all,

When running linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage

I get the following error message:

-- Deploying dependencies for existing files in AppDir -- 
Deploying dependencies for ELF file AppDir/usr/bin/myapp
ERROR: Could not find dependency: ../lib/libtbb.so.2 
ERROR: Failed to deploy dependencies for existing files 

where …/lib/libtbb.so.2 is a dependency of libembree.so.2 which is itself a dependency of myapp.

I think that as …/lib/libtbb.so.2 is not an absolute path, the shared lib is not found by linuxdeploy system (libtbb.so.2 is well present in AppDir/usr/lib).

Do you have a workaround for that ? Something that may help linuxdeploy find the libtbb.so.2 ?

Best

I solved the problem by doing:

  1. Specifying an additional absolute path to myapp toward the location of embree.so.2 and libtbb.so.2 at link time:
    -Wl,-rpath='\$ORIGIN:\$ORIGIN/../lib/:$EMBREEDIR/lib/'
  2. Removing the dependency from embree.so.2 to libtbb.so.2 using patchelf:
    patchelf --remove-needed libtbbmalloc.so.2 libembree.so.2

This work, but I don’t like very much the step 2 as I am not the embree provider and I would prefer not alter their data.

Hello and welcome. linuxdeploy is a third-party tool. Please report issues regarding it at https://github.com/linuxdeploy/linuxdeploy/issues.

I have opened one regarding this issue at

@remarq please come over to https://github.com/linuxdeploy/linuxdeploy/issues/93#issuecomment-531566464 to discuss. The linuxdeploy author only gives support there.