C++ 在macOS 10.15.6上编译Apache ORC时出错

C++ 在macOS 10.15.6上编译Apache ORC时出错,c++,macos,clang,orc,C++,Macos,Clang,Orc,我正在macOS Catalina 10.15.6(使用Apple clang版本12.0.0(clang-1200.0.32.2))上编译Apache ORC,下面是一些错误。请问是什么原因造成的 (base) karlkatzen@chloes build % make package testout [ 6%] Built target protobuf_ep [ 11%] Built target lz4_ep [ 17%] Built target libhdfspp_ep [ 23

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

(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\u ROOT\u DIR=/usr/local/opt/openssl-DOPENSSL\u LIBRARIES=/usr/local/opt/openssl/lib..
\u LIBCPP\u CONSTEXPR
是LibCxx标准库编译器定义。
您的orc库代码的定义与编译器定义冲突,因此在此文件中
/Users/karlkatzen/Documents/code/orc/c++/src/adapter.hh:177:9:错误:关键字被宏定义[-Werror,-Wkeyword macro]#define constepr const


只需评论这行“代码> >定义conExpRPR const /< P>问题的根源是源代码使用的是MARCO,这是一个C++关键字名称,它是一个警告,也是一个类的构造函数,它是语法错误。Apache ORC的确切版本是什么?你修改源代码了吗?