From owner-freebsd-ports@FreeBSD.ORG Mon Jun 30 06:44:09 2014 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED68E5BF; Mon, 30 Jun 2014 06:44:08 +0000 (UTC) Received: from amailer.gwdg.de (amailer.gwdg.de [134.76.10.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C31523A3; Mon, 30 Jun 2014 06:44:08 +0000 (UTC) Received: from gate.nw-fva.de ([134.76.242.1] helo=pc028.nfv) by mailer.gwdg.de with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.80) (envelope-from ) id 1X1V17-0002Hf-U9; Mon, 30 Jun 2014 08:24:41 +0200 Message-ID: <53B102A3.9030909@gwdg.de> Date: Mon, 30 Jun 2014 08:24:35 +0200 From: Rainer Hurling User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: "Jason E. Hale" Subject: Re: opencv2 import problem with python References: <20140629083408.GR1560@funkthat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Authenticated: Id:rhurlin X-Spam-Level: - Cc: ports@freebsd.org, Zenny X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 06:44:09 -0000 Am 29.06.2014 19:50 (UTC+1) schrieb Jason E. Hale: > On Sun, Jun 29, 2014 at 4:47 AM, Zenny 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 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 "", line 1, in >>>> 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. I am one of those guys who had some trouble with disfunctional opencv libs, but did not react. Sorry for that, I had been very busy last months. math/saga is a GIS application, which uses OpenCV in one of its modules. For some month now, SAGA GIS disables this module at start time of the program. I tried your patch for graphics/opencv, but nothing changed for me. It seems, the opencv libs continue to be non usable. > Note: you need to import numpy before cv2. Does this mean, we have to rebuild and reinstall math/py-numpy before installing graphics/opencv? Do we have to also reinstall graphics/opencv-core? Thanks for your work, Rainer Hurling