Closed rlorigro closed 8 months ago
I tried using #include <endian.h>
and #include <machine/endian.h>
in my own project and <machine/endian.h>
works but the other does not.
After some more searching I learned that using <sys/types.h> is supposed to be more portable than trying to include endian.h directly. I made a fork and tested it on my system and it works.
To be honest, I'm not sure why my build system doesn't activate the conditional clause if defined(__APPLE__)
that you already had there. But it may have something to do with how I have compiled/linked in CMake:
ExternalProject_Add(project_wfa
URL https://github.com/smarco/WFA2-lib/archive/refs/tags/v2.3.4.tar.gz
TIMEOUT 5
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/external/wfa2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_RPATH=${CMAKE_SOURCE_DIR}/external/wfa2/lib/
INSTALL_COMMAND make install
)
add_library(wfa2 SHARED IMPORTED)
set_property(TARGET wfa2
PROPERTY IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/external/wfa2/lib/libwfa2cpp.${LIB_SUFFIX})
# /sv_merge/external/wfa2/lib
add_dependencies(wfa2 project_wfa)
add_dependencies(sv_merge wfa2)
# Specify include dir
include_directories(
${CMAKE_SOURCE_DIR}/external/wfa2/include/wfa2lib
)
Let me know your thoughts. I would prefer not to use a fork if possible. Maybe I am missing something simple.
Hi,
Thanks for the report and sorry for the terrible delay in answering. I am not an expert on macOS but I appreciate your research and looks good to me. Would you like to make a PR to development
and get the credit for the patch?
Let me know,
sure, PR is up now
Thanks!
Hi,
I unfortunately need to compile this library on an M1 Mac and I am running into an error:
clang:
on macOS Sonoma 14.2 (23C64)
Based on some quick googling it may be as simple as using
<machine/endian.h>
in this particular contextThanks