簡體   English   中英

命令“ / usr / bin / clang ++ -bundle -undefined…”失敗,退出狀態為1

[英]Command “/usr/bin/clang++ -bundle -undefined…” failed with exit status 1

我正在嘗試在os x maverick中引用c ++“ boost”來建立庫“ cmappertools”,並遇到以下錯誤。 我對python和c ++ boost還是很陌生,甚至無法告訴從哪里開始:“ UnixCCompiler的缺少MorganC_fix修復”錯誤似乎並沒有指向我。 有什么主意嗎?

checking for exit in -lboost_thread-mt... yes
checking whether the Boost::Chrono library is available... yes
checking for exit in -lboost_chrono-mt... yes
checking whether C++ compiler accepts -fvisibility=hidden... yes
checking whether C++ compiler accepts -fno-common... yes
checking whether C++ compiler accepts -fvisibility-inlines-hidden... yes

...

building extension "cmappertools" sources
build_src: building npy-pkg config files
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
customize UnixCCompiler
**#### ['/usr/bin/clang', '-fno-strict-aliasing', '-fno-common', '-dynamic', '-arch', 'i386', '-arch', 'x86_64', '-g', '-DNDEBUG', '-g', '-fwrapv', '-O3', '-Wall', '-Wstrict-prototypes'] #######
Missing compiler_cxx fix for UnixCCompiler**
customize UnixCCompiler using build_ext
building 'cmappertools' extension
compiling C++ sources
C compiler: /usr/bin/clang++ -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -    DNDEBUG -g -fwrapv -O3 -Wall

compile options: '-I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-    packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c'
extra options: '-pthread -I/usr/local/include -fvisibility=hidden -fno-common -fvisibility-inlines-    hidden -ffunction-sections -fdata-sections'
clang++: cmappertools.cpp
/usr/bin/clang++ -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g build/temp.macosx-10.6-intel-2.7/cmappertools.o -o build/lib.macosx-10.6-intel-2.7/cmappertools.so -L/usr/local/lib -    lboost_thread-mt -lboost_chrono-mt -Wl,-s
ld: warning: option -s is obsolete and being ignored
ld: warning: ignoring file /usr/local/lib/libboost_thread-mt.dylib, file was built for x86_64 which         is not the architecture being linked (i386): /usr/local/lib/libboost_thread-mt.dylib
ld: warning: ignoring file /usr/local/lib/libboost_chrono-mt.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libboost_chrono-mt.dylib
ld: internal error: atom not found in     symbolIndex(__ZN5boost16exception_detail20copy_boost_exceptionEPNS_9exceptionEPKS1_) for architecture     i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: warning: option -s is obsolete and being ignored
ld: warning: ignoring file /usr/local/lib/libboost_thread-mt.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libboost_thread-mt.dylib
ld: warning: ignoring file /usr/local/lib/libboost_chrono-mt.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libboost_chrono-mt.dylib
ld: internal error: atom not found in     symbolIndex(__ZN5boost16exception_detail20copy_boost_exceptionEPNS_9exceptionEPKS1_) for architecture     i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: Command "/usr/bin/clang++ -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g     build/temp.macosx-10.6-intel-2.7/cmappertools.o -o build/lib.macosx-10.6-intel-2.7/cmappertools.so -L/usr/local/lib -lboost_thread-mt -lboost_chrono-mt -Wl,-s" failed with exit status 1

您需要以組合的32/64位編譯boost-它僅在64位模式下編譯。

如果您通過brew安裝boost,則應該在安裝命令中添加--universal選項。

如果您是手動構建增強功能,則應添加以下選項:

address-model=32_64 architecture=x86

b2編譯行。 這將導致它以32位和64位構建,這應該支持您的python構建。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM