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

If there are multiple versions of nasm in the PATH, try them all #36

Merged
merged 1 commit into from
Dec 3, 2021

Conversation

kornelski
Copy link
Contributor

Xcode's build environment inserts macOS SDK binaries as first in the path, and Apple ships an ancient unusable version of nasm.
This effectively breaks nasm-based builds, even on machines that have a good copy of nasm installed via homebrew. It's a PITA issue to debug when the same build command works in terminal, but not in Xcode's shell script.

This works around the issue by trying normal "nasm" first, as before. If that nasm is too old, then searches rest of the PATH. Uses std to parse PATH in a portable way.

It also fixes error message in case no nasm is found. Previously it'd print "This version of NASM is too old: No such file or directory". Now it handles Command's error explicitly with a better message.

@medek medek merged commit 76c349b into medek:master Dec 3, 2021
@medek
Copy link
Owner

medek commented Dec 3, 2021

Okay, but you can just delete the xcode shipped nasm and nothing will break.

@kornelski kornelski deleted the anti-xcode branch December 4, 2021 00:54
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