ekg / seqwish

alignment to variation graph inducer
MIT License
143 stars 18 forks source link

[Question] Is Linux ARM64 a supported architecture? #98

Closed markjens closed 1 year ago

markjens commented 2 years ago

Hello,

I’d like to ask whether seqwish is supported on Linux/Mac ARM64 systems ? Any concerns ? Any positive/negative experience ?

Thank you!

julien-faye commented 2 years ago

I've just tried to build the project on Ubuntu 20.04 aarch64:

$ cmake -H. -DCMAKE_BUILD_TYPE=Debug -Bbuild && cmake --build build -- -j 2
...
[ 90%] Linking CXX static library libsdsl.a
[ 90%] Built target sdsl
[100%] Linking CXX static library libgtest_main.a
[100%] Built target gtest_main
[ 81%] No install step for 'sdsl-lite'
[ 82%] Completed 'sdsl-lite'
[ 82%] Built target sdsl-lite
Scanning dependencies of target seqwish
[ 83%] Building CXX object CMakeFiles/seqwish.dir/src/utils.cpp.o
[ 84%] Building CXX object CMakeFiles/seqwish.dir/src/tempfile.cpp.o
c++: error: unrecognized command line option ‘-mcx16’
make[2]: *** [CMakeFiles/seqwish.dir/build.make:63: CMakeFiles/seqwish.dir/src/utils.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
c++: error: unrecognized command line option ‘-mcx16’
make[2]: *** [CMakeFiles/seqwish.dir/build.make:76: CMakeFiles/seqwish.dir/src/tempfile.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:435: CMakeFiles/seqwish.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

$ gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
markjens commented 2 years ago

Thanks for testing it, @julien-faye !

I guess this means Linux ARM64 is not supported at the moment.

ekg commented 2 years ago

It should be supported. I think you can just drop that compiler flag. It's not essential. I don't have a system to test with to confirm.

On Fri, Jul 29, 2022, 11:03 markjens @.***> wrote:

Thanks for testing it, @julien-faye https://github.com/julien-faye !

I guess this means Linux ARM64 is not supported at the moment.

— Reply to this email directly, view it on GitHub https://github.com/ekg/seqwish/issues/98#issuecomment-1199044806, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABDQEJZ4VG6QAJYDP4HMG3VWOM5RANCNFSM54CRUJZA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

julien-faye commented 2 years ago

Thanks for the help, @ekg ! Indeed the build passed with the following quick patch:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 38dd09c..63af318 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,12 +27,12 @@ endif ()

 if (${CMAKE_BUILD_TYPE} MATCHES Debug)
   # Debug use the defaults
-  set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O -mcx16 -g -fsanitize=address")
-  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O -mcx16 -g -fsanitize=address")
+  set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O -g -fsanitize=address")
+  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O -g -fsanitize=address")
 else()
   # Use all standard-compliant optimizations - always add these:
-  set (CMAKE_C_FLAGS "${OpenMP_C_FLAGS} ${PIC_FLAG} ${EXTRA_FLAGS} -mcx16")
-  set (CMAKE_CXX_FLAGS "${OpenMP_CXX_FLAGS} ${PIC_FLAG} ${EXTRA_FLAGS} -mcx16")
+  set (CMAKE_C_FLAGS "${OpenMP_C_FLAGS} ${PIC_FLAG} ${EXTRA_FLAGS} ")
+  set (CMAKE_CXX_FLAGS "${OpenMP_CXX_FLAGS} ${PIC_FLAG} ${EXTRA_FLAGS} ")
 endif ()

 # Set the output folder where your program will be created
$ file bin/seqwish 
bin/seqwish: ELF 64-bit LSB shared object, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=9f55501fb2804acbafd52da637d1df3d50b89ec4, for GNU/Linux 3.7.0, with debug_info, not stripped

I'll play some more and send a PR soon!

ekg commented 1 year ago

In theory it should work. I have not tried but will support anyone who attempts it.

On Wed, Jul 20, 2022, 09:33 markjens @.***> wrote:

Hello,

I’d like to ask whether seqwish is supported on Linux/Mac ARM64 systems ? Any concerns ? Any positive/negative experience ?

Thank you!

— Reply to this email directly, view it on GitHub https://github.com/ekg/seqwish/issues/98, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABDQEMP6B3AD55O4FNFRW3VU6TTFANCNFSM54CRUJZA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

julien-faye commented 1 year ago

This has been fixed with https://github.com/ekg/seqwish/pull/99

markjens commented 1 year ago

Thank you for your help, @julien-faye !