Member Site › Forums › PyRosetta › PyRosetta – Build/Install › Numerous problems when building PyRosetta from source – issues linking clang 5.1
- This topic has 7 replies, 3 voices, and was last updated 10 years, 7 months ago by Anonymous.
-
AuthorPosts
-
-
April 17, 2014 at 6:26 pm #1877Anonymous
I’m running a Mac 10.9 64Bit system, and I’m trying to build it against a homebrewed install of Python 2.7.6. I’m using the 2014wk05 rosetta bundle.
clang –version
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posixThere have been several issues along the way, which have been addressed in a different thread (https://www.rosettacommons.org/node/3608) but it seemed it would be more appropriate to move the discussion here.
I found that when using clang to compile PyRosetta, there were multiple points at which the compiler was expecting clang version 5.0 when the current version is 5.1 – specifically, it’s looking for a bunch of lib files in build/src/pyrosetta/macos/10.9/64/x86/clang/5.0/default/ when the actual directory tree uses 5.1 instead of 5.0. To illustrate, here’s the error that it returns when it tries to link libmini.dylib:
Linking mini lib…
cd /Users/juliaudell/Downloads/rosetta_2014wk05_bundle/main/source && cd build/src/pyrosetta/macos/10.9/64/x86/clang/5.0/default/ && gcc -dynamiclib -Xlinker -headerpad_max_install_names
… [long list of .os files]
-lz -lstdc++ -o /Users/juliaudell/Downloads/rosetta_2014wk05_bundle/main/source/src/python/bindings/rosetta/libmini.dylib
it gives the error
/bin/sh: line 0: cd: build/src/pyrosetta/macos/10.9/64/x86/clang/5.0/default/: No such file or directoryFurthermore it looks like the clang version is hard coded in BuildBindings.py, line 684:
elif platform.release()[:2] == ’13’: lib_path = ‘build/src/’+mode+’/macos/10.9/64/x86/clang/’; version_add_on = ‘5.0/default/’
lib_path = lib_path += version_add_onUsing -I/
and -L/ doesn’t help things, and while I can include a flag for a different compiler, there doesn’t appear to be a way to flag for the version. Changing the version number in the version_add_on variable yields a whole slew of “symbols not found for architecture x86_64” errors, attached here.
Where do I go from here?
-
April 18, 2014 at 5:11 am #9993Anonymous
I’ll forward your question to Sergey, he should be able to help. But, in the meantime, why not use the precompiled binaries for lion/mountain lion (the snow leopard binaries will not work). I havn’t had any issues using them after the upgrade to mavericks. Are they not working for you?
-
April 22, 2014 at 6:46 pm #10023Anonymous
Regarding your build errors: it looks like you trying to use clang for rebuild. New clang came with new std lib which is not very compatible yet. Solution for this is to rebuild with GCC (you need GCC away to run gccxml). Please check what output you get when running ‘gcc -v’ because by default Xcode replace gcc with symlink to clang.
-
April 18, 2014 at 5:03 pm #9994Anonymous
Thank you for passing my question along.
I have the precompiled binaries for lion, but I can’t get them to import. When I run “import rosetta” this is what I get:
ImportError: dlopen(/Users/juliaudell/Documents/PythonProjects/PyRosetta.MacOSX.Lion.64Bit.release-r8/rosetta/utility/__utility_all_at_once_.so, 2): Library not loaded: rosetta/libmini.dylib
Referenced from: /Users/juliaudell/Documents/PythonProjects/PyRosetta.MacOSX.Lion.64Bit.release-r8/rosetta/utility/__utility_all_at_once_.so
Reason: image not foundIf I can circumvent this error then I’d be happy to start playing with the precompiled version.
-
April 18, 2014 at 5:50 pm #9996Anonymous
Have you ran SetPyRosettaEnvironment.sh?
-
April 22, 2014 at 6:39 pm #10021Anonymous
Did you copy libboost* to src/python/bindings/ dir? The error is basically saying that one of the dynamic lib is missing etc.
-
April 22, 2014 at 5:08 pm #10019Anonymous
Apparently not. I found the issue – I was trying to run SetPyRosettaEnvironment.sh through Eclipse, which doesn’t work because it modifies the bash environment options. It now runs fine (as far as I can tell) when launched from the native python.
-
April 22, 2014 at 6:42 pm #10022Anonymous
Also, pre-compiled binaries will only work on Apple-Python. So if you replace your default python you need to ether restore it or just run the right executable. Try ‘which python’ to see what interpreter you using. If you want to use other python binaries (say from MacPorts or Homebrew then you absolutely need to rebuild PyRosetta and use that other Python interpreter and insure that it have dynamic lib.
-
-
AuthorPosts
- You must be logged in to reply to this topic.