Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem compiling on mac os x #789

Closed
yannickspill opened this issue Apr 21, 2014 · 6 comments
Closed

problem compiling on mac os x #789

yannickspill opened this issue Apr 21, 2014 · 6 comments

Comments

@yannickspill
Copy link
Contributor

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
Copy link
Member

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
Copy link
Contributor Author

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

@benmwebb
Copy link
Member

Nope. Why would you want to do that anyway?

@yannickspill
Copy link
Contributor Author

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

@cgreenberg
Copy link
Contributor

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
Copy link
Contributor Author

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
#789 (comment).

benmwebb added a commit to salilab/cmake_modules that referenced this issue Apr 22, 2014
This doesn't seem to work any more with latest XCode.
Relates salilab/imp#789.
benmwebb added a commit to salilab/rmf that referenced this issue Apr 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants