I'm trying to compile bmdtools with a custom built version of libav 11 which I compiled under
~/libav-11.8/build using g++ 4.8.4 under Ubuntu 14.04.
bmd uses pkg-config to build g++ flags, and since compilation fails on the linking phase, I tested pkg-config output as follows:
echo `pkg-config --cflags --libs libavcodec libavformat libswscale libavutil`
-I/usr/local/include -pthread -L/usr/local/lib -lavformat -lavcodec -ldl -lasound -lz -lwscale -lavutil -lm
So I figured
-L flags where not set to the custom build location. Setting
PKG_CONFIG_PATH=~/libav-11.8/build/lib/pkgconfig and running it again yelded
-Ibuild/include -pthread -Lbuild/lib ...<lib flags>
which would be correct if I ran g++ from the build root folder. Shouldn't pkg-config resolve to an absolute path instead of a relative one? What is the rationale behind this behaviour?