GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tools: update gyp to make xcode tools work by ryzokuken · Pull Request #21520 · nodejs/node

Conversation

@ryzokuken

@ryzokuken ryzokuken commented Jun 25, 2018

Copy link
Copy Markdown
Contributor

A recent change must have started requiring a full XCode installation in
order to run "./configure" and pretty much everything related.
This patch ensures that a full installation isn't required and the tools
work just fine.

Credits: @bnoordhuis
Fixes: #12531

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

/cc @bnoordhuis @refack @nodejs/gyp

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot

nodejs-github-bot commented Jun 25, 2018

Copy link
Copy Markdown
Collaborator

@ryzokuken build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/150/pipeline

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to Node.js builds or CI infrastructure. tools Issues and PRs related to the tools directory. labels Jun 25, 2018
bnoordhuis
bnoordhuis approved these changes Jun 25, 2018
View reviewed changes

@bnoordhuis bnoordhuis left a comment

Copy link
Copy Markdown
Member

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.

Can I sign off on my own code? Of course I can!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
joyeecheung
joyeecheung approved these changes Jun 25, 2018
View reviewed changes
@Trott

Trott commented Jun 26, 2018

Copy link
Copy Markdown
Member

Not a blocking objection, but I think the commit message here could be revised. It seems to say (or at least imply?) that building without full XCode is broken. But if I understand correctly, it's not broken. It just shows an error message that happens to not matter. This doesn't "fix" a broken build process. It suppresses an erroneous error message. (Or am I mistaken?)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ryzokuken

ryzokuken commented Jun 26, 2018

Copy link
Copy Markdown
Contributor Author

@Trott no. The error message still keeps coming (and is very irritating), but without this patch, I found it impossible to build without full XCode, so yeah, it's probably broken.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott

Trott commented Jun 26, 2018

Copy link
Copy Markdown
Member

@Trott no. The error message still keeps coming (and is very irritating), but without this patch, I found it impossible to build without full XCode, so yeah, it's probably broken.

Interesting. I find it nearly impossible to believe that building with full XCode could be broken without it impacting a significant percentage of core devs. But I suppose it's possible that it affects just the right version of XCode and/or OS or something like that.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott

Trott commented Jun 26, 2018

Copy link
Copy Markdown
Member

I don't want to be too annoying about my fixation on this, and you can totally ignore me if you want. That said, some other observations:

FWIW, I don't have a full XCode installed an either of the machines I use to build Node.js and I haven't had a problem building.

The bug that this fixes is over a year old but the commit message talks of a "recent change"... I guess it's possible that the bug first manifested as an irritating-but-harmless message over a year ago and then started causing a completely build failure more recently under certain conditions.

It might be good to simply remove speculation. Maybe something more like this?

tools: patch gyp for Xcode tools

Work around errors that occur when building without a full
XCode installation. 

Maybe those errors mean you can't build and maybe they don't, but either way, let's navigate around them.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ryzokuken

ryzokuken commented Jun 26, 2018

Copy link
Copy Markdown
Contributor Author

I don't want to be too annoying about my fixation on this, and you can totally ignore me if you want.

@Trott not at all! I'd love to get to the bottom of this as well.

Interesting. I find it nearly impossible to believe that building with full XCode could be broken without it impacting a significant percentage of core devs. But I suppose it's possible that it affects just the right version of XCode and/or OS or something like that.

FWIW, I don't have a full XCode installed an either of the machines I use to build Node.js and I haven't had a problem building.

Strange, right? I should've mentioned that this happened only when setting up the project from scratch on a new machine (my home machine works just fine). So I also believe this has something to do with a specific XCode/MacOS version maybe?

Trott reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ryzokuken

ryzokuken commented Jun 27, 2018

Copy link
Copy Markdown
Contributor Author

@Trott I hope this looks good to you? Planning to land this soon-ish.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott

Trott commented Jun 28, 2018

Copy link
Copy Markdown
Member

Yup, as I wrote above, "not a blocking objection". If CI is green and no one else objects, feel free to land. I would prefer the commit message get revised (and provided my suggestion above), but it's fine if it doesn't.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ryzokuken

