macportsヤメてhomebrewにしました。でopencvをsnow leopardに入れる方法
homebrewの導入についてはこちら。
mac ports やめました! ー homebrew で快適 OSX 生活! - ”><xmp>TokuLog 改メ tokuhirom’s blog
homebrewのインストール - LAPISLAZULI HILL#Hatena
homebrew - 徹夜族
MacPortsではなく、homebrewを使う - cipher
brew install pythonでpython2.7を入れられてしまったので、brew edit pythonして、s/2.7/2.6.6/ で置換しつつmd5を修正してpython2.6.6を入れました。で、virturalenvで使うようにした。
入れたもの。
ozaki@yuroyoro-MacBook-2 $ brew list --versions bdw-gc 7.1 cmake 2.8.2 coreutils 8.5 distribute 0.6.14 erlang R14B gdbm 1.8.3 gettext 0.17 git 1.7.3.2 gnupg 1.4.11 jasper 1.900.1 jpeg 8b libpng 1.2.44 libtiff 3.9.4 lv 4.51 lynx 2.8.7 ncftp 3.2.4 neon 0.29.3 nkf 2.1.0 nmap 5.35DC1 node 0.2.4 npm 0.2.5-1 opencv 2.1.1-pre pip 0.8.1 pkg-config 0.25 proctools 0.4pre1 python 2.6.6 2.7 readline 6.1 sqlite 3.7.2 subversion 1.6.13 tbb 30_20100310 tree 1.5.3 w3m 0.5.2 wget 1.12
で、opencv入れようとして、'brew install opencv'とやると、cmakeのmakeでコケます。
こことか、ここに書いてあるとおり、"Java for Mac OS X 10.6 Update 3"に起因する問題らしい。なんぞ?
Issue #2773: Cannot build cmake · mxcl/homebrew · GitHub
#26934 (cmake 2.8.2_3 fails to build after Java Update)
– MacPorts
-- Looking for elf.h - not found -- Looking for a Fortran compiler -- Looking for a Fortran compiler - NOTFOUND -- Java version 1.6.0.22 configured successfully! -- Found Java: /Library/Java/Home/bin/java CMake Error at Tests/CMakeLists.txt:1630 (FILE): file Internal CMake error when trying to open file: /System/Library/Frameworks/JavaVM.framework/Headers/jni.h for reading. -- Configuring incomplete, errors occurred! --------------------------------------------- Error when bootstrapping CMake: Problem while running initial CMake --------------------------------------------- Exit status: 11 http://github.com/mxcl/homebrew/blob/master/Library/Formula/cmake.rb#L23 ...略 ==> Build Flags CC: /usr/bin/cc => /usr/bin/gcc-4.2 CXX: /usr/bin/c++ => /usr/bin/c++-4.2 LD: /usr/bin/cc => /usr/bin/gcc-4.2 CFLAGS: -O3 -w -pipe CXXFLAGS: -O3 -w -pipe MAKEFLAGS: -j4 Error: Failure while executing: ./bootstrap --prefix=/usr/local/Cellar/cmake/2.8.2 --system-libs --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man Please report this bug at http://github.com/mxcl/homebrew/issues These existing issues may help you: http://github.com/mxcl/homebrew/issues/#issue/2773 Also try: `brew doctor` to check your setup for common problems. `brew missing` to check installed packages for missing deps.
で、ここから"Java for Mac OS X 10.6 Update 3 Developer Package"を落としていれると通るようになるます。
Sign in with your Apple ID - Apple Developer
homebrewイイネ。macportsとかもうないわ。