在macOS 10.15.6上编译Apache ORC时出错



我正在macOS Catalina 10.15.6上编译Apache ORC(使用Apple clang版本12.0.0(clang-1200.0.3.22((,以下是一些错误。我可以问一下是什么原因造成的吗?

(base) karlkatzen@chloes build % make package testout
[  6%] Built target protobuf_ep
[ 11%] Built target lz4_ep
[ 17%] Built target libhdfspp_ep
[ 23%] Built target googletest_ep
[ 28%] Built target snappy_ep
[ 34%] Built target zstd_ep
[ 39%] Built target zlib_ep
[ 39%] Building CXX object c++/src/CMakeFiles/orc.dir/io/InputStream.cc.o
In file included from /Users/karlkatzen/Documents/code/orc/c++/src/io/InputStream.cc:20:
In file included from /Users/karlkatzen/Documents/code/orc/c++/src/io/InputStream.hh:22:
/Users/karlkatzen/Documents/code/orc/c++/src/Adaptor.hh:177:9: error: keyword is
hidden by macro definition [-Werror,-Wkeyword-macro]
#define constexpr const
^
In file included from /Users/karlkatzen/Documents/code/orc/c++/src/io/InputStream.cc:20:
In file included from /Users/karlkatzen/Documents/code/orc/c++/src/io/InputStream.hh:23:
In file included from /Users/karlkatzen/Documents/code/orc/c++/include/orc/OrcFile.hh:25:
In file included from /Users/karlkatzen/Documents/code/orc/c++/include/orc/Reader.hh:22:
In file included from /Users/karlkatzen/Documents/code/orc/c++/include/orc/BloomFilter.hh:25:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/vector:274:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__bit_reference:145:49: error: 
cannot specify any part of a return type in the declaration of a
conversion function; put the complete type after 'operator'
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR operator bool() const _NOEXCEPT
^~~~~~~~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__bit_reference:152:5: error: 
constructor cannot have a return type
_LIBCPP_CONSTEXPR
^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__config:887:29: note: 
expanded from macro '_LIBCPP_CONSTEXPR'
#  define _LIBCPP_CONSTEXPR constexpr
^
/Users/karlkatzen/Documents/code/orc/c++/src/Adaptor.hh:177:19: note: expanded
from macro 'constexpr'
#define constexpr const
^
In file included from /Users/karlkatzen/Documents/code/orc/c++/src/io/InputStream.cc:20:
In file included from /Users/karlkatzen/Documents/code/orc/c++/src/io/InputStream.hh:23:
In file included from /Users/karlkatzen/Documents/code/orc/c++/include/orc/OrcFile.hh:25:
In file included from /Users/karlkatzen/Documents/code/orc/c++/include/orc/Reader.hh:23:
In file included from /Users/karlkatzen/Documents/code/orc/c++/include/orc/Common.hh:22:
In file included from /Users/karlkatzen/Documents/code/orc/c++/include/orc/Vector.hh:32:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iostream:37:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:215:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__locale:208:31: error: 
constructor cannot have a return type
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR id() :__id_(0) {}

附言:以下是我如何运行cmake:cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib ..

_LIBCPP_CONSTEXPR是LibCxx标准库编译器定义
orc库代码的定义与编译器定义冲突,因此在此文件中/Users/karlkatzen/Documents/code/orc/c++/src/Adaptor.hh:177:9: error: keyword is hidden by macro definition [-Werror,-Wkeyword-macro] #define constexpr const
仅注释此行#define constexpr const

相关内容

  • 没有找到相关文章

最新更新