opencv.pc pkg-config file issue with libtool (Patch #2032)


Added by anthony mallet almost 13 years ago. Updated almost 13 years ago.


Status:Cancelled Start date:2012-06-08
Priority:Normal Due date:
Assignee:Alexander Shishkov % Done:

0%

Category:build/install
Target version:2.4.2
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

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 :)


patch-ad - cmake patch for generating fixed .pc (1.2 kB) anthony mallet, 2012-06-08 01:51 pm

patch-ae - updated .pc template with static -L argument (no need to have it dynamic) (431 Bytes) anthony mallet, 2012-06-08 01:51 pm


Associated revisions

Revision a49211a7
Added by Andrey Pavlenko about 11 years ago

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

Also available in: Atom PDF