ryzokuken commented Jun 28, 2018

Copy link
Copy Markdown
Contributor Author

@Trott it's fine. I'll amend the commit message, run CI and land tomorrow morning.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gibfahn

gibfahn commented Jun 29, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

The error message still keeps coming (and is very irritating)

FWIW applying nodejs/node-gyp#1370 to the in-tree copy of gyp should fix the other error. I haven't done it because I'm not sure how updating gyp in node works, but if someone else would like to pull that change in they're more than welcome to.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gibfahn

gibfahn commented Jun 29, 2018

Copy link
Copy Markdown
Member

To clarify:

master:

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation
xcrun: error: unable to lookup item 'PlatformPath' in SDK '/'

This PR:

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

This PR + nodejs/node-gyp#1370:

I applied the patch by doing: curl https://github.com/nodejs/node-gyp/commit/3a52936d6cae0b35a4bd486017c7c7a88ae0b415.patch | git am -3 --directory=tools and then fixing the merge conflict (change GetStdout to GetStdoutQuiet).

@ryzokuken if you would be willing to apply that one (probably best left to a separate PR) then I think we could get ./configure to run cleanly, which would be amazing.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gibfahn
gibfahn approved these changes Jun 29, 2018
View reviewed changes

@gibfahn gibfahn left a comment

Copy link
Copy Markdown
Member

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.

LGTM with the commit message changed

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gibfahn

gibfahn commented Jun 29, 2018

Copy link
Copy Markdown
Member

Commit message suggestion:

tools: patch gyp to avoid xcrun errors

Previously running ./configure with only the Xcode Command Line Tools
installed would give:

xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation
xcrun: error: unable to lookup item 'PlatformPath' in SDK '/'
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gibfahn

gibfahn commented Jun 29, 2018

Copy link
Copy Markdown
Member

@Trott no. The error message still keeps coming (and is very irritating), but without this patch, I found it impossible to build without full XCode, so yeah, it's probably broken.

It's not really a big deal if it's fixed by this, but it sounds like something is different about your machine that makes xcode fail rather than just logging the errors and continuing, I also have no problems with the command line tools.

I would say let's debug it, but if this PR fixes the issue let's just land it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ryzokuken

ryzokuken commented Jun 29, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@gibfahn it actually does fix the issue, and I think @bnoordhuis would have much more insight over how thing even works, but I'm thinking that because they were able to hack up a solution this quick, then there must be a catch.

P.S. totally using your suggestion for the commit message, thanks.

gibfahn reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ryzokuken
ryzokuken force-pushed the gyp-xcode branch from e47adff to f90021c Compare June 29, 2018 17:35
@ryzokuken

ryzokuken commented Jun 29, 2018

Copy link
Copy Markdown
Contributor Author

CI: https://ci.nodejs.org/job/node-test-pull-request/15666/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ryzokuken
ryzokuken force-pushed the gyp-xcode branch from f90021c to 5767385 Compare June 29, 2018 20:22
@ryzokuken

ryzokuken commented Jun 29, 2018

Copy link
Copy Markdown
Contributor Author

Force pushed to update failing master, rerunning tests.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gibfahn

gibfahn commented Jun 30, 2018

Copy link
Copy Markdown
Member

Still LGTM, but if you wanted to credit Ben you could use the Co-authored-by:.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ryzokuken

ryzokuken commented Jun 30, 2018

Copy link
Copy Markdown
Contributor Author

@gibfahn awesome! I'll add that line.

gibfahn reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ryzokuken
ryzokuken force-pushed the gyp-xcode branch from 5767385 to c366c30 Compare June 30, 2018 15:14
@ryzokuken @bnoordhuis
tools: patch gyp to avoid xcrun errors
781c228
Previously running ./configure with only the Xcode Command Line Tools
installed would give:

xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation
xcrun: error: unable to lookup item 'PlatformPath' in SDK '/'

Co-authored-by: Ben Noordhuis <[email protected]>
Fixes: nodejs#12531
@ryzokuken
ryzokuken force-pushed the gyp-xcode branch from c366c30 to 781c228 Compare June 30, 2018 15:24
@ryzokuken

