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

gyp: fix XCode CLT version detection on Catalina #44

Merged
merged 3 commits into from
Jun 5, 2020

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Jun 2, 2020

Copies @szekelyisz nodejs/node-gyp#2141 to this repo.

@rvagg
Copy link
Member

rvagg commented Jun 2, 2020

@szekelyisz: any idea what /usr/sbin/softwareupdate --history does with software that's since been removed? Is it possible that this will find an old CLI tools that is no longer there?

@szekelyisz
Copy link

szekelyisz commented Jun 2, 2020

@szekelyisz: any idea what /usr/sbin/softwareupdate --history does with software that's since been removed? Is it possible that this will find an old CLI tools that is no longer there?

@rvagg Hmm I didn't test that. AFAIK there's no (clean) way to roll back any update in macOS, and the package is gone, so the only way I can imagine to remove the tools is to delete the installation directory (usually /Library/Developer/CommandLineTools/). But in that case this patch will do exactly the same as happened before (compilation will fail with command not found or something).

pylib/gyp/xcode_emulation.py Outdated Show resolved Hide resolved
Co-authored-by: Michaël Zasso <targos@protonmail.com>
Copy link
Member

@richardlau richardlau left a comment

Choose a reason for hiding this comment

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

RSLGTM.

I'm not a mac user and don't have a way of verifying/testing this locally. I believe @BethGriggs has tested the nodejs/node-gyp#2141 patch against the gyp in core and was able to build Node.js but still got "No receipt for ..." warnings.

Copy link
Contributor

@ryzokuken ryzokuken left a comment

Choose a reason for hiding this comment

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

RSLGTM. Can try testing this on MacOS, but it'll take me a while to get Catalina running.

@BethGriggs
Copy link
Member

As @richardlau mentioned, I had seemingly related issue with Xcode on Catalina yesterday.

Before:

creating config.gypi
creating config.status
creating config.mk
running: 
    python tools/gyp_node.py --no-parallel -f make-mac
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!
Error running GYP

After applying the patch from nodejs/node-gyp#2141 I was able to build (this was v10.x). The No receipt for ... warnings still appeared in the output though. I ended up just sudo rm -r /Library/Developer/CommandLineTools and reinstalling.

@lorenzopicoli
Copy link

When can we expect to have this merged and released?

@ryzokuken
Copy link
Contributor

I'll merge this now since @BethGriggs has confirmed that it fixes the problem atleast to some extent. At some point in the near future, either me or @targos would make a release and update it in nodejs/node and nodejs/node-gyp.

@ryzokuken ryzokuken merged commit 208f919 into master Jun 5, 2020
@ryzokuken ryzokuken deleted the XCode-CLT-version-detection branch June 5, 2020 17:48
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.

8 participants