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

Compilation on OSX fails due to boost dependency #29

Closed
piehld opened this issue Oct 15, 2021 · 2 comments
Closed

Compilation on OSX fails due to boost dependency #29

piehld opened this issue Oct 15, 2021 · 2 comments

Comments

@piehld
Copy link

piehld commented Oct 15, 2021

Trying to build the program from source code seems to fail on OSX (10.15), due to an issue related to the boost dependency licudata. This issue has been reported by others in separate applications as well: Ref. 1, Ref. 2.

Based on some of the comments from those issues, I was able to resolve the installation here by removing the following lines from the CMakeLists.txt file (148–150, primarily the Boost_USE_STATIC_LIBS setting):

if(NOT BUILD_SHARED_LIBS)
	set(Boost_USE_STATIC_LIBS ON)
endif()

However, this seems like a bit of a hack, so I'd like to report the issue here for your review as well.

@piehld
Copy link
Author

piehld commented Oct 15, 2021

To provide more information on the error that arises during build, here is what occurs:

~/dssp/build % cmake --build . --config Release 
[ 16%] Building CXX object CMakeFiles/mkdssp.dir/src/dssp.cpp.o
[ 33%] Building CXX object CMakeFiles/mkdssp.dir/src/mkdssp.cpp.o
[ 50%] Linking CXX executable mkdssp
ld: library not found for -licudata
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [mkdssp] Error 1
make[1]: *** [CMakeFiles/mkdssp.dir/all] Error 2
make: *** [all] Error 2

@mhekkel
Copy link
Member

mhekkel commented Feb 9, 2022

The trouble here is that the boost libraries do not contain the correct dependency list in their cmake config file. In theory, cmake config files should specify what is needed to correctly link a library. In the case of boost this means you need the library icudata but also the path to this library.

BTW, the lines you commented out were in fact a hack from my side. They are gone in the latest version.

@mhekkel mhekkel closed this as completed Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants