UBod / msa

R package for multiple sequence alignment
https://github.com/UBod/msa
17 stars 11 forks source link

Issue with muscle during install #22

Closed cstrlln closed 1 year ago

cstrlln commented 1 year ago

Hello, I'm having an issue during install, looks to me specifically while dealing with Muscle. Looks similar to this error: https://github.com/arb-project/homebrew-arb/issues/4

In particular I'm trying to install msa in R in a conda environment, but also couldn't in my regular R installation. I tried both in an M1 and intel mac.

Error is below:

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:68:21: note: expanded from macro 'INFINITY'
#define INFINITY    HUGE_VALF
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:58:28: note: expanded from macro 'HUGE_VALF'
#   define    HUGE_VALF    __builtin_huge_valf()
                           ^
/Users/cc/mambaforge/envs/R-2023-feb-osx64/bin/../include/c++/v1/limits:332:90: note: previous implicit declaration is here
    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_valf();}
                                                                                         ^
1 error generated.
make[2]: *** [/Users/cc/mambaforge/envs/R-2023-feb-osx64/lib/R/etc/Makeconf:178: subfams.o] Error 1
make[2]: Leaving directory '/private/var/folders/2n/b_m3klds26l3_d3qlqd7qtlm0000gq/T/RtmpgUabBC/R.INSTALL18b524f8d9ce/msa/src/Muscle'
make[1]: *** [msaMakefile:9: muscle] Error 1
make[1]: Leaving directory '/private/var/folders/2n/b_m3klds26l3_d3qlqd7qtlm0000gq/T/RtmpgUabBC/R.INSTALL18b524f8d9ce/msa/src/Muscle'
make: *** [Makevars:20: build_muscle] Error 2
ERROR: compilation failed for package ‘msa’
* removing ‘/Users/cc/mambaforge/envs/R-2023-feb-osx64/lib/R/library/msa’
Warning message:
In i.p(...) :
  installation of package ‘/var/folders/2n/b_m3klds26l3_d3qlqd7qtlm0000gq/T//RtmpT2r2ov/filed791235f8156/msa_1.31.2.tar.gz’ had non-zero exit status
UBod commented 1 year ago

I am sorry that you are encountering troubles when installing 'msa'! It seems there is an incompatibility with some Xcode headers. For the time being, I have no idea how to fix this. Have you tried using the 'msa' binary package? It is available both for x86_64 and arm64 (both devel and release).

UBod commented 1 year ago

I have now made a change in the Muscle source code that should fix this incompatibility. The change has been pushed to this GitHub repo here (not yet to the official BioC repo). Can you please try to install the version here on GitHub and let me know if it works now? Thanks"

cstrlln commented 1 year ago

@UBod, it install properly now, thanks for the fast response! Just curious what was the fix?

UBod commented 1 year ago

In the file src/Muscle/subfams.cpp, a macro INFINITY was defined that conflicted with a definition from math.h. I changed it to AUX_INFINITY, and the conflict was resolved. That was all. :-)