Open denisemauldin opened 3 years ago
This is the error that is thrown after the haplotype*.h files are edited, but before the compute_job.cpp is edited:
src/objects/compute_job.cpp: In member function ‘void compute_job::maskingTransitions(unsigned int, double)’:
src/objects/compute_job.cpp:233:58: error: call of overloaded ‘isnan(double&)’ is ambiguous
if (sumT > numeric_limits<double>::min() && !isnan(sumT))
^
In file included from /usr/include/features.h:375:0,
from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/x86_64-redhat-linux/bits/os_defines.h:39,
from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/x86_64-redhat-linux/bits/c++config.h:2255,
from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/bits/stl_algobase.h:59,
from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/vector:60,
from src/utils/otools.h:26,
from src/objects/compute_job.h:25,
from src/objects/compute_job.cpp:22:
/usr/include/bits/mathcalls.h:235:1: note: candidate: int isnan(double)
__MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
^
In file included from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/random:38:0,
from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/bits/stl_algo.h:66,
from /opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/algorithm:62,
from src/utils/otools.h:35,
from src/objects/compute_job.h:25,
from src/objects/compute_job.cpp:22:
/opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/cmath:634:3: note: candidate: constexpr bool std::isnan(long double)
isnan(long double __x)
^
/opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/cmath:630:3: note: candidate: constexpr bool std::isnan(double)
isnan(double __x)
^
/opt/rh/devtoolset-4/root/usr/include/c++/5.3.1/cmath:626:3: note: candidate: constexpr bool std::isnan(float)
isnan(float __x)
^
make: *** [obj/compute_job.o] Error 1
I'd try to compile the code with a newer version of g++, version 5 is a bit old now (2015).
Hello,
We're compiling with GCC 5.3.1 as that's the latest version we have available. I'm using HTSLib 1.12 and boost 1.76.0
I tried editing src/models/haplotype_segment_single.h src/models/haplotype_segment_double.h src/objects/compute_job.cpp
to specify either std::isnan or ::isnan to resolve the
error: call of overloaded ‘isnan(double&)’ is ambiguous
error. or to specify either std::isinf or ::isinf to resolve theerror: call of overloaded ‘isinf(double&)’ is ambiguous
error.Editing this will result in no errors while compiling, but when trying to use the shapeit4.2 binary that is generated, it exits with an
Illegal instruction
error. How can I resolve this error?