在更新到MACOS Big Sur并尝试编译monero分支版本-V0.16之后,我收到以下错误:
[ 36%] Built target ringct
Scanning dependencies of target obj_cryptonote_core
[ 37%] Building CXX object src/cryptonote_core/CMakeFiles/obj_cryptonote_core.dir/blockchain.cpp.o
In file included from /Users/myuser/Projects/myproject/monero-16/src/cryptonote_core/blockchain.cpp:39:
In file included from /Users/myuser/Projects/myproject/monero-16/src/cryptonote_core/blockchain.h:35:
/usr/local/include/boost/serialization/list.hpp:53:33: error: no type named 'library_version_type' in namespace 'boost::serialization'; did you mean 'item_version_type'?
const boost::serialization::library_version_type library_version(
~~~~~~~~~~~~~~~~~~~~~~^
/usr/local/include/boost/serialization/item_version_type.hpp:25:7: note: 'item_version_type' declared here
class item_version_type {
^
In file included from /Users/myuser/Projects/myproject/monero-16/src/cryptonote_core/blockchain.cpp:39:
In file included from /Users/myuser/Projects/myproject/monero-16/src/cryptonote_core/blockchain.h:35:
/usr/local/include/boost/serialization/list.hpp:60:30: error: no member named 'library_version_type' in namespace 'boost::serialization'
if(boost::serialization::library_version_type(3) < library_version){
~~~~~~~~~~~~~~~~~~~~~~^
/Users/myuser/Projects/myproject/monero-16/src/cryptonote_core/blockchain.cpp:1183:21: warning: loop variable 'bei' of type 'const cryptonote::Blockchain::block_extended_info'
creates a copy from type 'const cryptonote::Blockchain::block_extended_info' [-Wrange-loop-analysis]
for (const auto bei: boost::adaptors::reverse(alt_chain))
^
/Users/myuser/Projects/myproject/monero-16/src/cryptonote_core/blockchain.cpp:1183:10: note: use reference type 'const cryptonote::Blockchain::block_extended_info &' to
prevent copying
for (const auto bei: boost::adaptors::reverse(alt_chain))
^~~~~~~~~~~~~~~
&
In file included from /Users/myuser/Projects/myproject/monero-16/src/cryptonote_core/blockchain.cpp:37:
In file included from /Users/myuser/Projects/myproject/monero-16/src/cryptonote_basic/cryptonote_basic_impl.h:33:
In file included from /Users/myuser/Projects/myproject/monero-16/src/cryptonote_basic/cryptonote_basic.h:41:
/Users/myuser/Projects/myproject/monero-16/src/serialization/binary_archive.h:195:28: warning: shift count >= width of type [-Wshift-count-overflow]
if (1 < sizeof(T)) v >>= 8;
^ ~
/Users/myuser/Projects/myproject/monero-16/src/serialization/binary_archive.h:188:5: note: in instantiation of function template specialization
'binary_archive<true>::serialize_uint<unsigned char>' requested here
serialize_uint(static_cast<typename boost::make_unsigned<T>::type>(v));
^
/Users/myuser/Projects/myproject/monero-16/src/serialization/binary_archive.h:228:5: note: in instantiation of function template specialization
'binary_archive<true>::serialize_int<unsigned char>' requested here
serialize_int(t);
^
2 warnings and 2 errors generated.
make[3]: *** [src/cryptonote_core/CMakeFiles/obj_cryptonote_core.dir/blockchain.cpp.o] Error 1
make[2]: *** [src/cryptonote_core/CMakeFiles/obj_cryptonote_core.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [release-all] Error 2发布于 2020-12-08 01:11:29
看起来缺少了一个include --我不能在Linux上使用18.04发行版包(1.65.1,从头开始干净地编译)重现它。
github中有一个相关的修复:https://github.com/boostorg/serialization/commit/f72b9fc8d953a5dd39615535b5c6bab5b8be42fe
commit f72b9fc8d953a5dd39615535b5c6bab5b8be42fe
Author: Robert Ramey <ramey@rrsd.com>
Date: Sat Sep 26 22:55:18 2020 -0700
included library_version.hpp in all appropriate places.
This should permit any header to be compiled without including any other headers.这已经被merged掌握了,但那是在1.74.0之后,所以它还不存在。
显然,在必要的地方包括头部应该很容易:
#include <boost/serialization/library_version_type.hpp>那么,有4个不相关的警告
https://stackoverflow.com/questions/65179639
复制相似问题