salilab / imp

The Integrative Modeling Platform
https://integrativemodeling.org
GNU General Public License v3.0
70 stars 30 forks source link

problem compiling on mac os x #789

Closed yannickspill closed 10 years ago

yannickspill commented 10 years ago

I am unable to build the latest IMP on my mac. However, XCode was also updated so I don't know whose fault it is.

[7/154] Linking CXX shared library lib/libimp_base.dylib
FAILED: : && /usr/bin/c++  -fcolor-diagnostics -w  -g  -dynamiclib -Wl,-headerpad_max_install_names -framework CoreFoundation -fsanitize=undefined -fsanitize=undefined -o lib/libimp_base.dylib -install_name /Users/Yannick/Documents/imp/build-debug/lib/libimp_base.dylib modules/base/src/CMakeFiles/IMP.base-lib.dir/__/__/__/src/base/paths.cpp.o modules/base/src/CMakeFiles/IMP.base-lib.dir/__/__/__/src/base_all.cpp.o modules/base/src/CMakeFiles/IMP.base-lib.dir/__/__/__/src/base_config.cpp.o  /usr/local/lib/libboost_filesystem-mt.dylib /usr/local/lib/libboost_program_options-mt.dylib /usr/local/lib/libboost_system-mt.dylib /usr/local/lib/libprofiler.dylib /usr/local/lib/libboost_random-mt.dylib && :
ld: file not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1/lib/darwin/libclang_rt.ubsan_osx.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

For a start, if you know how to remove the fsanitize and framework flags, that would help me a lot. I am using the mavericks clang and the rest is an up-to-date homebrew. Here's my cmake.

cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja -DIMP_DISABLED_MODULES="domino:multifit:system:example:misc:em2d:modeller:cgal:membrane" ../src/  -DIMP_PER_CPP_COMPILATION="isd2:isd:saxs:core" -DCMAKE_CXX_FLAGS="-fcolor-diagnostics" -DPYTHON_LIBRARY="/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib" -DPYTHON_INCLUDE_DIR="/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7/"
benmwebb commented 10 years ago

Works fine on our Mavericks build machine: http://salilab.org/imp/nightly/logs/develop/20140420/mac10v9-intel/base.build.log

However that is running XCode 5.1. I just updated it to 5.1.1 so we'll see tomorrow whether we get the same problem here.

yannickspill commented 10 years ago

thanks. can you tell me how to turn off the frameworks in the meantime?

benmwebb commented 10 years ago

Nope. Why would you want to do that anyway?

yannickspill commented 10 years ago

oh because libclang_rt.ubsan_osx.a is related to -framework CoreFoundation -fsanitize=undefined

cgreenberg commented 10 years ago

I'm getting a related error, but only on a debug build (Mavericks, latest Xcode, ...)

FAILED: /usr/local/Cellar/open-mpi/1.7.3/bin/mpicxx   -DIMPBASE_COMPILATION -DIMPBASE_EXPORTS -DIMP_base_lib_EXPORTS -w  -g -fPIC -Iinclude -I/usr/local/include    --std=c++11 -fsanitize=undefined -fno-sanitize-recover -MMD -MT modules/base/src/CMakeFiles/IMP.base-lib.dir/__/__/__/src/base/paths.cpp.o -MF "modules/base/src/CMakeFiles/IMP.base-lib.dir/__/__/__/src/base/paths.cpp.o.d" -o modules/base/src/CMakeFiles/IMP.base-lib.dir/__/__/__/src/base/paths.cpp.o -c src/base/paths.cpp
clang: error: unsupported argument 'undefined' to option 'fsanitize='
ninja: build stopped: subcommand failed.
yannickspill commented 10 years ago

it's in debug mode in my case as well. fast builds fine.

Le 22/04/14 02:51, Charles Greenberg a écrit :

I'm getting a related error, but only on a debug build (Mavericks, latest Xcode, ...)

FAILED: /usr/local/Cellar/open-mpi/1.7.3/bin/mpicxx -DIMPBASE_COMPILATION -DIMPBASE_EXPORTS -DIMP_base_lib_EXPORTS -w -g -fPIC -Iinclude -I/usr/local/include --std=c++11 -fsanitize=undefined -fno-sanitize-recover -MMD -MT modules/base/src/CMakeFiles/IMP.base-lib.dir////src/base/paths.cpp.o -MF "modules/base/src/CMakeFiles/IMP.base-lib.dir////src/base/paths.cpp.o.d" -o modules/base/src/CMakeFiles/IMP.base-lib.dir///__/src/base/paths.cpp.o -c src/base/paths.cpp clang: error: unsupported argument 'undefined' to option 'fsanitize=' ninja: build stopped: subcommand failed.

— Reply to this email directly or view it on GitHub https://github.com/salilab/imp/issues/789#issuecomment-40993223.