Skip to content

fixing build issues on mac #254

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

Merged
merged 7 commits into from
May 8, 2024
Merged

fixing build issues on mac #254

merged 7 commits into from
May 8, 2024

Conversation

ritvikrao
Copy link
Collaborator

had to make a new pr to get rid of the ray commits; my original pr was made before ray was merged.

@adityapb
Copy link
Contributor

Can you rename the commit and the PR to fixing build issues on mac

contains a workaround to fix the path to the libcharm shared library in the c_object_store library
@ritvikrao ritvikrao changed the title get rid of ray commits fixing build issues on mac Apr 29, 2024
@ZwFink
Copy link
Contributor

ZwFink commented Apr 29, 2024

Pinging @mayantaylor for the new branch. We are hoping you can test this on your Apple Silicon machine

ritvikrao and others added 2 commits May 1, 2024 11:09
Co-authored-by: Matthias Diener <mdiener@illinois.edu>
@mayantaylor
Copy link
Collaborator

mayantaylor commented May 3, 2024

Testing on arm (specifically an AppleM2 running Sonoma) produces the following error:

maya@genmaicha charm4py % python3 setup.py install ... clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -Wno-error=implicit-function-declaration -arch arm8 -Icharm_src/charm/include -I/opt/homebrew/lib/python3.11/site-packages/numpy/core/include -I/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c charm4py/charmlib/charmlib_cython.c -o build/temp.macosx-14.0-arm64-cpython-311/charm4py/charmlib/charmlib_cython.o -g0 -O3

clang: error: invalid arch name '-arch arm8'

For context, I am running clang 15.0.0:
maya@genmaicha ray % clang --version
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.0.0

I can fix this problem with the following edit to setup.py...

def get_build_machine():
machine = platform.machine()
if machine == 'arm64' or machine == 'aarch64':
- return 'arm8'
+ return 'arm64'
return machine

... however, I don't know enough about clang to say for certain that this will work for all arm64/aarch64 machines (although I assume it will). I've pushed this change.

Everything else runs smoothly.

@ritvikrao ritvikrao merged commit 21c0160 into main May 8, 2024
1 check passed
@matthiasdiener matthiasdiener deleted the mac_bug_fixes branch May 29, 2024 14:32
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.

5 participants