ryzokuken commented Jun 30, 2018

Copy link
Copy Markdown
Contributor Author

CI: https://ci.nodejs.org/job/node-test-pull-request/15692/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

refack
refack approved these changes Jun 30, 2018
View reviewed changes
@ryzokuken

ryzokuken commented Jun 30, 2018

Copy link
Copy Markdown
Contributor Author

Windows Fanned: https://ci.nodejs.org/job/node-test-commit-windows-fanned/19058/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ryzokuken

ryzokuken commented Jul 1, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Windows fanned passed, landing once linux passes: https://ci.nodejs.org/job/node-test-commit-linux/19881/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ryzokuken

ryzokuken commented Jul 8, 2018

Copy link
Copy Markdown
Contributor Author

CI: https://ci.nodejs.org/job/node-test-pull-request/15758/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@maclover7

maclover7 commented Jul 10, 2018

Copy link
Copy Markdown
Contributor

Should this patch be applied to node-gyp's version of GYP too?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ryzokuken

ryzokuken commented Jul 10, 2018

Copy link
Copy Markdown
Contributor Author

@maclover7 is node-gyp affected by this? I tried it with our version of gyp and it just won't work without a full XCode installation. Let's check if node-gyp requires this patch too?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gibfahn

gibfahn commented Jul 10, 2018

Copy link
Copy Markdown
Member

Should this patch be applied to node-gyp's version of GYP too?

@maclover7 yep, that's a separate PR someone should raise (but it doesn't block or affect this PR).

tl;dr: 2 changes in 2 repos, once they've all landed we should be warning-free everywhere:

  • xcrun error:
    • node: This PR
    • node-gyp: another PR (if someone would like to raise it then 👍 )
  • xcode-select error:
    • node: another PR (if someone would like to raise it then 👍 )
    • node-gyp: gyp: don't print xcodebuild not found errors node-gyp#1370
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ryzokuken

ryzokuken commented Jul 10, 2018 via email

