You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "paleolimbot (via GitHub)" <gi...@apache.org> on 2026/08/07 15:29:31 UTC

[I] Can't link to dynamic flatcc dependency [arrow-nanoarrow]

paleolimbot opened a new issue, #922:
URL: https://github.com/apache/arrow-nanoarrow/issues/922

   For Homebrew and vcpkg, where we can get shared flatcc dependency libraries, the IPC feature can't use the dynamic version of the library. Claude came up with
   
   ```path
   diff --git a/CMakeLists.txt b/CMakeLists.txt
   --- a/CMakeLists.txt
   +++ b/CMakeLists.txt
   @@ -227,13 +227,13 @@ if(NANOARROW_IPC)
    
      elseif(NOT NANOARROW_FLATCC_INCLUDE_DIR)
        set(NANOARROW_FLATCC_INCLUDE_DIR "${NANOARROW_FLATCC_ROOT_DIR}/include")
   -    add_library(flatccrt STATIC IMPORTED)
   +    add_library(flatccrt SHARED IMPORTED)
        set_target_properties(flatccrt
                              PROPERTIES IMPORTED_LOCATION
   -                                     "${NANOARROW_FLATCC_ROOT_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}flatccrt${CMAKE_STATIC_LIBRARY_SUFFIX}"
   +                                     "${NANOARROW_FLATCC_ROOT_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}flatccrt${CMAKE_SHARED_LIBRARY_SUFFIX}"
                                         IMPORTED_LOCATION_DEBUG
   -                                     "${NANOARROW_FLATCC_ROOT_DIR}/debug/lib/${CMAKE_STATIC_LIBRARY_PREFIX}flatccrt_d${CMAKE_STATIC_LIBRARY_SUFFIX}"
   +                                     "${NANOARROW_FLATCC_ROOT_DIR}/debug/lib/${CMAKE_SHARED_LIBRARY_PREFIX}flatccrt_d${CMAKE_SHARED_LIBRARY_SUFFIX}"
                                         IMPORTED_LOCATION_RELEASE
   -                                     "${NANOARROW_FLATCC_ROOT_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}flatccrt${CMAKE_STATIC_LIBRARY_SUFFIX}"
   +                                     "${NANOARROW_FLATCC_ROOT_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}flatccrt${CMAKE_SHARED_LIBRARY_SUFFIX}"
                                         INTERFACE_INCLUDE_DIRECTORIES
                                         "${NANOARROW_FLATCC_INCLUDE_DIR}")
   ```
   
   for Homebrew but there may be a better solution.


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

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


Re: [I] Can't link to dynamic flatcc dependency [arrow-nanoarrow]

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on issue #922:
URL: https://github.com/apache/arrow-nanoarrow/issues/922#issuecomment-5220514260

   On vcpkg there's also an issue that was pointed out, where flatcc linking is not handled automatically by downstream CMake consumers, particularly on Windows
   
   ```
   # Fix bare "flatccrt" in INTERFACE_LINK_LIBRARIES - it's not a target for consumers
   if ("ipc" IN_LIST FEATURES)
       if(VCPKG_TARGET_IS_WINDOWS)
           set(FLATCCRT_LIB "\${_IMPORT_PREFIX}/lib/flatccrt.lib")
       else()
           set(FLATCCRT_LIB "\${_IMPORT_PREFIX}/lib/libflatccrt.a")
       endif()
       vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/nanoarrow/nanoarrow-targets.cmake"
           [[\$<LINK_ONLY:flatccrt>]]
           "\$<LINK_ONLY:${FLATCCRT_LIB}>"
       )
   endif()
   ```


-- 
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


Re: [I] Can't link to dynamic flatcc dependency [arrow-nanoarrow]

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot closed issue #922: Can't link to dynamic flatcc dependency
URL: https://github.com/apache/arrow-nanoarrow/issues/922


-- 
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: issues-unsubscribe@arrow.apache.org

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