Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jun 2014 13:50:13 -0400
From:      "Jason E. Hale" <jhale@FreeBSD.org>
To:        Zenny <garbytrash@gmail.com>
Cc:        ports@freebsd.org
Subject:   Re: opencv2 import problem with python
Message-ID:  <CAJE75NFi7LZz1rjjOjBoFd_LFmBTgBO%2BNvnbY0oSxcGeJWuQAw@mail.gmail.com>
In-Reply-To: <CACuV5sAVa_5Cpbj4f9QRUGy=gLGgQ2oCO9MsTo%2B6AiD0emevDQ@mail.gmail.com>
References:  <CACuV5sCnYrScft%2BQT80Qfg_4su73q3z3xo37B2m5tGOs_aX5aw@mail.gmail.com> <20140629083408.GR1560@funkthat.com> <CACuV5sAVa_5Cpbj4f9QRUGy=gLGgQ2oCO9MsTo%2B6AiD0emevDQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--001a11339e2eae5adc04fcfd2cac
Content-Type: text/plain; charset=UTF-8

On Sun, Jun 29, 2014 at 4:47 AM, Zenny <garbytrash@gmail.com> wrote:
> Thanks John:
>
> I am getting the following:
>
> "% grep ZTIN2cv15FeatureDetectorE /usr/local/lib/*
> Binary file /usr/local/lib/libopencv_contrib.so matches
> Binary file /usr/local/lib/libopencv_contrib.so.2 matches
> Binary file /usr/local/lib/libopencv_contrib.so.2.4.7 matches
> Binary file /usr/local/lib/libopencv_features2d.so matches
> Binary file /usr/local/lib/libopencv_features2d.so.2 matches
> Binary file /usr/local/lib/libopencv_features2d.so.2.4.7 matches
> Binary file /usr/local/lib/libopencv_legacy.so matches
> Binary file /usr/local/lib/libopencv_legacy.so.2 matches
> Binary file /usr/local/lib/libopencv_legacy.so.2.4.7 matches
> Binary file /usr/local/lib/libopencv_stitching.so matches
> Binary file /usr/local/lib/libopencv_stitching.so.2 matches
> Binary file /usr/local/lib/libopencv_stitching.so.2.4.7 matches
>
> I am CCing this mail to jhale for his attention, who is reportedly the
> maintainer accoring to the ports Makefile.
>
> /z
>
>
>
>
> On Sun, Jun 29, 2014 at 10:34 AM, John-Mark Gurney <jmg@funkthat.com> wrote:
>>
>> Zenny wrote this message on Sun, Jun 29, 2014 at 10:24 +0200:
>> > Hi:
>> >
>> > I am trying to run opencv2 and installed it using the pkg binaries
>> > (opencv
>> > and py27-opencv).
>> >
>> > However when I try to import opencv2 module, it outputs:
>> >
>> > "% python
>> > Python 2.7.6 (default, Mar  4 2014, 19:30:28)
>> > [GCC 4.2.1 Compatible FreeBSD Clang 3.3 (tags/RELEASE_33/final 183502)]
>> > on
>> > freebsd10
>> > Type "help", "copyright", "credits" or "license" for more information.
>> > >>> import cv2
>> > Traceback (most recent call last):
>> >   File "<stdin>", line 1, in <module>
>> > ImportError: /usr/local/lib/python2.7/site-packages/cv2.so: Undefined
>> > symbol "_ZTIN2cv15FeatureDetectorE"
>> > >>>"
>> >
>> > cv2.so file does exist. Any hints to run opencv2 in FreeBSD 10.0 will be
>> > appreciated! Thanks!
>>
>> Sounds like one of the libraries that cv2.so depends upon wasn't linked
>> w/ cv2.so...  doing a: grep ZTIN2cv15FeatureDetectorE /usr/local/lib/*
>> should identify it, and you should report it to opencv2's maintainer
>> to fix..
>>
>> --
>>   John-Mark Gurney                              Voice: +1 415 225 5579
>>
>>      "All that I will do, has been done, All that I have, has not."
>
>

I'm moving this discussion to the freebsd-ports mailing list.

Could you try the attached diff?  It's interesting that this has been
in the ports
tree for 7 months and nobody noticed it until now.

Note: you need to import numpy before cv2.

--001a11339e2eae5adc04fcfd2cac
Content-Type: text/plain; charset=US-ASCII; name="opencv.diff"
Content-Disposition: attachment; filename="opencv.diff"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_hx0nb8yk0

SW5kZXg6IG9wZW5jdi9NYWtlZmlsZQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBvcGVuY3YvTWFrZWZpbGUJKHJl
dmlzaW9uIDM1NzAzNikKKysrIG9wZW5jdi9NYWtlZmls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ICR7T0NWX1BZVEhPTl9MSUJTfQogSU5TVEFMTF9XUktTUkM9CSR7V1JLU1JD
fS9tb2R1bGVzL3B5dGhvbgogLmVsaWYgZGVmaW5lZChPQ1ZfSkFWQSkKIEJVSUxEX0RFUEVORFMr
PQlhbnQ6JHtQT1JUU0RJUn0vZGV2ZWwvYXBhY2hlLWFudApJbmRleDogcHktb3BlbmN2L01ha2Vm
aWxlCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT0KLS0tIHB5LW9wZW5jdi9NYWtlZmlsZQkocmV2aXNpb24gMzU3MDM2KQor
KysgcHktb3BlbmN2L01ha2VmaWxlCSh3b3JraW5nIGNvcHkpCkBAIC0xLDcgKzEsNyBAQAogIyBD
cmVhdGVkIGJ5OiBNYXJ0aW4gTWF0dXNrYSA8bW1ARnJlZUJTRC5vcmc+CiAjICRGcmVlQlNEJAog
Ci1QT1JUUkVWSVNJT049CTEKK1BPUlRSRVZJU0lPTj0JMgogQ0FURUdPUklFUz0JZ3JhcGhpY3Mg
cHl0aG9uCiBQS0dOQU1FUFJFRklYPQkke1BZVEhPTl9QS0dOQU1FUFJFRklYfQogCg==
--001a11339e2eae5adc04fcfd2cac--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJE75NFi7LZz1rjjOjBoFd_LFmBTgBO%2BNvnbY0oSxcGeJWuQAw>