OpenCV port variants

George Profenza orgicus at gmail.com
Wed Aug 1 11:39:46 PDT 2012


Thanks Ryan,

This is very well explained, thanks!
I've built with python27 and after cleaning all went well.

For now I've also built OpenCV from source on an external hard drive
without installing
and set the OpenNI CMake flag on (which is off by default - and it makes
sense since
probably the majority of OpenCV user might not use OpenNI). For my
OpenCV/OpenNI
project I've copied the .dylibs built with OpenNI support in the project
folder.

In the future it would be cool if there would be an openni variant I could
install:
`sudo port upgrade --enforce-variants opencv +qt4 +python27 +openni`
and I imagine other developers will benefit from this, but I don't see this
suitable as a default.

Thanks again, I appreciate the time taken to explain !

On Wed, Aug 1, 2012 at 7:28 PM, Ryan Schmidt <ryandesign at macports.org>wrote:

> On Aug 1, 2012, at 04:02, George Profenza <orgicus at gmail.com> wrote:
>
> > I'm learning OpenCV and have used MacPorts for the install using the
> default install:
> >
> > sudo port install opencv
> >
> > I'm not sure if it was installed with Qt4 support or Python support
> though.
> > I've also installed Pallet and noticed variants such as qt4 and python26.
>
> You can see what variants a port was installed with by running e.g.
>
> port installed opencv
>
>
> On Aug 1, 2012, at 04:58, George Profenza <orgicus at gmail.com> wrote:
>
> > On Aug 1, 2012, at 04:32, Clemens Lang <cal at macports.org> wrote:
> >
> >> If you want qt4 and python26 you could run
> >>      `sudo port upgrade --enforce-variants opencv +qt4 +python26`
> >> or for python27
> >>      `sudo port upgrade --enforce-variants opencv +qt4 +python27`
> >
> > I've got an error when trying to enforce the python26 variant:
> > Error: xorg-libxcb: Variant python26 conflicts with python27
> > Error: Unable to open port: Error evaluating variants
> > To report a bug, follow the instructions in the guide:
> >     http://guide.macports.org/#project.tickets
>
> Yeah… the problem is xorg-libxcb has python variants too, and you happened
> to have it installed with the python27 variant already. Now when trying to
> upgrade, MacPorts is trying to *add* to the python26 variant to that, which
> is incompatible. To get this to work you would have to also specify that
> you *don't* want to use the python27 variant anymore, like this:
>
> sudo port upgrade --enforce-variants opencv +qt4 +python26 -python27
>
> Or, better yet, do what you already did, and install with the python27
> variant, since that's newer and better.
>
>
>
> On Aug 1, 2012, at 06:46, Clemens Lang <cal at macports.org> wrote:
>
> > On Aug 1, 2012, at 06:40, George Profenza <orgicus at gmail.com> wrote:
> >
> >>
> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_opencv/opencv/work/OpenCV-2.4.2:
> No such file or directory
> >
> > MacPorts will always build whatever is the latest version in the ports
> > tree. If you really need 2.4.1 for some obscure reason you can use
> >       http://trac.macports.org/wiki/howto/InstallingOlderPort.
> >
> > However, I'm not sure why this would fail with this error message. Can
> > you clean opencv, re-try and attach the logfile or open a ticket and
> > attach it there if it fails again?
>
> It failed because of #29223. Cleaning and trying again was the correct
> solution and is the first thing you should try anytime any port fails to
> install.
>
>
>
> On Aug 1, 2012, at 10:11, George Profenza <orgicus at gmail.com> wrote:
>
> > Got another question related to the OpenCV port.
> > Is there a way to find out if the OpenCV port is installed with OpenNI
> support ?
> > If so, how ? If it's not built with OpenNI support, how can I tell
> MacPorts to rebuilt
> > the library with OpenNI support ?
>
> There are no occurrences of the string "OpenNI" in the OpenCV Portfile. If
> OpenCV builds with OpenNI support by default, then it is on. If not, then
> it is off andMacPorts does not offer a way to turn it on, in which case you
> could file a ticket in our issue tracker requesting this feature.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20120801/70f60fcd/attachment.html>


More information about the macports-users mailing list