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

fixes to allow mac builds to work smoothly #248

Closed
wants to merge 51 commits into from
Closed

Conversation

ritvikrao
Copy link
Collaborator

I made a couple of changes to allow the charm4py build on macs to work smoothly. Note that this only solves the issues that arise after a successful charm++ install has happened; there's an ongoing pr in the charm++ repo to fix charm4py installation issues there.

The first change adds a flag in setup.py to ignore implicit function declaration errors that show up with newer versions of Apple Clang (15.0.0 and up). The second change modifies charm4py/charmlib/ctypes_py to specify that the charm++ library file created by mac builds is libcharm.dylib, not libcharm.so.

@ritvikrao
Copy link
Collaborator Author

I think this should be merged now, with the fix made here: charmplusplus/charm#3797

@ritvikrao ritvikrao requested review from adityapb and ZwFink March 31, 2024 17:47
matthiasdiener
matthiasdiener previously approved these changes Apr 1, 2024
@ritvikrao ritvikrao marked this pull request as ready for review April 1, 2024 15:45
@ritvikrao
Copy link
Collaborator Author

I added changes to the charm4py install documentation to put the current working build procedure first. Additionally, as Sanjay said in the 4/1 Charm4py meeting, any fixes to the implicit function warnings should be part of another pr.

docs/install.rst Outdated
@@ -72,25 +76,24 @@ and run setup::
to manually build the Charm++ library (see below).


Manually building the Charm++ shared library
--------------------------------------------
pip (Python 3.7 and older)
Copy link
Contributor

Choose a reason for hiding this comment

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

pip works for newer Python versions too. Just that pip3 install charm4py will build from source instead of getting prebuilt binaries

@ritvikrao
Copy link
Collaborator Author

ritvikrao commented Apr 29, 2024

I added an OS call to fix the path in the c_object_store shared object file. it's just a workaround/hack for now

@ZwFink
Copy link
Contributor

ZwFink commented Apr 29, 2024

We should check that this also works for Apple Silicon macs... @mayantaylor can you confirm?

@adityapb
Copy link
Contributor

@ritvikrao Can you make these changes on top of the main branch so that my commits from the ray branch don't show up

@ritvikrao ritvikrao closed this Apr 29, 2024
@ritvikrao ritvikrao deleted the mac_bug_fixes branch April 29, 2024 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants