As I am experimenting with latest build of kdenlive, mlt and ffmpeg from SVN, I do not want to break stable system versions, so I decided to build everything into a special directory in userspace for easy testing, upgrading and debugging. The trick is to persuade runtime linker pick libraries from build directory and not from system. One option is to set LD_LIBRARY_PATH every time kdenlive is launched. More convenient way is to instruct binaries and libs itself to prefer another directory when looking for dynamic libraries. I discovered RPATH which seems to do exactly this. But how to set it to build process?
I tried: export DEST_DIR=~/build/kdenlive export LDFLAGS=$LDFLAGS -rpath=../lib export RPATH=../lib export LD_RUN_PATH=../lib But if I try 'ldd' on created libs or binaries, it prints out that library calls system libraries from /usr/lib and not those builded from ~/build/lib Any help? There is not much help about RPATH on internet. By the way, I'm creating a bash script for building the whole lot - ffmpeg, mlt, mlt++. kdenlive with suggested parameters and necessary isolation from the rest of the system. If would like to share it indeed. This could make building kdendlive & corp. more easy. Thank you Jan ---------------------------------------------- More notes: If I try export CFLAGS=$CFLAGS -Wl,--rpath -Wl,../lib or export CFLAGS=$CFLAGS -Wl,--rpath,../lib then this warning appears on each gcc call: gcc: --rpath: linker input file unused because linking not done gcc: ../lib: linker input file unused because linking not done and also (?) gcc: unrecognized option '-rpath=../lib' If export LDFLAGS="$LDFLAGS -rpath ../lib" causes complete fail of ./configure, error message that gcc is unable to create executable I guess it is not necessary to manually set LD_LIBRARY_PATH variable prior to compilation. More confusion, sometimes is reffered as RPATH sometimes as LD_RUN_PATH. Which one is right for gcc/linux/automake systems?
