macOS: "no LC_RPATH's found"
- Dominant language
- C++
- Stars
- 401
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
"no LC_RPATH's found" error when running cjpegli on macOS after compiling:
```
$cjpegli
dyld[49871]: Library not loaded: @rpath/libjxl_threads.0.12.dylib
Referenced from: <648C7C62-F34C-3F02-89A8-4F67857F5167> /usr/local/bin/cjpegli
Reason: no LC_RPATH's found
zsh: abort cjpegli
```
**To Reproduce**
Steps to reproduce the behavior:
```
git clone https://github.com/libjxl/libjxl.git --recursive --shallow-submodules
brew install llvm coreutils cmake giflib jpeg-turbo libpng ninja zlib
path+=('/opt/homebrew/opt/llvm/bin/')
export CMAKE_PREFIX_PATH=`brew --prefix giflib`:`brew --prefix jpeg-turbo`:`brew --prefix libpng`:`brew --prefix zlib`
cd libjxl
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF ..
cmake --build . -- -j$(nproc)
sudo cmake --install .
```
It does work fine if I run it out of the `build/tools/` directory though.
**Expected behavior**
No error when running `cjepgli`, just the Usage output.
**Environment**
- OS: macOS 15.0.1 "Sequoia"
- Compiler version: 19.1.2
- CPU type: ARM (Apple M1)
- cjxl/djxl version string: N/A
Contributor guide
Assessment
This issue has not been assessed yet.