-
Notifications
You must be signed in to change notification settings - Fork 10
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
external BOOST library not properly picked up #2
Comments
I also have the same problem when I compiled CHAP in my mac, even that I tried to specify BOOST path by: cmake .. -DBOOST_ROOT=/usr/local/Cellar/boost/1.69.0/ -DBOOST_INCLUDEDIR=/usr/local/Cellar/boost/1.69.0/include/ The errors I got is: In file included from /Users/wyong/Work/Softwares/chap-version_0_8_0/src/geometry/spline_curve_1D.cpp:29: |
Thanks for pointing out this issue! I've so far only installed/tested CHAP with dependencies in standard install paths and so haven't come across this problem yet. I think it is due to CMake not telling the compiler where to find the Boost headers. If those are in a standard location, gcc will pick them up anyway, otherwise compilation fails as you describe. What should fix this is to add
to If you can confirm that this fixes the problem, I should be able to patch this quickly. |
Thanks for the help. It seems helpful by adding "target_include_directories(chap PUBLIC ${Boost_INCLUDE_DIRS})" in CMakeLists.txt. But now I got new errors: In file included from /Users/wyong/Work/Softwares/chap-version_0_9_1/src/trajectory-analysis/chap_trajectory_analysis.cpp:54: |
In my case adding
in
in |
Thanks for the quick feedback, I'll try to get an official patch ready asap. @yongwangCPH, your issue now seems to be something completely different and I suspect it originates from using a different compiler version or different compiler settings from what @stiobhan and I are using. Could you provide your OS and compiler versions? |
I am using MacOS Mojave and AppleClang 10.0.1 compiler. I also pasted the cmake command as below: cmake ../ -DLAPACKE_CBLAS_INCLUDE_DIR=/usr/local/opt/lapack/include -DCMAKE_PREFIX_PATH=/Users/wyong/Work/Softwares/GMX2016.5/share/cmake/gromacs_mpi/ -DBOOST_ROOT=/usr/local/Cellar/boost/1.69.0/ -DBOOST_INCLUDEDIR=/usr/local/Cellar/boost/1.69.0/include/ -DBOOST_LIBRARYDIR=/usr/local/Cellar/boost/1.69.0/lib/ |
@yongwangCPH , I think what you are seeing is a new problem separate from the BOOST library. Could you perhaps create a separate issue for this? I've never worked with MacOS or the Clang compiler, so this is a bit of a guess: Most of the output that you posted is just warnings that can probably be safely ignored (the header guard issue is an easily fixable typo). The only proper error that stops Clang from finishing is the narrowing conversion, but that too sounds like a rather strict interpretation of the C++ standard as NaN should be the same for float and double (and gcc seems fine with it). So my hope would be that there is a Clang compiler flag that makes it treat |
I noticed an issue when building with a BOOST library that is installed in a non-standard location. I can get cmake to pick it up by setting
-DBOOST_ROOT=/path/to/boost
, but when I executemake
it fails at some point because the compiler doesn't find the header files:Running make in verbose mode shows that the compiler command line is missing the flag
-I/path/to/boost/include
:CMakeCache.txt is attached
CMakeCache.txt
The text was updated successfully, but these errors were encountered: