Skip to content

cmake/docs: fix macOS install RPATH and update install notes#105

Open
JulianGrg wants to merge 2 commits into
elgw:masterfrom
JulianGrg:fix/macos-install-path
Open

cmake/docs: fix macOS install RPATH and update install notes#105
JulianGrg wants to merge 2 commits into
elgw:masterfrom
JulianGrg:fix/macos-install-path

Conversation

@JulianGrg

Copy link
Copy Markdown
Contributor

This PR improves macOS installation support in two ways.

First, it updates the CMake install configuration so that the installed dw executable receives a macOS runtime library search path. Without this, dw can fail after installation with:

Library not loaded: @rpath/libkdtree.dylib
Reason: no LC_RPATH's found

The CMake change adds an Apple-specific INSTALL_RPATH pointing from the installed executable directory to the installed library directory:

@loader_path/../${CMAKE_INSTALL_LIBDIR}

This should allow the installed dw binary to find libkdtree.dylib without requiring users to patch the binary manually with install_name_tool.

Second, this PR updates the macOS installation documentation with:

  • Homebrew dependency installation instructions, including libomp
  • OpenMP setup notes for macOS
  • A fallback CMake invocation for cases where omp.h is not found
  • Troubleshooting instructions for the previous libkdtree.dylib runtime-path issue

The documentation keeps the manual install_name_tool workaround as a troubleshooting fallback, but the CMake change should avoid the need for it in normal installations.

I kept the old macOS install notes, but they can be removed if wished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant