Closed yzongzjnu closed 5 years ago
I'll look into it and try to emulate the error on WSL - also thanks for the print out.
I wasn't able to recreate the error but I think I found what's wrong - It looks like you're missing some essential C libraries (possibly libgeos-3.4.2). If you follow these steps, it should help:
sudo apt-get update sudo apt-get upgrade sudo apt-get install build-essential sudo apt-get update
If that doesn't work try:
sudo apt-get install libgeos-3.4.2 sudo apt-get update
If you run into any other errors, just post them here and I can help you through it.
On a side note; on the 'dev-container' branch - In addition to the Singularity install container, I will be creating a Docker Angsd-Wrapper container that will be compatible with Windows Subsystem on Linux (WSL), (currently Singularity is not compatible with WSL). The container will make installation super simple and easy.
I wasn't able to recreate the error but I think I found what's wrong - It looks like you're missing some essential C libraries (possibly libgeos-3.4.2). If you follow these steps, it should help:
sudo apt-get update sudo apt-get upgrade sudo apt-get install build-essential sudo apt-get update
If that doesn't work try:
sudo apt-get install libgeos-3.4.2 sudo apt-get update
If you run into any other errors, just post them here and I can help you through it.
On a side note; on the 'dev-container' branch - In addition to the Singularity install container, I will be creating a Docker Angsd-Wrapper container that will be compatible with Windows Subsystem on Linux (WSL), (currently Singularity is not compatible with WSL). The container will make installation super simple and easy.
Thank you! I tried that following your suggestion. I downloaded the C lib from here https://packages.ubuntu.com/trusty/amd64/libgeos-3.4.2/download and installed it. Still the same error message.
I am curious one of the reminding error message.
abcHWE.cpp:272:8: error: ‘isnan’ was not declared in this scope
if(isnan(newFreq1*0.5 + newFreq2)){
It seems different with the code in abcHWE.cpp. It looks like this,
if(1){ *if(std::isnan(newFreq10.5 + newFreq2)){* fprintf(stderr,"problems in abcHWE: \tx[0] %f\tx[1] %f\told 1 %f 2 %f 3 %f\tnew 1 %f 2 %f 3 %f \n",x[0],x[1],freq0,freq1,freq2,newFreq0,newFreq1,newFreq2); // exit(0); } x[0] = newFreq10.5 + newFreq2; x[1] = 1 - newFreq1/(2x[0](1-x[0])) ; }
I have no idea now~ :(
Did you upgrade, install build-essentials and then update? That should be you're first step before installing any libraries (like libgeos-3.4.2) ; and try using the ''sudo apt-get install'' method to install libraries instead of manually installing them. Installing libraries manually can be troublesome if they're not linked correctly to the program. ''sudo apt-get install
Also, can you save a larger portion of the error message to a text file and attach it to this thread. It maybe another issue that's cascading into other installation functions.
Problem solved!I tried again following your suggestion except for installing the libgeos-3.4.2. I used
sudo apt install libgeos-dev
to install libgeos-3.6.2 and related libraries.
Actually, I think the make failure is due to the environment. I setup in the App Ubuntu installed from Windows Store. This time I tried to setup using Bash on Ubuntu on Windows. I used the identical protocol as I did before to setup angsd-wrapper. It worked well after I installed the libgeos-dev.
Thanks a lot!
No problem; generally Linux is very particular with environmental variables and libraries - especially when compiling scripts. That's why 'ANGSD-Wrapper' was created; to simplify the process, but it can still be difficult.
Glad we could help - if you need anymore assistance, don't hesitate to contact us.
Hi!
I have a similar problem, but libgeos (3.8.0) is already installed. Any suggestions?
abcHWE.cpp: In member function ‘void abcHWE::HWE_EM(double*, double*, int)’:
abcHWE.cpp:272:8: error: ‘isnan’ was not declared in this scope; did you mean ‘std::isnan’?
272 | if(isnan(newFreq1*0.5 + newFreq2)){
| ^~~~~
| std::isnan
In file included from analysisFunction.h:6,
from abc.h:8,
from abcFreq.h:2,
from abcHWE.cpp:17:
/usr/include/c++/9/cmath:632:5: note: ‘std::isnan’ declared here
632 | isnan(_Tp __x)
| ^~~~~
make: *** [Makefile:47: abcHWE.o] Error 1
Linux 5.4.0-47-generic #51-Ubuntu
@siberianhigh were you ever able to solve this issue? I am in this boat as well with libgeos v3.6.2 and sudo apt update
and sudo apt upgrade
show all packages are updated to the most recent version. I have no idea if this is correct but should the problem line from abcHWE.cpp read :
if(std::isnan(newFreq1*0.5 + newFreq2))
?
If so, how do you continue with the build once this is fixed in the abcHWE.cpp file?
Hi there, I wanted to install angsd-wrapper locally. Unfortunately, the dependencies setup of angsd-wrapper was not easy as it was described on github (https://github.com/ANGSD-wrapper/angsd-wrapper). There was an error message as following when I ran “./angsd-wrapper setup dependencies”,
############################################################ 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 ############################################################ OS: Windows 10 subsystem Linux Version: Linux version 4.4.0-17134-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) Command used: just following the setup instruction on https://github.com/ANGSD-wrapper/angsd-wrapper.**
Can somebody help me to solve the problem? Thanks!