OpenCV port variants
ryandesign at macports.org
Wed Aug 1 11:28:57 PDT 2012
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:
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
> 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.
More information about the macports-users