2008-11-24 58 views
4

我碰到下面的错误,而在OS X 10.5(英特尔)建设的OpenCV:的OpenCV的Python的 - OS X

ld: warning in .libs/_cv_la-_cv.o, file is not of required architecture 
ld: warning in .libs/_cv_la-error.o, file is not of required architecture 
ld: warning in .libs/_cv_la-pyhelpers.o, file is not of required architecture 
ld: warning in .libs/_cv_la-cvshadow.o, file is not of required architecture 
ld: warning in ../../../cv/src/.libs/libcv.dylib, file is not of required architecture 
ld: warning in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libcxcore.dylib, file is not of required architecture 
Undefined symbols for architecture i386: 
"_fputs$UNIX2003", referenced from: 
    _PySwigObject_print in _cv_la-_cv.o 
    _PySwigPacked_print in _cv_la-_cv.o 
    _PySwigPacked_print in _cv_la-_cv.o 
ld: symbol(s) not found for architecture i386 
collect2: ld returned 1 exit status 
lipo: can't open input file: /var/folders/Sr/Srq9N4R8Hr82xeFvW3o-uk+++TI/-Tmp-//cchT0WVX.out (No such file or directory) 
make[4]: *** [_cv.la] Error 1 
make[3]: *** [all-recursive] Error 1 
make[2]: *** [all-recursive] Error 1 
make[1]: *** [all-recursive] Error 1 
make: *** [all] Error 2 

虽然运行./configure --without-蟒蛇一切正常。另一个奇怪的是,当我使用的Python 2.4.5或2.5.1一切都已经建立好了,这个问题转换到Python框架后发生2.5.2

+0

您正在使用哪种python发行版?也许它还没有经过OpenCV的测试。你有没有考虑过使用macports构建python和opencv? – speciousfool 2008-11-26 08:04:32

回答

0

好吧,我种的工作了

它需要从MacPorts的或任何蟒蛇进行编译。然后我需要运行/System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5(这是我以前的python版本),并且OpenCV正常。

1

这似乎有点不可思议,这是观察时警告有关不同的架构对于/Developer/SDKs/MacOSX10.4u.sdk而链接 - 你能不能给我们介绍一下你的编译环境的一些更详细(的XCode,GCC,Python版本,$ PATH等)

或者,不会将任何的OpenCV二进制文件可用吗?

0

/Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib只是删除文件导致的警告我收到后到/ usr/local/lib目录 链接:

ld: warning in .libs/_cv_la-_cv.o, file is not of required architecture 
ld: warning in .libs/_cv_la-error.o, file is not of required architecture 
ld: warning in .libs/_cv_la-pyhelpers.o, file is not of required architecture 
ld: warning in .libs/_cv_la-cvshadow.o, file is not of required architecture 
ld: warning in ../../../cv/src/.libs/libcv.dylib, file is not of required architecture 
ld: warning in /Users/Pietras/opencv/cxcore/src/.libs/libcxcore.dylib, file is not of required architecture 
Undefined symbols for architecture i386: ... ` 

这些文件是由make创建的。

GCC:为i686-苹果darwin9-GCC-4.0.1

$ PATH:

/Library/Frameworks/Python.framework/Versions/Current/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/sw/bin:/sw/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/AVRMacPack/bin:/usr/X11R6/bin 

的XCode 3(最新)

的Python 2.5.1(R251:54869,四月18 2007年,22时08分04秒) - MacPython上从python.org (试图降级,并使用它,而不是2.5.2,但不工作了...)

which python 
/Library/Frameworks/Python.framework/Versions/Current/bin/python 

我没有找到OS X的任何Python OpenCV二进制文件。 我试图在从macports设置python2.4或2.5作为默认设置的情况下进行编译和安装,但是当我尝试导入时有一条总线错误或致命的Python错误解释器未初始化(版本不匹配?) 并且它退出。