Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#32430 - [opencv] opencv.pc broken

Attached to Project: Arch Linux
Opened by Jan Steffens (heftig) - Saturday, 03 November 2012, 19:55 GMT
Last edited by Eric Belanger (Snowman) - Monday, 05 November 2012, 02:49 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Ray Rashif (schivmeister)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

opencv.pc currently looks like this:

# Package Information for pkg-config

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

Name: OpenCV
Description: Open Source Computer Vision Library
Version: 2.4.2
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_ts.so ${exec_prefix}/lib/libopencv_video.so ${exec_prefix}/lib/libopencv_videostab.so
Cflags: -I${includedir_old} -I${includedir_new}

---

However, it should be looking like this:

# Package Information for pkg-config

prefix=/usr
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.2
Libs: -L${libdir} -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_photo -lopencv_stitching -lopencv_ts -lopencv_video -lopencv_videostab
Cflags: -I${includedir_old} -I${includedir_new}

---

Otherwise, standard use of pkg-config --libs is broken.
This task depends upon

Closed by  Eric Belanger (Snowman)
Monday, 05 November 2012, 02:49 GMT
Reason for closing:  Fixed
Additional comments about closing:  opencv 2.4.3-1
Comment by Ray Rashif (schivmeister) - Saturday, 03 November 2012, 21:33 GMT
The pkg-config file is generated by a cmake script [1] based on a template [2], and it looks like they have intentionally left libdir blank. I see no linking 'L' or '-l' anywhere and, instead, they seem to be prefixing the lib path at line 55.

So, I really don't know what they're up to. Should we just patch it out, and post something upstream letting them know about this mess?

[1] https://gist.github.com/4008832
[2] https://gist.github.com/4008833
Comment by Jan Steffens (heftig) - Saturday, 03 November 2012, 21:41 GMT
I'd say patch it and ask upstream what they were doing.
Comment by Ray Rashif (schivmeister) - Saturday, 03 November 2012, 22:13 GMT
Yep, I see now that at least Fedora does:

http://pkgs.fedoraproject.org/cgit/opencv.git/tree/opencv-pkgcmake.patch

Will get to it.
Comment by Ray Rashif (schivmeister) - Sunday, 04 November 2012, 17:33 GMT
  • Field changed: Category (Packages: Extra → Upstream Bugs)
2.4.3 rolled out with fixed pkgconfig file, please test.
Comment by Jan Steffens (heftig) - Monday, 05 November 2012, 00:21 GMT
Looking good.

Loading...