You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I modified CMakeLists.txt as follows.
There was a linking error, but I removed -latomic, as I read it's unnecessary on macOS.
--- a/CMakeLists.txt+++ b/CMakeLists.txt@@ -48,10 +48,10 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # untested
# adapted from https://stackoverflow.com/questions/46414660/macos-cmake-and-openmp
# find_package(OpenMP) does not work reliably on macOS, so we do its work ourselves
set (OpenMP_C "${CMAKE_C_COMPILER}")
- set (OpenMP_C_FLAGS " -Xpreprocessor -fopenmp -I/opt/local/include/libomp -I/usr/local/include -L/opt/local/lib/libomp -L/usr/local/lib")+ set (OpenMP_C_FLAGS " -Xpreprocessor -fopenmp -I/opt/homebrew/Cellar/libomp/17.0.4/include/ -I/usr/local/include -L/opt/homebrew/Cellar/libomp/17.0.4/lib/ -L/usr/local/lib")
set (OpenMP_C_LIB_NAMES "libomp" "libgomp" "libiomp5")
set (OpenMP_CXX "${CMAKE_CXX_COMPILER}")
- set (OpenMP_CXX_FLAGS " -Xpreprocessor -fopenmp -I/opt/local/include/libomp -I/usr/local/include -L/opt/local/lib/libomp -L/usr/local/lib")+ set (OpenMP_CXX_FLAGS " -Xpreprocessor -fopenmp -I/opt/homebrew/Cellar/libomp/17.0.4/include/ -I/usr/local/include -L/opt/homebrew/Cellar/libomp/17.0.4/lib/ -L/usr/local/lib")
set (OpenMP_CXX_LIB_NAMES "libomp" "libgomp" "libiomp5")
set (OpenMP_libomp_LIBRARY "omp")
set (OpenMP_libgomp_LIBRARY "gomp")
@@ -256,7 +256,6 @@ target_link_libraries(seqwish
"${sdsl-lite_LIB}/libsdsl.a"
"${sdsl-lite-divsufsort_LIB}/libdivsufsort.a"
"${sdsl-lite-divsufsort_LIB}/libdivsufsort64.a"
- "-latomic"
Threads::Threads
jemalloc
z)
These changes allow us to generate executables for M2 Mac.
I am not sure if it actually compiles correctly. But I write here because I know that GitHub issues are the first place people come to look for information. Someone will add more information on how to compile on macOS.
The text was updated successfully, but these errors were encountered:
kojix2
added a commit
to kojix2/paryfor
that referenced
this issue
Nov 10, 2023
Hi
I compiled Seqwish on macOS.
I followed the recommended commands for compiling ODGI on macOS
See: pangenome/odgi#494
CC=/opt/homebrew/opt/llvm/bin/clang \ CXX=/opt/homebrew/opt/llvm/bin/clang++ \ LDFLAGS=-L/opt/homebrew/lib \ cmake . -Bbuild
I modified CMakeLists.txt as follows.
There was a linking error, but I removed
-latomic
, as I read it's unnecessary on macOS.get_current_dir_name()
does not work on macOS:I encountered an error with
std::min()
, but I am not familiar with the C++ language.After consulting with ChatGPT, I made the following change:
These changes allow us to generate executables for M2 Mac.
I am not sure if it actually compiles correctly. But I write here because I know that GitHub issues are the first place people come to look for information. Someone will add more information on how to compile on macOS.
The text was updated successfully, but these errors were encountered: