Skip to content
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

macOS quirks #131

Open
joseph-long opened this issue Mar 16, 2024 · 1 comment
Open

macOS quirks #131

joseph-long opened this issue Mar 16, 2024 · 1 comment

Comments

@joseph-long
Copy link

I've gotten all the dependencies installed with mamba / conda packages, and successfully ran clang2py on my target library's header, but it required some finagling. I'm documenting the workarounds here in case they're useful:

To get stdlib headers, you must supply the path from xcrun --show-sdk-path to clang. So, --clang-args="-isysroot $(xcrun --show-sdk-path)".

To run nm without an error, you need to make a workaround wrapper as described in #125.

Putting it all together,

clang2py --clang-args="-v -isysroot $(xcrun --show-sdk-path)" \
    --nm ./fake_nm.py \
    -l ../_build/src/libxrif.dylib xrif.h

If the maintainer is interested, I could try to make a PR that applies these changes by default when running on macOS.

@trolldbois
Copy link
Owner

Sure, propose a PR, I'll push it

joseph-long added a commit to joseph-long/ctypeslib that referenced this issue Mar 17, 2024
joseph-long added a commit to joseph-long/ctypeslib that referenced this issue Mar 17, 2024
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

No branches or pull requests

2 participants