You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "kou (via GitHub)" <gi...@apache.org> on 2023/02/25 21:22:56 UTC

[GitHub] [arrow] kou commented on pull request #34350: GH-33849: [C++] Fix builds with ARROW_BUILD_SHARED=OFF and ARROW_BUILD_EXAMPLES=ON

kou commented on PR #34350:
URL: https://github.com/apache/arrow/pull/34350#issuecomment-1445209179

   It seems that we also need to care Apache Arrow Flight related examples:
   
   ```diff
   diff --git a/cpp/examples/arrow/CMakeLists.txt b/cpp/examples/arrow/CMakeLists.txt
   index aa33c18e76..76c176086a 100644
   --- a/cpp/examples/arrow/CMakeLists.txt
   +++ b/cpp/examples/arrow/CMakeLists.txt
   @@ -34,7 +40,7 @@ endif()
    if(ARROW_FLIGHT)
      # Static gRPC means we cannot linked to shared Arrow, since then
      # we'll violate ODR for gRPC symbols
   -  if(ARROW_GRPC_USE_SHARED)
   +  if(ARROW_BUILD_SHARED AND ARROW_GRPC_USE_SHARED)
        set(FLIGHT_EXAMPLES_LINK_LIBS arrow_flight_shared)
        if(APPLE)
          set(GRPC_REFLECTION_LINK_LIBS gRPC::grpc++_reflection)
   @@ -100,7 +106,7 @@ if(ARROW_FLIGHT)
                        "${CMAKE_CURRENT_BINARY_DIR}/helloworld.grpc.pb.cc")
    
      if(ARROW_FLIGHT_SQL)
   -    if(ARROW_GRPC_USE_SHARED)
   +    if(ARROW_BUILD_SHARED AND ARROW_GRPC_USE_SHARED)
          set(FLIGHT_SQL_EXAMPLES_LINK_LIBS arrow_flight_sql_shared)
        else()
          set(FLIGHT_SQL_EXAMPLES_LINK_LIBS arrow_flight_sql_static)
   ```
   
   Could you install gRPC and try `cmake .. --preset ninja-debug-maximal -DARROW_BUILD_SHARED=OFF -DARROW_BUILD_STATIC=ON -DgRPC_SOURCE=SYSTEM`?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org