Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-7037

[C++ ] Compile error on the combination of protobuf >= 3.9 and clang

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.16.0
    • Component/s: C++

      Description

      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.
      

      This may be due to a bug of protobuf filed as https://github.com/protocolbuffers/protobuf/issues/6619.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mrkn Kenta Murata
                Reporter:
                mrkn Kenta Murata
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m