Skip to content

ARROW-7037: [C++ ] Compile error on the combination of protobuf >= 3.9 and clang#5763

Closed
mrkn wants to merge 1 commit intoapache:masterfrom
mrkn:ARROW-7037
Closed

ARROW-7037: [C++ ] Compile error on the combination of protobuf >= 3.9 and clang#5763
mrkn wants to merge 1 commit intoapache:masterfrom
mrkn:ARROW-7037

Conversation

@mrkn
Copy link
Copy Markdown
Member

@mrkn mrkn commented Oct 31, 2019

I encountered the following compile error on the combination of protobuf 3.10.0 and clang (Xcode 11).

[13/26] Building CXX object c++/src/CMakeFiles/orc.dir/wrap/orc-proto-wrapper.cc.o
FAILED: c++/src/CMakeFiles/orc.dir/wrap/orc-proto-wrapper.cc.o
/Applications/Xcode_11.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++   -Ic++/include -I/Users/mrkn/src/github.com/apache/arrow/cpp/build.debug/orc_ep-prefix/src/orc_ep/c++/include -I/Users/mrkn/src/github.com/apache/arrow/cpp/build.debug/orc_ep-prefix/src/orc_ep/c++/src -Ic++/src -isystem c++/libs/thirdparty/zlib_ep-install/include -isystem c++/libs/thirdparty/lz4_ep-install/include -Qunused-arguments -fcolor-diagnostics -ggdb -O0 -g -fPIC  -Wno-zero-as-null-pointer-constant -Wno-inconsistent-missing-destructor-override -Wno-error=undef -std=c++11 -Weverything -Wno-c++98-compat -Wno-missing-prototypes -Wno-c++98-compat-pedantic -Wno-padded -Wno-covered-switch-default -Wno-missing-noreturn -Wno-unknown-pragmas -Wno-gnu-zero-variadic-macro-arguments -Wconversion -Wno-c++2a-compat -Werror -std=c++11 -Weverything -Wno-c++98-compat -Wno-missing-prototypes -Wno-c++98-compat-pedantic -Wno-padded -Wno-covered-switch-default -Wno-missing-noreturn -Wno-unknown-pragmas -Wno-gnu-zero-variadic-macro-arguments -Wconversion -Wno-c++2a-compat -Werror -O0 -g -MD -MT c++/src/CMakeFiles/orc.dir/wrap/orc-proto-wrapper.cc.o -MF c++/src/CMakeFiles/orc.dir/wrap/orc-proto-wrapper.cc.o.d -o c++/src/CMakeFiles/orc.dir/wrap/orc-proto-wrapper.cc.o -c /Users/mrkn/src/github.com/apache/arrow/cpp/build.debug/orc_ep-prefix/src/orc_ep/c++/src/wrap/orc-proto-wrapper.cc
In file included from /Users/mrkn/src/github.com/apache/arrow/cpp/build.debug/orc_ep-prefix/src/orc_ep/c++/src/wrap/orc-proto-wrapper.cc:44:
c++/src/orc_proto.pb.cc:959:145: error: possible misuse of comma operator here [-Werror,-Wcomma]
static bool dynamic_init_dummy_orc_5fproto_2eproto = (  ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_orc_5fproto_2eproto), true);
                                                                                                                                                ^
c++/src/orc_proto.pb.cc:959:57: note: cast expression to void to silence warning
static bool dynamic_init_dummy_orc_5fproto_2eproto = (  ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_orc_5fproto_2eproto), true);
                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                        static_cast<void>(                                                                      )
1 error generated.

I'd like to put -Wno-comma in ORG_CMAKE_CXX_FLAGS when the version of protobuf >= 3.9.

This is the related issue on protobuf: protocolbuffers/protobuf#6619

@mrkn mrkn requested a review from kou October 31, 2019 05:26
@github-actions
Copy link
Copy Markdown

@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #5763 into master will decrease coverage by 22.49%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5763      +/-   ##
=========================================
- Coverage   88.99%   66.5%   -22.5%     
=========================================
  Files        1006     604     -402     
  Lines      137241   81669   -55572     
  Branches     1501       0    -1501     
=========================================
- Hits       122134   54311   -67823     
- Misses      14742   27358   +12616     
+ Partials      365       0     -365
Impacted Files Coverage Δ
cpp/src/arrow/util/memory.h 0% <0%> (-100%) ⬇️
cpp/src/parquet/internal_file_decryptor.h 0% <0%> (-100%) ⬇️
cpp/src/arrow/filesystem/path_tree.h 0% <0%> (-100%) ⬇️
cpp/src/gandiva/date_utils.h 0% <0%> (-100%) ⬇️
cpp/src/arrow/util/memory.cc 0% <0%> (-100%) ⬇️
cpp/src/gandiva/decimal_type_util.h 0% <0%> (-100%) ⬇️
cpp/src/arrow/compute/logical_type.h 0% <0%> (-100%) ⬇️
cpp/src/arrow/compute/kernels/add.h 0% <0%> (-100%) ⬇️
cpp/src/parquet/hasher.h 0% <0%> (-100%) ⬇️
cpp/src/gandiva/basic_decimal_scalar.h 0% <0%> (-100%) ⬇️
... and 670 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 86f34aa...6b87d5e. Read the comment docs.

Copy link
Copy Markdown
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants