尝试安装软件时出现Makefile错误(141:全部-错误2)

时间:2020-10-23 14:40:34

标签: c++ linux perl cmake

我写这篇文章是因为我无法安装名为REAPR的Sanger软件

在这里我们可以找到它:

https://www.sanger.ac.uk/tool/reapr/

这是我收到的消息:

...

   ^~~~~~
/beegfs/data/bguinet/TOOLS/Reapr_1.0.18/third_party/cmake/Utilities/KWIML/test/test_INT_format.h:30:10: error: unable to find string literal operator 'operator""cmIML_INT_PRI' with 'const char [38]', 'long unsigned int' arguments
          " expression [%"cmIML_INT_PRI##PRI"],"                       \
          ^
/beegfs/data/bguinet/TOOLS/Reapr_1.0.18/third_party/cmake/Utilities/KWIML/test/test_INT_format.h:185:3: note: in expansion of macro 'TEST_C'
   TEST_C(UINT64_C, 0xAB00000000000000, u64, uint64_t, uint64_t)
   ^~~~~~
make[2]: *** [Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/build.make:168: Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/test_INT_CXX.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:987: Utilities/KWIML/test/CMakeFiles/cmIML_test.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

有人知道问题出在哪里,我可以怎么解决?

1 个答案:

答案 0 :(得分:0)

通过将以下补丁应用于third_party/cmake/Utilities/KWIML/test/test_INT_format.h.in,我能够使第一个错误保持沉默:

30,31c30,31
<          " expression [%"@KWIML@_INT_PRI##PRI"],"                       \
<          " literal [%"@KWIML@_INT_PRI##PRI"]", x, y);                   \
---
>          " expression [%" @KWIML@_INT_PRI##PRI "],"                       \
>          " literal [%" @KWIML@_INT_PRI##PRI "]", x, y);                   \
47c47
<   sprintf(buf, "%"@KWIML@_INT_PRI##PRI, x);                             \
---
>   sprintf(buf, "%" @KWIML@_INT_PRI##PRI, x);                             \
67c67
<   if(sscanf(str, "%"@KWIML@_INT_SCN##SCN, &y) != 1)                     \
---
>   if(sscanf(str, "%" @KWIML@_INT_SCN##SCN, &y) != 1)                     \
72,73c72,73
<          " expected [%"@KWIML@_INT_PRI##PRI"],"                         \
<          " got [%"@KWIML@_INT_PRI##PRI"]", x, y);                       \
---
>          " expected [%" @KWIML@_INT_PRI##PRI "],"                         \
>          " got [%" @KWIML@_INT_PRI##PRI "]", x, y);                       \

但是,现在重新运行install.sh会出现另一个错误:

[ 95%] Building CXX object src/toolkit/CMakeFiles/bamtools_cmd.dir/bamtools_resolve.cpp.o
/home/hakon/Reapr_1.0.18/third_party/bamtools/src/toolkit/bamtools_resolve.cpp: In member function ‘bool BamTools::ResolveTool::ReadNamesFileReader::Read(std::map<std::__cxx11::basic_string<char>, ReadGroupResolver>&)’:
/home/hakon/Reapr_1.0.18/third_party/bamtools/src/toolkit/bamtools_resolve.cpp:401:74: error: cannot bind rvalue reference of type ‘std::__cxx11::basic_string<char>&&’ to lvalue of type ‘__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type’ {aka ‘std::__cxx11::basic_string<char>’}
  401 |         resolver.ReadNames.insert( make_pair<string,bool>(fields[1], true) ) ;
      |                                                                          ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
                 from /usr/include/c++/9/bits/char_traits.h:39,
                 from /usr/include/c++/9/string:40,
                 from /home/hakon/Reapr_1.0.18/third_party/bamtools/src/toolkit/bamtools_tool.h:14,
                 from /home/hakon/Reapr_1.0.18/third_party/bamtools/src/toolkit/bamtools_resolve.h:13,
                 from /home/hakon/Reapr_1.0.18/third_party/bamtools/src/toolkit/bamtools_resolve.cpp:10:
  • 有关此错误的更多信息,请参见here