hap.py
hap.py copied to clipboard
running into build error with CMake
Hi there I've been following the build from source with CMake; however, at the point in which I launch the following
cmake ../hap.py
I'm prompted with the following error
/home/mat/hap.py/src/c++/lib/tools/Roc.cpp: In member function ‘roc::Level roc::Roc::getTotals(uint64_t) const’:
/home/mat/hap.py/src/c++/lib/tools/Roc.cpp:178:27: error: ‘numeric_limits’ is not a member of ‘std’
178 | last.level = std::numeric_limits<double>::quiet_NaN();
| ^~~~~~~~~~~~~~
/home/mat/hap.py/src/c++/lib/tools/Roc.cpp:178:42: error: expected primary-expression before ‘double’
178 | last.level = std::numeric_limits<double>::quiet_NaN();
| ^~~~~~
/home/mat/hap.py/src/c++/lib/tools/Roc.cpp: In member function ‘void roc::Roc::getLevels(std::vector<roc::Level>&, double, uint64_t) const’:
/home/mat/hap.py/src/c++/lib/tools/Roc.cpp:191:27: error: ‘numeric_limits’ is not a member of ‘std’
191 | last.level = std::numeric_limits<double>::quiet_NaN();
| ^~~~~~~~~~~~~~
/home/mat/hap.py/src/c++/lib/tools/Roc.cpp:191:42: error: expected primary-expression before ‘double’
191 | last.level = std::numeric_limits<double>::quiet_NaN();
| ^~~~~~
/home/mat/hap.py/src/c++/lib/tools/Roc.cpp:248:33: error: ‘numeric_limits’ is not a member of ‘std’
248 | if(roc_delta < std::numeric_limits<double>::epsilon())
| ^~~~~~~~~~~~~~
/home/mat/hap.py/src/c++/lib/tools/Roc.cpp:248:48: error: expected primary-expression before ‘double’
248 | if(roc_delta < std::numeric_limits<double>::epsilon())
| ^~~~~~
/home/mat/hap.py/src/c++/lib/tools/Roc.cpp:248:48: error: expected ‘)’ before ‘double’
248 | if(roc_delta < std::numeric_limits<double>::epsilon())
| ~ ^~~~~~
| )
make[2]: *** [src/c++/lib/CMakeFiles/haplotypes.dir/build.make:384: src/c++/lib/CMakeFiles/haplotypes.dir/tools/Roc.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:309: src/c++/lib/CMakeFiles/haplotypes.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
I've looked up online and couldn't figure out to what this Roc.cpp.o refers to and what I am missing..., I also looked at other issues on GitHub. The only one somehow relevant indicating possible missing packages was related to libstdc++-12-dev (which I installed), still it didn't fiex the problem...
Please, let me know how can I get the tool to work, thanks is advance!
Hi did anyone came across this issue or had the chance to look at the error. Just wandering as I'm working with truvari as well but the tool cannot accurately detect SNPs, only SVs.
Thanks, let me know.
Hi,
I am encountering some issues that I am still trying to troubleshoot. I found using the Docker image somewhat helpful, but I still encountered problems and I am returning to see if I can understand the installation issues better (before checking if there is a formatting error when using the Docker image).
Based upon general experience when using cmake, I changed the command as follows:
Current (as of 8/2/2023): cmake ../hap.py
Used: cmake ..
Again, there are other issues that I am still trying to troubleshoot, and I hope that you can receive a response from Illumina staff (I am a user, not an Illumina developer). You are also seeing a different set of error messages than I saw before making that change.
However, I hope sharing my experiences can be somewhat helpful, for at least some users?
Sincerely, Charles
I was able to overcome this issue by adding the line:
#include <limits>
to the file hap.py/src/c++/lib/tools/Roc.cpp