Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Dec 2013 09:54:46 +0200
From:      "Andrew W. Nosenko" <andrew.w.nosenko@gmail.com>
To:        Lowell Gilbert <freebsd-ports-local@be-well.ilk.org>
Cc:        Ajtim <lumiwa@gmail.com>, wg@freebsd.org, FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: opencv update
Message-ID:  <CALa-7vwpU%2BR7H4zkwiLBc2o3eF0UjnhFJOurWzMzRTiu8f8bag@mail.gmail.com>
In-Reply-To: <CALa-7vzK_L810kh-p1Ktqyds_10zqUMC6xaRX6_UhKSvwBJHnQ@mail.gmail.com>
References:  <9791025.9uybD67rLo@lumiwa.farms.net> <44iov4fl19.fsf@lowell-desk.lan> <448uw0fex4.fsf@lowell-desk.lan> <CALa-7vzK_L810kh-p1Ktqyds_10zqUMC6xaRX6_UhKSvwBJHnQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--001a1134c792e5bfd304ecc4d77a
Content-Type: text/plain; charset=ISO-8859-1

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

> On Thu, Dec 5, 2013 at 12:07 AM, Lowell Gilbert <
> freebsd-ports-local@be-well.ilk.org> wrote:
>
>> Lowell Gilbert <freebsd-ports-local@be-well.ilk.org> writes:
>>
>> > Ajtim <lumiwa@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@gmail.com>

--001a1134c792e5bfd304ecc4d77a
Content-Type: application/octet-stream; name=patch-configure-check-ld
Content-Disposition: attachment; filename=patch-configure-check-ld
Content-Transfer-Encoding: base64
X-Attachment-Id: f_hotplb9k0

LS0tIGNvbmZpZ3VyZS0JMjAxMy0xMi0wNSAwOToxMToxMi4wMDAwMDAwMDAgKzAyMDAKKysrIGNv
bmZpZ3VyZQkyMDEzLTEyLTA1IDA5OjQyOjQ4LjAwMDAwMDAwMCArMDIwMApAQCAtNjQxLDcgKzY0
MSwxMCBAQCBjaGVja19sZCgpewogICAgIGZsYWdzPScnCiAgICAgbGlicz0nJwogICAgIGZvciBm
OyBkbwotICAgICAgICB0ZXN0ICIke2Z9IiA9ICIke2YjLWx9IiAmJiBmbGFncz0iJGZsYWdzICRm
IiB8fCBsaWJzPSIkbGlicyAkZiIKKyAgICAgICAgY2FzZSAiJGYiIGluCisgICAgICAgICAgICAt
bCp8Ki5zb3wqLmEpIGxpYnM9IiRsaWJzICRmIjs7CisgICAgICAgICAgICAqKSBmbGFncz0iJGZs
YWdzICRmIjs7CisgICAgICAgIGVzYWMKICAgICBkb25lCiAgICAgY2hlY2tfY2MgJCgkZmlsdGVy
X2NmbGFncyAkZmxhZ3MpIHx8IHJldHVybgogICAgIGNoZWNrX2NtZCAkbGQgJExERkxBR1MgJGZs
YWdzIC1vICRUTVBFICRUTVBPICRsaWJzICRleHRyYWxpYnMK
--001a1134c792e5bfd304ecc4d77a--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALa-7vwpU%2BR7H4zkwiLBc2o3eF0UjnhFJOurWzMzRTiu8f8bag>