문제

OS X 10.5 (Intel)에서 OpenCV를 구축하는 동안 다음 오류가 발생합니다.

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은 모든 것이 정상입니다. 또 다른 이상한 점은 Python 2.4.5 또는 2.5.1을 사용했을 때 모든 것이 OK를 구축했을 때 Python Framework 2.5.2로 전환 한 후 문제가 발생했다는 것입니다.

도움이 되었습니까?

해결책 3

좋아, 나는 그것을 해결했다

MacPorts 또는 무엇이든 Python으로 컴파일해야합니다. 그런 다음 실행해야합니다 /System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5 (이것은 나의 이전 Python 버전입니다) 그리고 OpenCV는 작동합니다.

다른 팁

연결 중에 /developer/sdks/macosx10.4u.sdk를 찾을 때 다른 아키텍처에 대해 경고하는 것이 조금 이상해 보입니다. 구축 환경 (Xcode, GCC, Python, $ Path 버전에 대한 자세한 내용은 좀 더 자세히 설명해주십시오. 등)

또는 OpenCV Binaries 중 어느 것도 당신을 위해 일하지 않습니까?

/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-Apple-Darwin9-GCC-4.0.1

$ 경로 :

/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, 4 월 18 일, 22:08:04) -Python.org의 MacPython (2.5.2 대신 다운 그레이드 및 사용하려고 시도했지만 더 이상 작동하지 않습니다 ...)

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

OS X에 대한 Python OpenCV Binaries를 찾지 못했습니다. MacPorts에서 Python2.4 또는 2.5를 기본값으로 설정하는 동안 만들려고 노력했지만 컴파일 및 설치할 때 버스 오류 또는 치명적입니다. Python Error Interpreter는 초기화되지 않았으며 (버전 불일치?) 그만 둡니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top