-
Notifications
You must be signed in to change notification settings - Fork 114
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
macos/ARM/clang compile errors #295
Comments
Thanks, please open a PR with your changes. If the CI tests pass on your PR then it should be OK to merge it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I find some bugs when compiling with
/test/CMakeLists.txt
on ARM based macos with clang.I make several workarounds and now it compiles successfull. I don't know if it is necessary for a pull request and whether my workaround breaks the build on other platforms.
external/cmake-files/Eigen.cmake
, suffixs should be added to find_pathfind_path(EIGEN_DIR NAMES signature_of_eigen3_matrix_library PATHS ${EIGEN_CMAKE_DIR}/../_deps/eigen-src PATH_SUFFIXES eigen3 eigen)
, since eigen3 is contained in a subfolder and find_path doesn't find recursively.test/CMakeLists.txt
,add_definitions(${CMAKE_CXX_FLAGS} "-std=c++17")
should be replaced withset(CMAKE_CXX_STANDARD 17)
. CMAKE_CXX_FLAGS is passed to all compile commands including some external projects in C. Passing c++ standard flags when compiling C files causes warnings in gcc but errors in clang.external/cmake-files/LPSolve.cmake
. find_path searches for lpsolve.h. However if LPSolve is installed with homebrew,/opt/homebrew/include/
containslpsolve.h
but not${LP_SOLVE_DIR}/bfp
so if find_path finds the lpsolve.h in /opt/homebrew/include, the following include_directories and add_library commands in LPSolve.cmake won't work.
start=std::chrono::system_clock::now()
does not compile in clang ifstart
's type isstd::chrono::time_point<std::chrono::high_resolution_clock>
. high_resolution_clock and system_clock have different precision.Related files:
include/ode_solvers/implicit_midpoint.hpp
include/preprocess/crhmc/crhmc_problem.h
test/benchmarks_crhmc.cpp
include/random_walks/crhmc/crhmc_walk.hpp
external/PackedCSparse/FloatArray.h
.#include <immintrin.h>
causes compile errors. I think immintrin.h does not exists ARM machines. Removing this include seems to be fine.The text was updated successfully, but these errors were encountered: