Dsuite
Dsuite copied to clipboard
Compile error in Fedora34
I had a problem compiling Dsuite in Fedora34 getting this error:
Dsuite_utils.cpp:74:63: error: ‘numeric_limits’ is not a member of ‘std’
After some googling, I was able to resolve the problem by adding the following two lines to Dsuite_utils.cpp
#include <stdexcept>
#include <limits>
Could you add these two lines there permanently, please?
Tomas
I am back again. The above-mentioned solution is not working for my data. Binaries are built but they are causing a problem when running 'Dsuite Dtrios'.
/builddir/build/BUILD/gcc-11.2.1-20210728/obj-x86_64-redhat-linux/x86_64-redhat-linux/libstdc++-v3/include/bits/basic_string.h:1039: std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::operator[](std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference = const char&; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]: Assertion '__pos <= size()' failed. Aborted (core dumped)
The same data runs without any problem when the binary is compiled using gcc 8.3 under Debian (both with and without adding #include <limits>
).
So it seems that there is a problem with gcc 11 I am using under Fedora34.
Is this possible to fix it somehow?
I am happy to provide my really small test dataset.
Thank you.
Tomas
One more comment on this topic: I just checked binaries with GCC 10.3 (Ubuntu) and it works fine. And again, it doesn't matter whether Dsuite_utils.cpp was modified or not. I am wondering whether someone else also has a problem running Dsuite build with GCC 11. Best wishes, Tomas
Hi Tomas
Thanks for this info. I checked, and
I think your other error (Assertion '__pos <= size()) is something else. Interesting that this also happens only when compiled with GCC 11 ... hmm, it is not obvious what the problem would be though.
Maybe drop me an email if you want to try to put some effort to solve it. Or anyone else with the same problem.
Best wishes Milan
Hi Tomas,
did you fix the problem? I have the same issue and currently I haven't fixed it yet. Thanks in advance!
Best, Luca