Comment 2 for bug 1637946

Revision history for this message
Lucy Llewellyn (lucyllewy) wrote :

This also affects linking against a library which then links to a library in `usr/local/lib` for example.

In building supertuxkart I'm hitting this issue where I have snapcraft do the following:
- build libopenh264 and stage to usr/local/lib
- build libopenglrecorder against libopenh264 from stage/usr/local/lib staging into usr/lib/$ARCH_TRIPLET
- build supertuxkart against libopenglrecorder from stage/usr/lib/$ARCH_TRIPLET

the build fails to link supertuxkart to libopenglrecorder with the similar message:

/usr/bin/ld: warning: libopenh264.so.4, needed by /root/build_supertuxkart/stage/usr/lib/x86_64-linux-gnu/libopenglrecorder.so, not found (try using -rpath or -rpath-link)
/root/build_supertuxkart/stage/usr/lib/x86_64-linux-gnu/libopenglrecorder.so: undefined reference to `WelsCreateSVCEncoder'
/root/build_supertuxkart/stage/usr/lib/x86_64-linux-gnu/libopenglrecorder.so: undefined reference to `WelsDestroySVCEncoder'
collect2: error: ld returned 1 exit status
CMakeFiles/supertuxkart.dir/build.make:10654: recipe for target 'bin/supertuxkart' failed
make[2]: *** [bin/supertuxkart] Error 1
CMakeFiles/Makefile2:75: recipe for target 'CMakeFiles/supertuxkart.dir/all' failed

My snapcraft project is at https://github.com/diddledan/supertuxkart-snap for anyone who wishes to fiddle :-)