opencv update

Andrew W. Nosenko andrew.w.nosenko at gmail.com
Thu Dec 5 07:54:47 UTC 2013


On Thu, Dec 5, 2013 at 3:38 AM, Andrew W. Nosenko <
andrew.w.nosenko at gmail.com> wrote:

> On Thu, Dec 5, 2013 at 12:07 AM, Lowell Gilbert <
> freebsd-ports-local at be-well.ilk.org> wrote:
>
>> Lowell Gilbert <freebsd-ports-local at be-well.ilk.org> writes:
>>
>> > Ajtim <lumiwa at gmail.com> writes:
>> >
>> >> I did what is in /usr/ports/UPDATING and looks like I am in trouble
>> >> now. My system is FreeBSD 10.0-BETA4 (amd64):
>> >>
>> >> ===> FreeBSD 10 autotools fix applied to
>> >> /usr/ports/multimedia/ffmpeg0/work/ffmpeg-0.7.16/configure
>> >> ERROR: opencv-core not found
>> >
>> > Looks like ffmpeg0's opencv support should now depend on graphics/opencv
>> > rather than graphics/opencv-core. I'm testing this theory now...
>>
>> No, that's not right. There's some configure-script editing in the port
>> that I hadn't noticed. It's probably a minor fix, but in the meantime
>> turning off ffmpeg0's option for opencv should get you around it.
>>
>>
> I didn't verified it yet, but my assumption that it's combination of wrong
> order of linker parameters and --as-needed option.  Libraries placed before
> object file, which uses them (wrong order), so at the time of theirs
> occurrence they are unneeded and therefore skipped.  Similar problem would
> to occur independently of --as-needed if static libraries would be used
> instead of dynamic, or linker occur more strict/conservative.
>
> PS. @Mark: cvCreateImageHeader, symbol, which test program tries to find
> in opencv-core.so library, exists there and exported indeed.  It absent in
> the output of plain nm (or 'nm -a' in your case) just because library is
> heavy stripped (removed anything unneeded for ld.so).  If use 'nm -D', you
> will see that symbol.
>
>
ffmpeg0 configure script considers as libraries only parameters started
with '-l'.  See check_ld() functions.

But opencv-core pkg-config file (opencv-core.pc) reports absolute
library filenames
    "/usr/local/lib/libopencv_core.so /usr/local/lib/libopencv_imgproc.so"
instead of expected by configure
    "-L/usr/local/lib -lopencv_core -lopencv_imgproc".
It results in treating these .so as CFLAGS with all consequences.

There are two ways to cure:
1. patch ffmpeg0 configure to detect libraries without -l
2. patch opencv-core .pc file to report libraries as -lname instead of
   /path/to/libname.so

Patch for ffmpeg0 configure is attached.

-- 
Andrew W. Nosenko <andrew.w.nosenko at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-configure-check-ld
Type: application/octet-stream
Size: 492 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20131205/c5da3f38/attachment.obj>


More information about the freebsd-ports mailing list