prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
16.05k stars 5.38k forks source link

[native] error when make presto-native-execution #19822

Open yulongz opened 1 year ago

yulongz commented 1 year ago

I encountered following error when make presto-native-execution - presto_cpp/main/thrift/presto_cpp/main/thrift/gen-cpp2/PrestoThrift.cpp

ENV

ubuntu 20.04

commond

cd presto/presto-native-execution && make submodules
./scripts/setup-ubuntu.sh
./velox/scripts/setup-adapters.sh
make debug

ERROR LOG

-- Build files have been written to: /opt/presto/presto-native-execution/_build/debug
make[1]: Leaving directory '/opt/presto/presto-native-execution'
make build BUILD_DIR=debug
make[1]: Entering directory '/opt/presto/presto-native-execution'
cmake --build _build/debug -j 16
[102/612] [FLEX][TypeCalculationScanner] Building scanner with flex 2.6.4
TypeCalculation.ll:30: warning, -s option given but default rule can be matched
[105/612] [BISON][TypeCalculationParser] Building parser with bison 3.5.1
/opt/presto/presto-native-execution/velox/velox/expression/type_calculation/TypeCalculation.yy:8.1-34: warning: deprecated directive: '%define parser_class_name {Parser}', use '%define api.parser.class {Parser}' [-Wdeprecated]
    8 | %define parser_class_name {Parser}
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | %define api.parser.class {Parser}
/opt/presto/presto-native-execution/velox/velox/expression/type_calculation/TypeCalculation.yy: warning: fix-its can be applied.  Rerun with option '--update'. [-Wother]
[553/612] Building CXX object presto_cpp/main/thrift/CMakeFiles/presto_thrift-cpp2-obj.dir/presto_cpp/main/thrift/gen-cpp2/presto_thrift_data.cpp.o
/tmp/ccOtE0hz.s: Assembler messages:
/tmp/ccOtE0hz.s:444: Warning: setting incorrect section attributes for .rodata.thrift.data
[569/612] Building CXX object presto_cpp/main/thrift/CMakeFiles/presto_thrift-cpp2-obj.dir/presto_cpp/main/thrift/gen-cpp2/PrestoThrift.cpp.o
FAILED: presto_cpp/main/thrift/CMakeFiles/presto_thrift-cpp2-obj.dir/presto_cpp/main/thrift/gen-cpp2/PrestoThrift.cpp.o 
ccache /usr/bin/c++  -DFOLLY_HAVE_INT128_T=1 -I../../. -I../../velox -I../../velox/velox/external/xxhash -Ivelox -I. -I_deps/gtest-src/googletest/include -isystem /usr/local/include/antlr4-runtime -isystem /usr/local/include/proxygen -mavx2 -mfma -mavx -mf16c -mlzcnt -std=c++17 -mbmi2 -Werror -Wno-nullability-completeness -g   -std=gnu++17 -MD -MT presto_cpp/main/thrift/CMakeFiles/presto_thrift-cpp2-obj.dir/presto_cpp/main/thrift/gen-cpp2/PrestoThrift.cpp.o -MF presto_cpp/main/thrift/CMakeFiles/presto_thrift-cpp2-obj.dir/presto_cpp/main/thrift/gen-cpp2/PrestoThrift.cpp.o.d -o presto_cpp/main/thrift/CMakeFiles/presto_thrift-cpp2-obj.dir/presto_cpp/main/thrift/gen-cpp2/PrestoThrift.cpp.o -c presto_cpp/main/thrift/presto_cpp/main/thrift/gen-cpp2/PrestoThrift.cpp
presto_cpp/main/thrift/presto_cpp/main/thrift/gen-cpp2/PrestoThrift.cpp: In member function 'virtual void apache::thrift::ServiceHandler<facebook::presto::thrift::PrestoThrift>::sync_fake()':
presto_cpp/main/thrift/presto_cpp/main/thrift/gen-cpp2/PrestoThrift.cpp:33:15: error: 'virtual void apache::thrift::ServiceHandler<facebook::presto::thrift::PrestoThrift>::fake()' is deprecated: Use sync_fake instead [-Werror=deprecated-declarations]
   33 |   return fake();
      |               ^
presto_cpp/main/thrift/presto_cpp/main/thrift/gen-cpp2/PrestoThrift.cpp:28:6: note: declared here
   28 | void apache::thrift::ServiceHandler<::facebook::presto::thrift::PrestoThrift>::fake() {
      |      ^~~~~~
At global scope:
cc1plus: error: unrecognized command line option '-Wno-nullability-completeness' [-Werror]
cc1plus: all warnings being treated as errors
[584/612] Linking CXX executable presto_cpp/main/http/tests/presto_http_test
ninja: build stopped: subcommand failed.
make[1]: *** [Makefile:68: build] Error 1
make[1]: Leaving directory '/opt/presto/presto-native-execution'
make: *** [Makefile:72: debug] Error 2
majetideepak commented 1 year ago

What is your GCC compiler version? Some compilers throw warnings and it is usually safe to ignore them. Use TREAT_WARNINGS_AS_ERRORS=0 in the build.

yulongz commented 1 year ago

What is your GCC compiler version? Some compilers throw warnings and it is usually safe to ignore them. Use TREAT_WARNINGS_AS_ERRORS=0 in the build.

gcc version

root@21530d3e36cb:/opt/presto/presto-native-execution# gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
yulongz commented 1 year ago

TREAT_WARNINGS_AS_ERRORS is work for me。