You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "h-vetinari (via GitHub)" <gi...@apache.org> on 2023/03/22 00:44:28 UTC

[GitHub] [arrow] h-vetinari opened a new issue, #34670: gdb integration is not compatible with conda packaging

h-vetinari opened a new issue, #34670:
URL: https://github.com/apache/arrow/issues/34670

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   gdb apparently needs to reflect the path of a given library (for which we want to have gdb-support) in the path to that support artefact. Currently this is being done by using
   https://github.com/apache/arrow/blob/1ba4425fab35d572132cb30eee6087a7dca89853/cpp/src/arrow/CMakeLists.txt#L674-L675
   
   However, this is incompatible with the way that conda-forge works, where the packaging step needs to install the package in order to determine which files need to be packaged at all. The use of `CMAKE_INSTALL_FULL_LIBDIR` means that we'll be baking the path of that temporary build environment in the feedstock into the final artefact, which is both non-functional, and additionally leads to [problems](https://github.com/conda-forge/arrow-cpp-feedstock/issues/935) due to path length.
   
   The core issue is that we do not know the path to the final environment in conda until we're actually in it. In order to support the gdb integration nevertheless, the current work-around is to use a [patch](https://github.com/conda-forge/arrow-cpp-feedstock/blob/main/recipe/patches/0001-don-t-bake-non-relocatable-CMAKE_INSTALL_FULL_LIBDIR.patch) and an [activation script](https://github.com/conda-forge/arrow-cpp-feedstock/blob/main/recipe/activate.sh) (which will always execute upon entering/activating an environment).
   
   @kou asked me in https://github.com/apache/arrow/pull/34652 to open an issue for this. It would be great if we could have a better way to support gdb also in conda-forge, but at the moment I don't see how that would work.
   
   ### Component(s)
   
   Packaging


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


[GitHub] [arrow] kou commented on issue #34670: [Packaging][C++] gdb integration is not compatible with conda packaging

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

   @h-vetinari I've merged #34672. Could you try it in #34652?


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


[GitHub] [arrow] kou commented on issue #34670: [Packaging][C++] gdb integration is not compatible with conda packaging

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

   I think that this is not related.
   https://github.com/apache/arrow/pull/34020/files#diff-89ec0f60ce64dbc83670ee53b2182c2817d2a282c7175f2e245414981ba68330R19 may be related.
   Anyway, could you open a new issue for it?


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


[GitHub] [arrow] kou closed issue #34670: [Packaging][C++] gdb integration is not compatible with conda packaging

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou closed issue #34670: [Packaging][C++] gdb integration is not compatible with conda packaging
URL: https://github.com/apache/arrow/issues/34670


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


[GitHub] [arrow] wjones127 commented on issue #34670: [Packaging][C++] gdb integration is not compatible with conda packaging

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

   Could this be related to this failure: https://github.com/ursacomputing/crossbow/actions/runs/4653277236/jobs/8234012192


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


[GitHub] [arrow] kou commented on issue #34670: [Packaging][C++] gdb integration is not compatible with conda packaging

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

   Thanks for confirming this approach.
   I've opened a pull request: #34672


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


[GitHub] [arrow] kou commented on issue #34670: [Packaging][C++] gdb integration is not compatible with conda packaging

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

   @github-actions crossbow submit test-conda-python-3.10


-- 
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] [Packaging][C++] gdb integration is not compatible with conda packaging [arrow]

Posted by "alex-sarafianos (via GitHub)" <gi...@apache.org>.
alex-sarafianos commented on issue #34670:
URL: https://github.com/apache/arrow/issues/34670#issuecomment-1889281933

   In what version was this fixed? I'm experiencing problems in the installation location of libarrow.so.1400.1.0-gdb.py (same with libarrow.so.1400.2.0-gdb.py) when using conda.


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


