opencv.pc have wrong linking library (Bug #3485)


Added by Changlin Hsieh about 11 years ago. Updated over 9 years ago.


Status:Open Start date:2014-01-14
Priority:Normal Due date:
Assignee:Roman Donchenko % Done:

0%

Category:build/install
Target version:2.4.10
Affected version:2.4.8 (latest release) Operating System:Linux
Difficulty: HW Platform:x64
Pull request:

Description

I use cmake 2.8.12.1 on Ubuntu 12.04

The opencv.pc generate by opencv 2.4.7~2.4.8 is like:

===========================================================================================================================

  1. Package Information for pkg-config

prefix=/usr/local
exec_prefix=${prefix}
libdir=
includedir_old=${prefix}/include/opencv
includedir_new=${prefix}/include

Name: OpenCV
Description: Open Source Computer Vision Library
Version: 2.4.8
Libs: ${exec_prefix}/lib/libopencv_calib3d.so ${exec_prefix}/lib/libopencv_contrib.so ${exec_prefix}/lib/libopencv_core.so ${exec_prefix}/lib/libopencv_features2d.so ${exec_prefix}/lib/libopencv_flann.so ${exec_prefix}/lib/libopencv_gpu.so ${exec_prefix}/lib/libopencv_highgui.so ${exec_prefix}/lib/libopencv_imgproc.so ${exec_prefix}/lib/libopencv_legacy.so ${exec_prefix}/lib/libopencv_ml.so ${exec_prefix}/lib/libopencv_nonfree.so ${exec_prefix}/lib/libopencv_objdetect.so ${exec_prefix}/lib/libopencv_photo.so ${exec_prefix}/lib/libopencv_stitching.so ${exec_prefix}/lib/libopencv_superres.so ${exec_prefix}/lib/libopencv_ts.a ${exec_prefix}/lib/libopencv_video.so ${exec_prefix}/lib/libopencv_videostab.so /usr/local/cuda/lib64/libcufft.so /usr/local/cuda/lib64/libcublas.so /usr/local/cuda/lib64/libnpps.so /usr/local/cuda/lib64/libnppi.so /usr/local/cuda/lib64/libnppc.so /usr/local/cuda/lib64/libcudart.so -llibippcore_l.a -llibipps_l.a -llibippi_l.a -llibippcv_l.a -llibippcc_l.a -llibippvm_l.a -ltbb /usr/lib/x86_64-linux-gnu/libXext.so /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libICE.so /usr/lib/x86_64-linux-gnu/libSM.so /usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libGLU.so -lrt -lpthread -lm -ldl
Cflags: -I${includedir_old} -I${includedir_new}

===========================================================================================================================

The linked library after videostab.so is redundant, and these libraries "-llibippcore_l.a -llibipps_l.a -llibippi_l.a -llibippcv_l.a -llibippcc_l.a -llibippvm_l.a -ltbb" format is wrong and without -L to specify where they are. The correct version is like "-L/opt/intel/ipp/lib/intel64 -lippcore_l -lipps_l -lippi_l -lippcv_l -lippcc_l -lippvm_l -L/opt/intel/tbb/lib/intel64/gcc4.4/ -ltbb".

By the way, the opencv 2.4.6.1 can generate correct opencv.pc like

===========================================================================================================================

  1. Package Information for pkg-config

prefix=/usr/local
exec_prefix=${prefix}
libdir=
includedir_old=${prefix}/include/opencv
includedir_new=${prefix}/include

Name: OpenCV
Description: Open Source Computer Vision Library
Version: 2.4.6.1
Libs: ${exec_prefix}/lib/libopencv_calib3d.so ${exec_prefix}/lib/libopencv_contrib.so ${exec_prefix}/lib/libopencv_core.so ${exec_prefix}/lib/libopencv_features2d.so ${exec_prefix}/lib/libopencv_flann.so ${exec_prefix}/lib/libopencv_gpu.so ${exec_prefix}/lib/libopencv_highgui.so ${exec_prefix}/lib/libopencv_imgproc.so ${exec_prefix}/lib/libopencv_legacy.so ${exec_prefix}/lib/libopencv_ml.so ${exec_prefix}/lib/libopencv_nonfree.so ${exec_prefix}/lib/libopencv_objdetect.so ${exec_prefix}/lib/libopencv_photo.so ${exec_prefix}/lib/libopencv_stitching.so ${exec_prefix}/lib/libopencv_superres.so ${exec_prefix}/lib/libopencv_ts.so ${exec_prefix}/lib/libopencv_video.so ${exec_prefix}/lib/libopencv_videostab.so
Cflags: -I${includedir_old} -I${includedir_new}<br>

===========================================================================================================================


opencv.pc - expected opencv.pc for Linux (886 Bytes) David McNamara, 2014-08-12 04:58 pm


Related issues

related to Bug #1925: pkg-config is broken in OpenCV-2.4.0 Incomplete 2012-05-12
duplicated by Bugfix #3934: opencv.pc file problem Cancelled 2014-09-30

Associated revisions

Revision 27b224ac
Added by Vadim Pisarevsky about 10 years ago

Merge pull request #3485 from mapycz:fix-calibrate-crash

History

Updated by Vladislav Vinogradov about 11 years ago

  • Status changed from New to Open

Updated by Alexander Smorkalov almost 11 years ago

  • Target version changed from 2.4.9 to 2.4.10

Updated by David McNamara over 10 years ago

Shouldn't the opencv.pc file have "-L" and "-l" flags on the link line, and not full paths to the library files?
like in the attached:

Updated by Maksim Shabunin over 9 years ago

Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4679

Also available in: Atom PDF