ekg / seqwish

alignment to variation graph inducer
MIT License
143 stars 18 forks source link

Compilation errors GCC v13.1 #112

Closed subwaystation closed 1 year ago

subwaystation commented 1 year ago

Could you please fix this? Thanks!

cmake -H. -Bbuild && cmake --build build -- -j 1
-- CMAKE_BUILD_TYPE: Release
-- CMAKE_SYSTEM_NAME: Linux
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: /home/heumos/seqwish/build
[  7%] Built target sdsl-lite
[ 14%] Built target tayweeargs
[ 21%] Built target gzipreader
[ 28%] Built target mmmulti
[ 35%] Built target iitii
[ 42%] Built target ips4o
[ 49%] Built target bbhash
[ 55%] Built target atomicbitvector
[ 62%] Built target atomicqueue
[ 69%] Built target ska
[ 76%] Built target paryfor
[ 82%] Built target mio
[ 83%] Building CXX object CMakeFiles/seqwish.dir/src/utils.cpp.o
/home/heumos/seqwish/src/utils.cpp: In function ‘double seqwish::handy_parameter(const std::string&, double)’:
/home/heumos/seqwish/src/utils.cpp:11:9: error: ‘uint64_t’ was not declared in this scope
   11 |         uint64_t str_len = value.length();
      |         ^~~~~~~~
/home/heumos/seqwish/src/utils.cpp:4:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
    3 | #include "utils.hpp"
  +++ |+#include <cstdint>
    4 | 
/home/heumos/seqwish/src/utils.cpp:12:9: error: ‘uint8_t’ was not declared in this scope
   12 |         uint8_t exp = 0;
      |         ^~~~~~~
/home/heumos/seqwish/src/utils.cpp:12:9: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/heumos/seqwish/src/utils.cpp:13:19: error: ‘str_len’ was not declared in this scope
   13 |         if (value[str_len-1] == 'k' || value[str_len-1] == 'K') {
      |                   ^~~~~~~
/home/heumos/seqwish/src/utils.cpp:14:19: error: overloaded function with no contextual type information
   14 |             exp = 3;
      |                   ^
/home/heumos/seqwish/src/utils.cpp:17:19: error: overloaded function with no contextual type information
   17 |             exp = 6;
      |                   ^
/home/heumos/seqwish/src/utils.cpp:20:19: error: overloaded function with no contextual type information
   20 |             exp = 9;
      |                   ^
/home/heumos/seqwish/src/utils.cpp:24:49: error: ‘str_len’ was not declared in this scope
   24 |         const std::string tmp = value.substr(0, str_len);
      |                                                 ^~~~~~~
/home/heumos/seqwish/src/utils.cpp:25:51: error: no matching function for call to ‘pow(int, <unresolved overloaded function type>)’
   25 |         return is_a_number(tmp) ? (stod(tmp) * pow(10, exp)) : default_value;
      |                                                ~~~^~~~~~~~~
In file included from /usr/include/c++/13.1.1/math.h:36,
                 from /home/heumos/seqwish/src/utils.hpp:3,
                 from /home/heumos/seqwish/src/utils.cpp:3:
/usr/include/c++/13.1.1/cmath:417:5: note: candidate: ‘template<class _Tp, class _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type std::pow(_Tp, _Up)’
  417 |     pow(_Tp __x, _Up __y)
      |     ^~~
/usr/include/c++/13.1.1/cmath:417:5: note:   template argument deduction/substitution failed:
/home/heumos/seqwish/src/utils.cpp:25:51: note:   couldn’t deduce template parameter ‘_Up’
   25 |         return is_a_number(tmp) ? (stod(tmp) * pow(10, exp)) : default_value;
      |                                                ~~~^~~~~~~~~
In file included from /usr/include/features.h:491,
                 from /usr/include/c++/13.1.1/x86_64-pc-linux-gnu/bits/os_defines.h:39,
                 from /usr/include/c++/13.1.1/x86_64-pc-linux-gnu/bits/c++config.h:679,
                 from /usr/include/c++/13.1.1/bits/requires_hosted.h:31,
                 from /usr/include/c++/13.1.1/string:38,
                 from /home/heumos/seqwish/src/utils.cpp:1:
/usr/include/bits/mathcalls.h:140:1: note: candidate: ‘double pow(double, double)’
  140 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
In file included from /usr/include/c++/13.1.1/cmath:47:
/usr/include/bits/mathcalls.h:140:1: note:   no known conversion for argument 2 from ‘<unresolved overloaded function type>’ to ‘double’
  140 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^
/usr/include/c++/13.1.1/cmath:394:3: note: candidate: ‘constexpr long double std::pow(long double, long double)’
  394 |   pow(long double __x, long double __y)
      |   ^~~
/usr/include/c++/13.1.1/cmath:394:36: note:   no known conversion for argument 2 from ‘<unresolved overloaded function type>’ to ‘long double’
  394 |   pow(long double __x, long double __y)
      |                        ~~~~~~~~~~~~^~~
/usr/include/c++/13.1.1/cmath:390:3: note: candidate: ‘constexpr float std::pow(float, float)’
  390 |   pow(float __x, float __y)
      |   ^~~
/usr/include/c++/13.1.1/cmath:390:24: note:   no known conversion for argument 2 from ‘<unresolved overloaded function type>’ to ‘float’
  390 |   pow(float __x, float __y)
      |                  ~~~~~~^~~
make[2]: *** [CMakeFiles/seqwish.dir/build.make:76: CMakeFiles/seqwish.dir/src/utils.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:430: CMakeFiles/seqwish.dir/all] Error 2
make: *** [Makefile:136: all] Error 2