Today i try install OpenCv in my MacOs Snow Leopard 10.6 and have this error:
error: CPU you selected does not support x86-64 instruction set
The searching in google have the solution
go to opencv folder and edit configure file, searchi prescott and replace the line
DEFAULT_CXXFLAGS="-g -march=prescott -ffast-math -fomit-frame-pointer $DEFAULT_CXXFLAGS"
DEFAULT_CXXFLAGS="-g -march=i686 -m32 -ffast-math -fomit-frame-pointer $DEFAULT_CXXFLAGS"
But when i try to compile i have other error i now looking for how to resolve it
Now i can install opencv lib with macport!!!
1.- i have old macport then first i need clean and delete it.
port installed > myports.txt sudo port clean installed sudo port -f uninstall installed
2.- Install ports you need you can see myports.txt to know the old ports you have installed before clean.
3.- Patch the opencv port: see http://trac.macports.org/ticket/21014 and download the patch Portfile-sl_64bit_21014.diff
4.- Follow the instruction in post of patch
Check where you installed macports, that is usually /opt/local/ Locate the Portfile for OpenCV, for me that is at
now apply the third patch (Portfile-sl_64bit_21014.diff) by executing
sudo patch Portfile -i ~/Downloads/Portfile-sl_64bit_21014.diff
in the above directory (adjust the last path accordingly to your download location)
When you execute port variants opencv you should see the sl_64bit_21014 variant. Now install opencv with
sudo port install opencv +sl_64bit_21014