[ 
https://issues.apache.org/jira/browse/ARROW-4760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16785494#comment-16785494
 ] 

Uwe L. Korn commented on ARROW-4760:
------------------------------------

This has been there for over 4 years now. This error simply popped up as I 
didn't include protobuf headers using {{include(SYSTEM …)}}. Using {{SYSTEM}} 
will let the compiler ignore all warnings in third-party headers. We have been 
using this for now and I'll also switched to using this now in my CMake 
refactor as there is an awful lot of warnings in the thirdparty headers.

> [C++] protobuf 3.7 defines EXPECT_OK that clashes with Arrow's macro
> --------------------------------------------------------------------
>
>                 Key: ARROW-4760
>                 URL: https://issues.apache.org/jira/browse/ARROW-4760
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>            Reporter: Uwe L. Korn
>            Assignee: Uwe L. Korn
>            Priority: Major
>             Fix For: 0.13.0
>
>
> This fails for me with the following error:
> {code:java}
> /home/travis/build/xhochy/arrow/cpp/src/arrow/flight/test-util.cc
> In file included from 
> /home/travis/build/xhochy/arrow/cpp-toolchain/include/google/protobuf/util/type_resolver.h:39:0,
>                  from 
> /home/travis/build/xhochy/arrow/cpp-toolchain/include/google/protobuf/util/json_util.h:37,
>                  from 
> /home/travis/build/xhochy/arrow/cpp-toolchain/include/grpcpp/impl/codegen/config_protobuf.h:70,
>                  from 
> /home/travis/build/xhochy/arrow/cpp/src/arrow/flight/customize_protobuf.h:23,
>                  from 
> /home/travis/build/xhochy/arrow/cpp/src/arrow/flight/protocol-internal.h:20,
>                  from 
> /home/travis/build/xhochy/arrow/cpp/src/arrow/flight/internal.h:23,
>                  from 
> /home/travis/build/xhochy/arrow/cpp/src/arrow/flight/test-util.cc:35:
> /home/travis/build/xhochy/arrow/cpp-toolchain/include/google/protobuf/stubs/status.h:111:0:
>  error: "EXPECT_OK" redefined [-Werror]
>  #define EXPECT_OK(value) EXPECT_TRUE((value).ok())
>  
> In file included from 
> /home/travis/build/xhochy/arrow/cpp/src/arrow/ipc/test-common.h:35:0,
>                  from 
> /home/travis/build/xhochy/arrow/cpp/src/arrow/flight/test-util.cc:30:
> /home/travis/build/xhochy/arrow/cpp/src/arrow/testing/gtest_util.h:80:0: 
> note: this is the location of the previous definition
>  #define EXPECT_OK(expr)         \
>  
> cc1plus: all warnings being treated as errors{code}
> I would workaround this by renaming our {{EXPECT_OK}} to {{ARROW_EXPECT_OK}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to