尝试安装软件时出现 Makefile 错误(141:全部 - 错误 2)
Posted
技术标签:
【中文标题】尝试安装软件时出现 Makefile 错误(141:全部 - 错误 2)【英文标题】:Makefile error when trying to install software (141: all - Error 2) 【发布时间】:2020-10-23 14:40:34 【问题描述】:我写这篇文章是因为我无法安装名为 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
有人知道问题出在哪里以及我可以做些什么来解决它吗?
【问题讨论】:
另见Cannot Install Reapr 【参考方案1】:通过将以下补丁应用于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 提供了有关此错误的更多信息
【讨论】:
以上是关于尝试安装软件时出现 Makefile 错误(141:全部 - 错误 2)的主要内容,如果未能解决你的问题,请参考以下文章
尝试通过 Makefile 运行 phpunit 测试而没有弃用警告时出现“错误的变量名”
centos7下安装iperf时出现 make: *** No targets specified and no makefile found. Stop.的解决方案
尝试使用 makefile 编译 C++ 程序时出现“致命错误:boost/regex.hpp:没有这样的文件或目录”