Skip to content

Fix libraw linking on macOS with sdist - #294

Merged
letmaik merged 3 commits into
mainfrom
fix/issue-293-libraw-linking
Aug 30, 2026
Merged

letmaik merged 3 commits into
mainfrom
fix/issue-293-libraw-linking

Conversation

@letmaik

@letmaik letmaik commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Fixes #293.

letmaik and others added 3 commits August 29, 2026 17:53
Link bundled Unix libraries by their exact paths so environment-provided library directories cannot select an incompatible system LibRaw.

Co-authored-by: Copilot <[email protected]>
Build with Homebrew LibRaw ahead of the bundled library directory and inspect the wheel before delocation to catch accidental system-library linkage.

Co-authored-by: Copilot <[email protected]>
@agrif

agrif commented Aug 30, 2026

Copy link
Copy Markdown

I just tested this and confirm this fixes the problem on my mac.

agrif@anduril:~/devel/lightleak$ otool -L rawpy/_rawpy.cpython-313-darwin.so
rawpy/_rawpy.cpython-313-darwin.so:
	@rpath/libraw_r.25.dylib (compatibility version 25.0.0, current version 25.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.23.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)

And with #295, it is loading the version it compiled with (and not my system libraw 0.21.4).

Python 3.13.3 (main, Apr 12 2025, 09:27:05) [Clang 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import rawpy
>>> rawpy.libraw_version
(0, 22, 1)
>>> rawpy.libraw_version_compiled
(0, 22, 1)

Thank you very much!

@letmaik
letmaik merged commit 57e8a60 into main Aug 30, 2026
140 checks passed
@letmaik
letmaik deleted the fix/issue-293-libraw-linking branch August 30, 2026 04:09
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.

postprocess() fails with LibRawOutOfOrderCallError on CR2 files in MacOS, works in Linux

2 participants