bioconda / bioconda-recipes

Conda recipes for the bioconda channel.
https://bioconda.github.io
MIT License
1.6k stars 3.18k forks source link

Unable to Build `bowtie` on osx-arm64 #49284

Closed akikuno closed 1 month ago

akikuno commented 1 month ago

I submitted a Pull Request to make bowtie installable on osx-arm64, but it failed.

https://github.com/bioconda/bioconda-recipes/pull/49281

I couldn't determine the exact cause, but it seems that the issue might be due to cpuid only supporting x86.

05:41:46 BIOCONDA INFO (ERR) /opt/mambaforge/envs/bioconda/conda-bld/bowtie_1721108465169/_build_env/lib/clang/16/include/cpuid.h:14:2: error: this header is for x86 only

👆 Link of the Error

05:41:46 BIOCONDA INFO (ERR) /opt/mambaforge/envs/bioconda/conda-bld/bowtie_1721108465169/_build_env/lib/clang/16/include/cpuid.h:298:5: error: invalid output constraint '=a' in asm

👆 Link of the Error

The cpuid is found in processor_support.h of bowtie (link), but despite having the exact same code in bowtie2 (link), bowtie2 builds without issues on osx-arm64(link). Therefore, the cause might be something else. I couldn't determine the exact reason.

I apologize for the inconvenience, but I would appreciate any advice you could provide.

martin-g commented 1 month ago

Hi,

You will need to make some changes to the Makefile. For example at https://github.com/BenLangmead/bowtie/blob/master/Makefile#L74 there is a comparison of uname -m against aarch64 that is for Linux ARM64. To make it work for OSX you will need to add or arm64

akikuno commented 1 month ago

@martin-g

Thank you so much for your instruction!

There was a Pull Request in the bowtie repository regarding exactly this matter.

https://github.com/BenLangmead/bowtie/pull/131

I hope this one will be merged 🙏

martin-g commented 1 month ago

You can also do make POPCNT_CAPABILITY=0 for ARM64 in build.sh

akikuno commented 1 month ago

@martin-g

I've added make POPCNT_CAPABILITY=0 in build.sh and All checks have passed.

https://github.com/bioconda/bioconda-recipes/pull/49326

Thank you so much!

aliciaaevans commented 1 month ago

Closing since it looks like this was resolved in build.sh and there's an issue open to fix it upstream