-
Notifications
You must be signed in to change notification settings - Fork 424
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
Ignore patching Mach-O files if not running on macOS #3912
Conversation
Would removing the assert and building install_name_tool in Linux not be a better approach here? |
This seems pretty clean and simple to me. Thanks @chrisburr 😀 Why do we need |
Because as seems to be the case here we are building broken macOS software on Linux. |
Definitely and conda-forge already has it in As it stands the import is commented out so other changes will also be needed: conda-build/conda_build/post.py Lines 39 to 40 in 79da171
In the case of CMake it's actually okay as the binary in question doesn't need to be modified to make it relocatable so we're not actually building broken software. That said, there is the potential to but I think it's still better than the current situation where it's impossible to build CMake. |
Thanks! |
Thanks Chris and Ray! 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to thank @chrisburr for the fix as I was struggling with that exact issue today a lot (e.g., in this build).
assert sys.platform == 'darwin' | ||
if sys.platform != 'darwin': | ||
log.warn("Found Mach-O file but patching is only supported on macOS, skipping: %s", path) | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a standard style (2 blank space indents) here in conda-build? I saw 4 space indents in many other codes of the code base.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be 4 spaces. Can you please send a PR to fix it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR #3925 adjusts the indentation and fixes another bug introduced here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Hi there, thank you for your contribution! This pull request has been automatically locked because it has not had recent activity after being closed. Please open a new issue or pull request if needed. Thanks! |
As found in conda-forge/cmake-feedstock#115 (comment) the Linux CMake build produces a Mach-O binary which then triggers this assertion and causes the build to fail.
This is a regression in 3.18 as this function used to never be called on other platforms: https://github.com/conda/conda-build/pull/3808/files#diff-60400bbbdb51124a0a8a06ca17ecec5cL1105
cc @jakirkham