-
Notifications
You must be signed in to change notification settings - Fork 294
Make sure patchelf/install_name_tool is available #3543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -330,6 +330,28 @@ if(CMAKE_CXX_VISIBILITY_PRESET) | |
| list(APPEND DEFAULT_CMAKE_ARGS ${CMAKE_CXX_VISIBILITY_PRESET}) | ||
| endif() | ||
|
|
||
| ################################################################################ | ||
| # patchelf / install_name_tool | ||
| # Building with bundled sysdep or rocGDB requires patchelf on Linux and | ||
| # install_name_tool on macOS to set RPATH. | ||
| ################################################################################ | ||
|
|
||
| if(THEROCK_BUNDLE_SYSDEPS OR THEROCK_ENABLE_ROCGDB) | ||
| if(CMAKE_SYSTEM_NAME STREQUAL "Linux") | ||
| find_program(PATCHELF patchelf) | ||
| if(NOT PATCHELF) | ||
| message(FATAL_ERROR "Building with THEROCK_BUNDLE_SYSDEPS=ON or THEROCK_ENABLE_ROCGDB=ON on Linux requires `patchelf`") | ||
| endif() | ||
| message(FATAL_ERROR "!/!") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Stray debug log?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed. That shouldn't go in here. Thanks for the catch. |
||
| elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") | ||
| # macOS uses install_name_tool (from Xcode) instead of patchelf | ||
| find_program(INSTALL_NAME_TOOL install_name_tool) | ||
| if(NOT INSTALL_NAME_TOOL) | ||
| message(FATAL_ERROR "Building with THEROCK_BUNDLE_SYSDEPS=ON or THEROCK_ENABLE_ROCGDB=ON on macOS requires `install_name_tool` (install Xcode Command Line Tools)") | ||
|
lumachad marked this conversation as resolved.
|
||
| endif() | ||
| endif() | ||
| endif() | ||
|
|
||
| ################################################################################ | ||
| # Sysdep bundling | ||
| # Each available bundled sysdep is made available with a global variable like | ||
|
|
@@ -362,10 +384,6 @@ set(THEROCK_BUNDLED_AMDMESA) | |
| if(THEROCK_BUNDLE_SYSDEPS) | ||
| message(STATUS "Building with bundled system dependencies enabled") | ||
| if(CMAKE_SYSTEM_NAME STREQUAL "Linux") | ||
| find_program(PATCHELF patchelf) | ||
| if(NOT PATCHELF) | ||
| message(FATAL_ERROR "Building with THEROCK_BUNDLE_SYSDEPS=ON on Linux requires `patchelf`") | ||
| endif() | ||
| find_program(MESON_BUILD meson) | ||
| if(NOT MESON_BUILD) | ||
| message(FATAL_ERROR "Building with THEROCK_BUNDLE_SYSDEPS=ON on Linux requires (easiest: `pip install meson`)") | ||
|
|
@@ -389,11 +407,6 @@ if(THEROCK_BUNDLE_SYSDEPS) | |
| set(THEROCK_BUNDLED_AMDMESA therock-amd-mesa) | ||
| endif() | ||
| elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") | ||
| # macOS uses install_name_tool (from Xcode) instead of patchelf | ||
| find_program(INSTALL_NAME_TOOL install_name_tool) | ||
| if(NOT INSTALL_NAME_TOOL) | ||
| message(FATAL_ERROR "Building with THEROCK_BUNDLE_SYSDEPS=ON on macOS requires `install_name_tool` (install Xcode Command Line Tools)") | ||
| endif() | ||
| find_program(MESON_BUILD meson) | ||
| if(NOT MESON_BUILD) | ||
| message(FATAL_ERROR "Building with THEROCK_BUNDLE_SYSDEPS=ON on macOS requires `meson` (easiest: `pip install meson`)") | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.