raulcd commented on code in PR #55694:
URL: https://github.com/apache/arrow/pull/55694#discussion_r4678684373


##########
cpp/examples/arrow/CMakeLists.txt:
##########
@@ -126,6 +126,15 @@ if(ARROW_FLIGHT)
                     EXTRA_SOURCES
                     "${CMAKE_CURRENT_BINARY_DIR}/helloworld.pb.cc"
                     "${CMAKE_CURRENT_BINARY_DIR}/helloworld.grpc.pb.cc")
+  if(NOT MSVC)
+    # Work around absl::Mutex::Dtor ABI mismatch in debug builds against
+    # an NDEBUG-built Abseil. See absl_mutex_ndebug.h.
+    # Same issue as:
+    # 
https://github.com/apache/arrow/blob/d58f83f3131cb57ede40d99ac4d0978748d1a970/cpp/src/arrow/flight/transport/grpc/customize_grpc.h#L25-L59
+    target_compile_options(flight-grpc-example
+                           PRIVATE "SHELL:-include 
${CMAKE_CURRENT_SOURCE_DIR}/absl_mutex_ndebug.h"

Review Comment:
   This is the option:
   
https://cmake.org/cmake/help/latest/command/target_compile_options.html#option-de-duplication
   
   It tokenizes the command as if it would be a shell command using it as two 
arguments instead of a single quoted argument. Otherwise it fails, minor 
example:
   ```bash
   raulcd@limgrave:~/code/arrow (GH-55754) $ gcc "-include test.h" test.cc
   <command-line>: fatal error:  test.h: No such file or directory
   compilation terminated.
   raulcd@limgrave:~/code/arrow (GH-55754) $ gcc -include test.h test.cc
   /usr/bin/x86_64-linux-gnu-ld.bfd: 
/usr/lib/gcc/x86_64-linux-gnu/16/../../../x86_64-linux-gnu/Scrt1.o: in function 
`_start':
   (.text+0x17): undefined reference to `main'
   collect2: error: ld returned 1 exit status
   ```
   
   I can add a comment to the CMake option.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to