ANGSD-wrapper / angsd-wrapper

Utilities for analyzing next generation sequencing data.
MIT License
14 stars 4 forks source link

compilation error (abcHWE.cpp:272:8: error: ‘isnan’ was not declared in this scope) #10

Open StefanoLonardi opened 3 years ago

StefanoLonardi commented 3 years ago

Hello, I am trying to install this tool on Linux 4.15.0-147-generic #151-Ubuntu. The error I am getting is

abcHWE.cpp: In member function ‘void abcHWE::HWE_EM(double*, double*, int)’:
abcHWE.cpp:272:8: error: ‘isnan’ was not declared in this scope
     if(isnan(newFreq1*0.5 + newFreq2)){
        ^~~~~
abcHWE.cpp:272:8: note: suggested alternative:
In file included from analysisFunction.h:6:0,
                 from abc.h:8,
                 from abcFreq.h:2,
                 from abcHWE.cpp:17:
/usr/include/c++/7/cmath:639:5: note:   ‘std::isnan’
     isnan(_Tp __x)
     ^~~~~
Makefile:47: recipe for target 'abcHWE.o' failed
make: *** [abcHWE.o] Error 1

which was previously reported. I installed libgeos-dev, but it did not solve the problem

stelo@H4:~/sw/angsd-wrapper$ sudo apt install libgeos-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgeos-dev is already the newest version (3.6.2-1build2).
squisquater commented 2 years ago

I had the same issue and I was unable to install the libgeos-dev package using sudo apt install libgoes-dev due to restrictions with the computing cluster I use, so I ended up installing and compiling on my local computer and then transferring it to the cluster and it seemed to work out (though I ran into some other issues at a later stage)

janawold1 commented 2 years ago

Hi @StefanoLonardi, I'm having the exact same error with the same version of libgeos-dev. Were you ever able to resolve this issue with the fix recommended by squisquater?