[GitHub] [arrow] kou commented on issue #34670: [Packaging][C++] gdb integration is not compatible with conda packaging

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

   How about specifying `-DARROW_GDB_INSTALL_DIR=replace_this_section_with_absolute_slashed_path_to_CONDA_PREFIX` with the change instead of patching?
   
   ```diff
   diff --git a/cpp/cmake_modules/DefineOptions.cmake b/cpp/cmake_modules/DefineOptions.cmake
   index d422514d13..50af2736d3 100644
   --- a/cpp/cmake_modules/DefineOptions.cmake
   +++ b/cpp/cmake_modules/DefineOptions.cmake
   @@ -614,6 +614,13 @@ advised that if this is enabled 'install' will fail silently on components;\
    that have not been built"
                    OFF)
    
   +  define_option_string(ARROW_GDB_INSTALL_DIR
   +                       "Use a custom install directory for GDB plugin. \
   +In general, you don't need to specify this because the default \
   +(CMAKE_INSTALL_FULL_BINDIR on Windows, CMAKE_INSTALL_FULL_LIBDIR otherwise) \
   +is reasonable."
   +                       "")
   +
      option(ARROW_BUILD_CONFIG_SUMMARY_JSON "Summarize build configuration in a JSON file"
             ON)
    
   diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt
   index a3e9f7c733..2af8b67d0f 100644
   --- a/cpp/src/arrow/CMakeLists.txt
   +++ b/cpp/src/arrow/CMakeLists.txt
   @@ -675,20 +675,27 @@ add_arrow_lib(arrow
    # So it's disabled for now.
    if(ARROW_BUILD_SHARED AND NOT WIN32)
      configure_file(libarrow_gdb.py.in "${CMAKE_CURRENT_BINARY_DIR}/libarrow_gdb.py" @ONLY)
   +  if(NOT ARROW_GDB_INSTALL_DIR)
   +    if(WIN32)
   +      set(ARROW_GDB_INSTALL_DIR ${CMAKE_INSTALL_FULL_BINDIR})
   +    else()
   +      set(ARROW_GDB_INSTALL_DIR ${CMAKE_INSTALL_FULL_LIBDIR})
   +    endif()
   +  endif()
      set(ARROW_GDB_AUTO_LOAD_LIBARROW_GDB_INSTALL FALSE)
      if(WIN32)
        find_program(cygpath "cygpath")
        if(cygpath)
   -      execute_process(COMMAND cygpath "${CMAKE_INSTALL_FULL_BINDIR}"
   -                      OUTPUT_VARIABLE MSYS2_CMAKE_INSTALL_FULL_BINDIR
   +      execute_process(COMMAND cygpath "${ARROW_GDB_INSTALL_DIR}"
   +                      OUTPUT_VARIABLE MSYS2_ARROW_GDB_INSTALL_DIR
                          OUTPUT_STRIP_TRAILING_WHITESPACE)
          set(ARROW_GDB_AUTO_LOAD_LIBARROW_GDB_DIR
   -          "${ARROW_GDB_AUTO_LOAD_DIR}${MSYS2_CMAKE_INSTALL_FULL_BINDIR}")
   +          "${ARROW_GDB_AUTO_LOAD_DIR}${MSYS2_ARROW_GDB_INSTALL_DIR}")
          set(ARROW_GDB_AUTO_LOAD_LIBARROW_GDB_INSTALL TRUE)
        endif()
      else()
        set(ARROW_GDB_AUTO_LOAD_LIBARROW_GDB_DIR
   -        "${ARROW_GDB_AUTO_LOAD_DIR}/${CMAKE_INSTALL_FULL_LIBDIR}")
   +        "${ARROW_GDB_AUTO_LOAD_DIR}/${ARROW_GDB_INSTALL_DIR}")
        set(ARROW_GDB_AUTO_LOAD_LIBARROW_GDB_INSTALL TRUE)
      endif()
      if(ARROW_GDB_AUTO_LOAD_LIBARROW_GDB_INSTALL)
   ```


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


[GitHub] [arrow] kou commented on issue #34670: [Packaging][C++] gdb integration is not compatible with conda packaging

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

   @github-actions crossbow submit test-conda-python-3.10


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


[GitHub] [arrow] h-vetinari commented on issue #34670: [Packaging][C++] gdb integration is not compatible with conda packaging

Posted by "h-vetinari (via GitHub)" <gi...@apache.org>.
h-vetinari commented on issue #34670:
URL: https://github.com/apache/arrow/issues/34670#issuecomment-1478815684

   That sounds reasonable. 👍 


-- 
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] [Packaging][C++] gdb integration is not compatible with conda packaging [arrow]

Posted by "h-vetinari (via GitHub)" <gi...@apache.org>.
h-vetinari commented on issue #34670:
URL: https://github.com/apache/arrow/issues/34670#issuecomment-1889879861

   Can you please raise an issue on the [feedstock](https://github.com/conda-forge/arrow-cpp-feedstock) for arrow, including the requested information?
   
   We spent quite a bit of effort in conda-forge into getting gdb integration working (since v10/v11), so I'd like to know what's not working. 


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