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

upgrading c-api cmake #63

Merged
merged 3 commits into from
Jan 23, 2024
Merged

upgrading c-api cmake #63

merged 3 commits into from
Jan 23, 2024

Conversation

scarrazza
Copy link
Contributor

This fixes compilation and installation issues on linux and mac, however on mac I cannot run the example using python3 from Xcode:

dyld[15376]: Library not loaded: @rpath/Python3.framework/Versions/3.9/Python3
  Reason: no LC_RPATH's found
Abort trap: 6

@scarlehoff does this works for you with homebrew?

@scarrazza
Copy link
Contributor Author

I have the suspicious that Python3_LINK_OPTIONS could fix this problem but I did not manage to find how.

@scarlehoff
Copy link
Member

tbh, I think the c interface might be simple enough to skip the complexity introduced by cmake...

I haven't had the mac the last few days, I'll try it out and see whether I can fix it.

@scarlehoff
Copy link
Member

The problem you are seeing is due to DYLD_LIBRARY_PATH=${VIRTUAL_ENV}/lib:${DYLD_LIBRARY_PATH}

I'd add it as a comment to the readme. There's another problem in mac os when running under virtual environments, but it is also a "non-problem" in the sense that a long as the executable is in ${VIRTUAL_ENV}/bin it works ok. For some reason mac and linux set sys.executable differently and, reading this I would say that Mac's way is a bug.

@scarlehoff
Copy link
Member

updated the readme, the problem with sys.executable I wouldn't bother...

capi/README.md Outdated Show resolved Hide resolved
Co-authored-by: Stefano Carrazza <scarrazza@users.noreply.github.com>
@scarrazza
Copy link
Contributor Author

Anyway, I think we can merge this given that also linux needs those changes in order to compile successfully.

Copy link
Member

@scarlehoff scarlehoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok for me. I did test it in Linux and it works.

@scarrazza scarrazza merged commit 0546ddb into master Jan 23, 2024
3 checks passed
@scarrazza scarrazza deleted the fixescmake branch January 23, 2024 08:52
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.

2 participants