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

Fix for setup issue on non-x86 platforms #191

Closed

Conversation

vetlewi
Copy link
Collaborator

@vetlewi vetlewi commented Oct 22, 2021

The setup.py script used a x86 spesific flags,-mfpmath=sse, that would break compilation on other architectures. This flag is now disabled for architectures other than x86. Fixes issue #190.

Marked as draft awaiting test on an actual M1 computer.

@vetlewi
Copy link
Collaborator Author

vetlewi commented Oct 28, 2021

This PR also adds "support" for GCC on macOS. This is not a normal setup and I'm considering removing it again. I cannot see any good reason to use GCC instead of clang...

@vetlewi
Copy link
Collaborator Author

vetlewi commented Oct 28, 2021

This PR also adds "support" for GCC on macOS. This is not a normal setup and I'm considering removing it again. I cannot see any good reason to use GCC instead of clang...

I removed it. Added a note in the FAQ.

@vetlewi
Copy link
Collaborator Author

vetlewi commented Oct 28, 2021

Can confirm that it compiles on laptops with M1 processors. Ready for merge.

@vetlewi vetlewi marked this pull request as ready for review October 28, 2021 11:23
The setup.py script used a x86 spesific flags,`-mfpmath=sse`, that would break compilation on other architectures. This flag is now disabled for architectures other than x86.
If macOS we will also check if the default compiler is clang or gcc.
I've updated the setup script to detect check the CC flag for what compiler to use. I've also added a super simple hacky test that removes the `-stdlib=libc++` compile flag.
However, this will probably not work unless GCC are also used to compile python since libc++ of clang and libstdc++ are not ABI compatible. There will probably be link issues.
I've added a note about using GCC under macOS in the FAQ section.
Added a note about the fixes added in this PR
I decided that we shouldn't even consider this. Way too much hassel, not any great payout.
@vetlewi vetlewi force-pushed the fix/issue/190/M1-compile-issue branch from feedf3b to 3010995 Compare October 28, 2021 12:56
@vetlewi
Copy link
Collaborator Author

vetlewi commented Jan 5, 2022

Can confirm that it compiles on laptops with M1 processors. Ready for merge.

@ErlendLima @fzeiser

@vetlewi
Copy link
Collaborator Author

vetlewi commented Jan 17, 2023

Being fixed in another PR, closing this.

@vetlewi vetlewi closed this Jan 17, 2023
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.

1 participant