Copy link
Copy Markdown
Contributor Author
Replying by mail so cannot use emoji responses, but will be glad to submit the two patches in the next few hours.
…
On Tue 10 Jul, 2018, 11:55 PM Gibson Fahnestock, ***@***.***> wrote: Should this patch be applied to node-gyp's version of GYP too? @maclover7 <https://github.com/maclover7> yep, that's a separate PR someone should raise (but it doesn't block or affect this PR). tl;dr: 2 changes in 2 repos, once they've all landed we should be warning-free everywhere: - xcrun error: - node: This PR - node-gyp: another PR (if someone would like to raise it then 👍 ) - xcode-select error: - node: another PR (if someone would like to raise it then 👍 ) - node-gyp: nodejs/node-gyp#1370 <nodejs/node-gyp#1370> — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#21520 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AMg3MsYOiipFxzzOdvFkZko7c0J8grxYks5uFPGrgaJpZM4U18HO> .
gibfahn reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell approved these changes Jul 10, 2018
View reviewed changes
@ryzokuken

ryzokuken commented Jul 12, 2018

Copy link
Copy Markdown
Contributor Author

OSX Rebuild: https://ci.nodejs.org/job/node-test-commit-osx/19776/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ryzokuken added a commit to ryzokuken/node that referenced this pull request Jul 12, 2018
@ryzokuken @gibfahn
gyp: muffle xcode-select warnings
1c91528
Muffle gyp from creating xcode-select related warnings, essentially
flooding the console.

Co-authored-by: Gibson Fahnestock <[email protected]>
Refs: nodejs/node-gyp#1370
Refs: nodejs#21520
@gibfahn gibfahn mentioned this pull request Jul 13, 2018
gyp: muffle xcode-select warnings #21784
Closed
4 tasks
@ryzokuken

ryzokuken commented Jul 29, 2018

Copy link
Copy Markdown
Contributor Author

Final CI run (hopefully): https://ci.nodejs.org/job/node-test-pull-request/16055/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ryzokuken

ryzokuken commented Jul 29, 2018

Copy link
Copy Markdown
Contributor Author

Windows rebuild: https://ci.nodejs.org/job/node-test-commit-windows-fanned/19536/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ryzokuken

ryzokuken commented Jul 29, 2018

Copy link
Copy Markdown
Contributor Author

Tests passed, landing this.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ryzokuken

ryzokuken commented Jul 29, 2018

Copy link
Copy Markdown
Contributor Author

Landed in 51812ff

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ryzokuken ryzokuken closed this Jul 29, 2018
ryzokuken added a commit that referenced this pull request Jul 29, 2018
@ryzokuken
tools: patch gyp to avoid xcrun errors
51812ff
Previously running ./configure with only the Xcode Command Line Tools
installed would give:

xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation
xcrun: error: unable to lookup item 'PlatformPath' in SDK '/'

Co-authored-by: Ben Noordhuis <[email protected]>
Fixes: #12531

PR-URL: #21520
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Jul 31, 2018
@ryzokuken @targos
tools: patch gyp to avoid xcrun errors
0151486
Previously running ./configure with only the Xcode Command Line Tools
installed would give:

xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation
xcrun: error: unable to lookup item 'PlatformPath' in SDK '/'

Co-authored-by: Ben Noordhuis <[email protected]>
Fixes: #12531

PR-URL: #21520
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@targos targos mentioned this pull request Jul 31, 2018
v10.8.0 proposal #22040
Merged
This was referenced Aug 1, 2018
2018-08-01 Version 10.8.0 (Current) @targos beevelop/docker-nodejs#212
Closed
2018-08-01 Version 10.8.0 (Current) @targos beevelop/docker-android-nodejs#223
Closed
2018-08-01 Version 10.8.0 (Current) @targos beevelop/docker-android-nodejs#224
Closed
2018-08-01 Version 10.8.0 (Current) @targos beevelop/docker-android-nodejs#225
Closed
2018-08-01 Version 10.8.0 (Current) @targos beevelop/docker-android-nodejs#226
Closed
2018-08-01 Version 10.8.0 (Current) @targos beevelop/docker-android-nodejs#227
Closed
rvagg pushed a commit to nodejs/node-gyp that referenced this pull request Aug 9, 2018
@ryzokuken @rvagg
tools: patch gyp to avoid xcrun errors
eebc8f6
Previously running ./configure with only the Xcode Command Line Tools
installed would give:

xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation
xcrun: error: unable to lookup item 'PlatformPath' in SDK '/'

Co-authored-by: Ben Noordhuis <[email protected]>
Fixes: nodejs/node#12531

PR-URL: nodejs/node#21520
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
rvagg pushed a commit to nodejs/node-gyp that referenced this pull request Aug 9, 2018
@ryzokuken @rvagg
tools: patch gyp to avoid xcrun errors
e8ea74e
Previously running ./configure with only the Xcode Command Line Tools
installed would give:

xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation
xcrun: error: unable to lookup item 'PlatformPath' in SDK '/'

Co-authored-by: Ben Noordhuis <[email protected]>
Fixes: nodejs/node#12531

PR-URL: nodejs/node#21520
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
BaochengSu pushed a commit to BaochengSu/node that referenced this pull request Oct 20, 2020
@ryzokuken @BaochengSu
tools: patch gyp to avoid xcrun errors
4608d26
Previously running ./configure with only the Xcode Command Line Tools
installed would give:

xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation
xcrun: error: unable to lookup item 'PlatformPath' in SDK '/'

Co-authored-by: Ben Noordhuis <[email protected]>
Fixes: nodejs#12531

PR-URL: nodejs#21520
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
(cherry picked from commit 51812ff)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@bnoordhuis bnoordhuis bnoordhuis approved these changes
@jasnell jasnell jasnell approved these changes
@joyeecheung joyeecheung joyeecheung approved these changes
+2 more reviewers
@refack refack refack approved these changes
@gibfahn gibfahn gibfahn approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

build Issues and PRs related to Node.js builds or CI infrastructure. tools Issues and PRs related to the tools directory.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

xcrun error when building master

Uh oh!

There was an error while loading. Please reload this page.

9 participants

@ryzokuken @nodejs-github-bot @Trott @gibfahn @maclover7 @refack @bnoordhuis @jasnell @joyeecheung
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.