Summary: | --libs-only-l does not contain anything even though --libs does | ||
---|---|---|---|
Product: | pkg-config | Reporter: | andrea.tagliasacchi |
Component: | src | Assignee: | Dan Nicholson <dbn.lists> |
Status: | RESOLVED NOTOURBUG | QA Contact: | |
Severity: | critical | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | Mac OS X (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
andrea.tagliasacchi
2014-08-06 11:23:57 UTC
Sorry for the slow reply. Could you show the contents of opencv.pc? ~: cat /usr/local/lib/pkgconfig/opencv.pc # Package Information for pkg-config prefix=/usr/local/Cellar/opencv/2.4.9 exec_prefix=${prefix} libdir= includedir_old=${prefix}/include/opencv includedir_new=${prefix}/include Name: OpenCV Description: Open Source Computer Vision Library Version: 2.4.9 Libs: ${exec_prefix}/lib/libopencv_calib3d.dylib ${exec_prefix}/lib/libopencv_contrib.dylib ${exec_prefix}/lib/libopencv_core.dylib ${exec_prefix}/lib/libopencv_features2d.dylib ${exec_prefix}/lib/libopencv_flann.dylib ${exec_prefix}/lib/libopencv_gpu.dylib ${exec_prefix}/lib/libopencv_highgui.dylib ${exec_prefix}/lib/libopencv_imgproc.dylib ${exec_prefix}/lib/libopencv_legacy.dylib ${exec_prefix}/lib/libopencv_ml.dylib ${exec_prefix}/lib/libopencv_nonfree.dylib ${exec_prefix}/lib/libopencv_objdetect.dylib ${exec_prefix}/lib/libopencv_ocl.dylib ${exec_prefix}/lib/libopencv_photo.dylib ${exec_prefix}/lib/libopencv_stitching.dylib ${exec_prefix}/lib/libopencv_superres.dylib ${exec_prefix}/lib/libopencv_ts.a ${exec_prefix}/lib/libopencv_video.dylib ${exec_prefix}/lib/libopencv_videostab.dylib Cflags: -I${includedir_old} -I${includedir_new} ~: Oh, that's a tricky one. You're not actually specifying -l anywhere, so pkg-config thinks it's doing the right thing. It might be possible to fix this, but the best thing to do would be to fix the opencv pkg-config file to act like a standard pc file. prefix=/usr/local/Cellar/opencv/2.4.9 exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir_old=${prefix}/include/opencv includedir_new=${prefix}/include Name: OpenCV Description: Open Source Computer Vision Library Version: 2.4.9 Libs: -L${exec_prefix}/lib -lopencv_calib3d -lopencv_contrib -lopencv_core ... Cflags: -I${includedir_old} -I${includedir_new} Actually, now that I think about this some more, I think the bug is in cmake's FindPkgConfig. They're assuming that the only way to specify libraries is through -l. That's a reasonable assumption, but not technically correct. It's entirely reasonable to specify an absolute path to a library. I think this would be fixed if the LIBRARIES call was made as --libs-only-l --libs-only-other. The other flags will contain all of your direct opencv*.dylib libraries. That might introduce other issues in cmake's pkg-config handling, but I don't believe this is pkg-config's bug. This is either cmake's bug (assuming -l contains all the libraries) or opencv's bug (shipping a non-standard pkg-config file). |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.