opencv.pc pkg-config file issue with libtool (Patch #2032)
Description
A recent change in opencv.pc replaces traditional -L/full/path/dir -ldep in Libs: pkg-config field by less traditional /full/path/dir/libdep.so
This raises an issue with libtool. libtool is not able to create a shared library and link it against other shared libraries specified with such a full path.
Eg. libtool --mode=link gcc -o libtarget.la libdep.lo /full/path/dir/libdep.so fails (the dependency libdep is ignored). This is a long standing issue in libtool.
This issue in libtool has never been fixed because the semantics of specifying such a full path for creating shared libraries is not well defined (according to libtool developers).
So I suggest fixing opencv.pc and revert it to what has always done for .pc files, e.g -L/dir -ldep, which is known to work everywhere.
Attached patch is a suggestion on how to implement this.
(BTW, installing 3rd party libraries in /shared is really a bad idea, since /shared is arch independent, but that's another issue :)
Associated revisions
Merge pull request #2032 from ilya-lavrenov:tapi_mulSpectrums
History
Updated by Andrey Kamaev almost 13 years ago
Thanks for your suggestion.
Actually the problem is deeper than choosing between full and relative paths. For now I'm closing this issue as a duplicate.
- Tracker changed from Bug to Patch
- Status changed from Open to Cancelled