Can't install msa on FreeBSD
1
1
Entering edit mode
spcohen2 ▴ 20
@spcohen2-13810
Last seen 7.3 years ago

I am trying to install msa, and get a namespace error when trying to compile ClustalOmega. I am running FreeBSD 11.0-RELEASE with a generic kernel, have R version 3.4.1, gcc 5.4.0, and GNU Make 4.2.1. Here is relevant error, and the full compile log can be seen at https://pastebin.com/95v6Nj2P

In file included from hhalign/hhalign.cpp:78:0:

hhalign/hhhit-C.h: In member function 'int Hit::Forward(HMM&, HMM&, float**)':

hhalign/hhhit-C.h:736:20: error: 'isnan' was not declared in this scope

     if (isnan(score) || isinf(score) || isnan(Pforward) || isinf(Pforward) ){

                    ^

hhalign/hhhit-C.h:736:20: note: suggested alternative:

In file included from hhalign/hhalign.cpp:43:0:

/usr/local/lib/gcc5/include/c++/cmath:862:5: note:   'std::isnan'

     isnan(_Tp __f)

     ^

In file included from hhalign/hhalign.cpp:78:0:

hhalign/hhhit-C.h:736:36: error: 'isinf' was not declared in this scope

     if (isnan(score) || isinf(score) || isnan(Pforward) || isinf(Pforward) ){

                                    ^

hhalign/hhhit-C.h:736:36: note: suggested alternative:

In file included from hhalign/hhalign.cpp:43:0:

/usr/local/lib/gcc5/include/c++/cmath:853:5: note:   'std::isinf'

     isinf(_Tp __f)

     ^

In file included from hhalign/hhalign.cpp:78:0:

hhalign/hhhit-C.h:748:69: error: 'isinf' was not declared in this scope

     if (isinf(F_MM[i][j]+F_MI[i][j]+F_IM[i][j]+F_DG[i][j]+F_GD[i][j])){

                                                                     ^

hhalign/hhhit-C.h:748:69: note: suggested alternative:

In file included from hhalign/hhalign.cpp:43:0:

/usr/local/lib/gcc5/include/c++/cmath:853:5: note:   'std::isinf'

     isinf(_Tp __f)

     ^

In file included from hhalign/hhalign.cpp:78:0:

hhalign/hhhit-C.h: In member function 'int Hit::Backward(HMM&, HMM&)':

hhalign/hhhit-C.h:917:20: error: 'isnan' was not declared in this scope

     if (isnan(score) || isinf(score)){

                    ^

hhalign/hhhit-C.h:917:20: note: suggested alternative:

In file included from hhalign/hhalign.cpp:43:0:

/usr/local/lib/gcc5/include/c++/cmath:862:5: note:   'std::isnan'

     isnan(_Tp __f)

     ^

In file included from hhalign/hhalign.cpp:78:0:

hhalign/hhhit-C.h:917:36: error: 'isinf' was not declared in this scope

     if (isnan(score) || isinf(score)){

                                    ^

hhalign/hhhit-C.h:917:36: note: suggested alternative:

In file included from hhalign/hhalign.cpp:43:0:

/usr/local/lib/gcc5/include/c++/cmath:853:5: note:   'std::isinf'

     isinf(_Tp __f)

     ^

In file included from hhalign/hhalign.cpp:78:0:

hhalign/hhhit-C.h:923:69: error: 'isinf' was not declared in this scope

     if (isinf(B_MM[i][j]+B_MI[i][j]+B_IM[i][j]+B_DG[i][j]+B_GD[i][j])){

                                                                     ^

hhalign/hhhit-C.h:923:69: note: suggested alternative:

In file included from hhalign/hhalign.cpp:43:0:

/usr/local/lib/gcc5/include/c++/cmath:853:5: note:   'std::isinf'

     isinf(_Tp __f)

     ^

hhalign/hhalign.cpp: In function 'int hhalign(char**, int, double*, char**, int, double*, double*, hmm_light*, char*, char*, char*, char*, hhalign_para, hhalign_scores*, int, int, char*, char*)':

hhalign/hhalign.cpp:1101:39: error: 'isnan' was not declared in this scope

                   if ((isnan(hit.score)) || (isnan(hit.Pforward))){

                                       ^

hhalign/hhalign.cpp:1101:39: note: suggested alternative:

In file included from hhalign/hhalign.cpp:43:0:

/usr/local/lib/gcc5/include/c++/cmath:862:5: note:   'std::isnan'

     isnan(_Tp __f)

     ^

hhalign/hhalign.cpp:1105:39: error: 'isnan' was not declared in this scope

                   if ((isnan(hit.score)) || (isnan(hit.Pforward))){

                                       ^

hhalign/hhalign.cpp:1105:39: note: suggested alternative:

In file included from hhalign/hhalign.cpp:43:0:

/usr/local/lib/gcc5/include/c++/cmath:862:5: note:   'std::isnan'

     isnan(_Tp __f)

     ^

make[2]: *** [/home/my_user_name/R-3.4.1/etc/Makeconf:166: hhalign/hhalign.o] Error 1

make[2]: Leaving directory '/tmp/RtmpGbVf2R/R.INS

* removing '/usr/home/my_user_name/R-3.4.1/library/msa'

 

The downloaded source packages are in

'/tmp/RtmpkMKv88/downloaded_packages'

Old packages: 'tibble'

Warning message:

In install.packages(pkgs = doing, lib = lib, ...) :TALLa8314cd385fe/msa/src/ClustalOmega/src'

make[1]: *** [msaMakefile:48: clustalomega] Error 1

make[1]: Leaving directory '/tmp/RtmpGbVf2R/R.INSTALLa8314cd385fe/msa/src/ClustalOmega'

make: *** [Makevars:36: build_clustalomega] Error 2

ERROR: compilation failed for package 'msa'

  installation of package 'msa' had non-zero exit status

software error FreeBSD msa • 2.0k views
ADD COMMENT
1
Entering edit mode
spcohen2 ▴ 20
@spcohen2-13810
Last seen 7.3 years ago

I fixed it myself. In case anyone else has this problem, I downloaded the source, and then changed every instance of isinf and isnan in hhalign/hhhit-C.h and hhalign/hhalign.cpp to std::isinf and std::isnan. I haven't tested it yet, but it compiled and loaded in R. The command for installing from source in R is:

install.packages("/path/to/msa", repos=NULL, type="source")

ADD COMMENT
1
Entering edit mode

Great to know that you managed to solve this issue. I will make some tests to see if your workaround also works on other systems and compilers. If so, I can include it in the release. Note, however, that this code is shipped with ClustalOmega. Can you compile ClustalOmega from source on your system? (http://www.clustal.org/omega/)

ADD REPLY
0
Entering edit mode

There seems to be some major difference with how FreeBSD's libc++ uses isnan and isinf compared to glibc++, since many programs cause the same error to FreeBSD users when compiling. Fortunately, since users had this problem with other programs, I could find a solution.

Without any tweaking, clustoalomega will not compile, but it is giving a different error than I was getting during clustalomega compilation with msa. I'll play around with it tonight. I'm used to needing to get creative when compiling stuff on FreeBSD!

I experienced another small error that I didn't mention earlier because it was easier to troubleshoot: FreeBSD doesn't use GNU Make by default. When initially trying to install msa, I was getting the error that it could not find the Makefile. It is because FreeBSD make does not recognize the --file=Makefile syntax that GNU make uses. In fact, it was reading --file=Makefile as -f, with the file being ile=Makefile. My solution was to temporarily replace FreeBSD make with GNU make. Both FreeBSD make and GNU make understand the -f file argument format, but only GNU make understands --file=file.

ADD REPLY
1
Entering edit mode

That's why GNU make is listed as system requirement. ;-)

ADD REPLY
0
Entering edit mode

Yep, and was easy enough to change. Just mentioning it in case anyone else ever tries to install msa on FreeBSD and has trouble with it. I might be the only person, though :)

ADD REPLY

Login before adding your answer.

Traffic: 558 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6