refresh-bio / colord

A versatile compressor of third generation sequencing reads.
GNU General Public License v3.0
49 stars 14 forks source link

ARM Architecture Support (Apple Silicon) #5

Open oxygen311 opened 1 year ago

oxygen311 commented 1 year ago

Hello!

I tried to run this tool with M1 MacBook on Mac OS. Unfortunately, it did not work.

Installation via conda install -c bioconda colord shows error:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - colord

Current channels:

  - https://conda.anaconda.org/bioconda/osx-arm64
  - https://conda.anaconda.org/bioconda/noarch
  - https://repo.anaconda.com/pkgs/main/osx-arm64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-arm64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

I decided to try to compile it by myself. brew install gcc@10 also leads to the error:

(base) alexey@Alexeys-MacBook-Pro:~$ brew install gcc@10
gcc@10: The x86_64 architecture is required for this software.
Error: gcc@10: An unsatisfied requirement failed this build.

I managed to install gcc and edit the makefile to find and use it. But finally I've got a compilation error:

(base) alexey@Alexeys-MacBook-Pro:~/Downloads/colord$ make
/opt/homebrew/bin/g++ -Wall -O3 -std=c++17 -static-libgcc -static-libstdc++ -pthread  -I src/colord/../common/libs/zlib -I src/colord/libs/kmc_api -I src/colord/libs/edlib -I src/colord/libs/CLI11 -c src/colord/timer.cpp -o src/colord/timer.o
/opt/homebrew/bin/g++ -Wall -O3 -std=c++17 -static-libgcc -static-libstdc++ -pthread  -I src/colord/../common/libs/zlib -I src/colord/libs/kmc_api -I src/colord/libs/edlib -I src/colord/libs/CLI11 -c src/colord/stats_collector.cpp -o src/colord/stats_collector.o
/opt/homebrew/bin/g++ -Wall -O3 -std=c++17 -static-libgcc -static-libstdc++ -pthread  -I src/colord/../common/libs/zlib -I src/colord/libs/kmc_api -I src/colord/libs/edlib -I src/colord/libs/CLI11 -c src/colord/reads_sim_graph.cpp -o src/colord/reads_sim_graph.o
In file included from src/colord/kmer_filter.h:26,
                 from src/colord/reads_sim_graph.h:21,
                 from src/colord/reads_sim_graph.cpp:19:
src/colord/hs.h:21:10: fatal error: mmintrin.h: No such file or directory
   21 | #include <mmintrin.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [src/colord/reads_sim_graph.o] Error 1

It seems the problem is because of using SSE commands which are implemented only under x64/x86 architecture. I think a possible solution is sse2neon but I am not sure it's the best and universal solution.

Later I can check using of this tool under ARM Linux.

marekkokot commented 1 year ago

Hi,

thanks! We are working on adding support for ARM to our software, but I'm not able to promise when it will be ready for this project. We will do our best.

oxygen311 commented 1 year ago

@marekkokot

Thank you for the info! Will wait for support.

Tested on ARM64 Linux (Ubuntu), and got the same error:

parallels@ubuntu-linux-22-04-desktop:~/Downloads/colord$ make
g++ -Wall -O3 -std=c++17 -static -Wl,--whole-archive -lstdc++fs -lpthread -Wl,--no-whole-archive  -I src/colord/../common/libs/zlib -I src/colord/libs/kmc_api -I src/colord/libs/edlib -I src/colord/libs/CLI11 -c src/colord/reads_sim_graph.cpp -o src/colord/reads_sim_graph.o
In file included from src/colord/kmer_filter.h:26,
                 from src/colord/reads_sim_graph.h:21,
                 from src/colord/reads_sim_graph.cpp:19:
src/colord/hs.h:21:10: fatal error: mmintrin.h: No such file or directory
   21 | #include <mmintrin.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:92: src/colord/reads_sim_graph.o] Error 1