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

remove the need for xcodebuild #1057

Closed
wants to merge 1 commit into from
Closed

remove the need for xcodebuild #1057

wants to merge 1 commit into from

Conversation

gdams
Copy link
Member

@gdams gdams commented Nov 23, 2016

xcodebuild now requires full xcode and not just developer tools
I have removed all commands that use xcode build and there seems to be no issues. This also means that we don't get the error message anymore.
What is the reason we actually need to use xcodebuild?

I know that this is something that should probably be raised with gyp upstream, but I wanted to make sure that this seems reasonable first.

I have removed all commands that use xcode build and there seems to
be no issues. This means that we don't get the error message anymore.
@rvagg
Copy link
Member

rvagg commented Nov 23, 2016

You may need to ask upstream about this, honestly I have no idea whether this is a good idea or not.

@refack
Copy link
Contributor

refack commented May 2, 2017

FYI, trying to push this upstream https://chromium-review.googlesource.com/c/492046/ voice your opinion

@gibfahn
Copy link
Member

gibfahn commented Oct 20, 2017

According to @bnoordhuis in #1267 (comment) we don't pull things from GYP any more, therefore this should be good to land?

@gibfahn
Copy link
Member

gibfahn commented Oct 20, 2017

This should also go into the copy of GYP vendored into node, to fix the ./configure errors.

@refack
Copy link
Contributor

refack commented Oct 20, 2017

I kicked off a dry run on the upstream CL, so we can at least benefit from their CI coverage.

@gibfahn
Copy link
Member

gibfahn commented Oct 20, 2017

I kicked off a dry run on the upstream CL, so we can at least benefit from their CI coverage.

👍 , and if you think there's a chance you'll succeed in the upstreaming then I'm happy to do that, it just seems unlikely to ever make it back into node-gyp or node at this point.

@refack
Copy link
Contributor

refack commented Oct 20, 2017

I kicked off a dry run on the upstream CL, so we can at least benefit from their CI coverage.

👍 , and if you think there's a chance you'll succeed in the upstreaming then I'm happy to do that, it just seems unlikely to ever make it back into node-gyp or node at this point.

As for upstreaming, Dirk approves pretty much every reasonable change (that is not Mac or ninja).
I try to keep core's GYP up to date, and there's #1183 to bump it here.
But it seems like chromium broke the trybots for GYP, so maybe we need to set up our own.

@gibfahn
Copy link
Member

gibfahn commented Oct 20, 2017

As for upstreaming, Dirk approves pretty much every reasonable change (that is not Mac or ninja).

But this is Mac right?

@haribharadwaj
Copy link

With just the command-line tools, how might one accept the Xcode license? Previously xcodebuild was used for that.

@gibfahn
Copy link
Member

gibfahn commented Jan 3, 2018

With just the command-line tools, how might one accept the Xcode license? Previously xcodebuild was used for that.

When you install the command-line tools, it pops up a UI where you accept the license.

gibfahn added a commit to gibfahn/node-gyp that referenced this pull request Jan 21, 2018
As node-gyp rebuild doesn't seem to need xcodebuild, we don't need to be
printing the error every time GYP is run.

Refs: nodejs#1057
Refs: https://chromium-review.googlesource.com/c/492046/
gibfahn added a commit to gibfahn/node-gyp that referenced this pull request Jan 21, 2018
As node-gyp rebuild doesn't seem to need xcodebuild, we don't need to be
printing the error every time GYP is run.

Refs: nodejs#1057
Refs: https://chromium-review.googlesource.com/c/492046/
Refs: nodejs#569
gibfahn added a commit to gibfahn/node-gyp that referenced this pull request Mar 14, 2018
As node-gyp rebuild doesn't seem to need xcodebuild, we don't need to be
printing the error every time GYP is run.

PR-URL: nodejs#1370
Refs: nodejs#1057
Refs: https://chromium-review.googlesource.com/c/492046/
Refs: nodejs#569
gibfahn added a commit to gibfahn/node-gyp that referenced this pull request Mar 15, 2018
As node-gyp rebuild doesn't seem to need xcodebuild, we don't need to be
printing the error every time GYP is run.

PR-URL: nodejs#1370
Fixes: nodejs#569
Refs: nodejs#1057
Refs: https://chromium-review.googlesource.com/c/492046/
@gibfahn
Copy link
Member

gibfahn commented Jun 29, 2018

#1370 was merged.

@gibfahn gibfahn closed this Jun 29, 2018
@lebed2045
Copy link

I'm not sure why it closed, because of node-gyp still needs damn xcode which I can't install because I never have enough space. I assume I'm not alone here with the same problem.
Example, try to run npm install web3 which uses node-gyp.
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

@gibfahn
Copy link
Member

gibfahn commented Jul 17, 2018

node-gyp still needs damn xcode which I can't install because I never have enough space. I assume I'm not alone here with the same problem.

No it doesn't, that is just a warning which will not affect your build.

I'm not sure why it closed,

Did you look at #1370 ? The title is gyp: don't print xcodebuild not found errors. Once you update to a version of npm that has a version of node-gyp that has that commit then the warning will go away.

@jrock2004
Copy link

@gibfahn I am guessing the issue is that most people are using plugins that use node-gyp and do not have that control. For example, I just upgraded to Node 11.5 and trying to install node-sass and getting this error.

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

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

Traceback (most recent call last):
  File "/Users/jcostanzo/Development/embermap-cms/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module>
    sys.exit(gyp.script_main())
  File "/Users/jcostanzo/Development/embermap-cms/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 545, in script_main
    return main(sys.argv[1:])
  File "/Users/jcostanzo/Development/embermap-cms/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 538, in main
    return gyp_main(args)
  File "/Users/jcostanzo/Development/embermap-cms/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 523, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "/Users/jcostanzo/Development/embermap-cms/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 2170, in GenerateOutput
    part_of_all=qualified_target in needed_targets)
  File "/Users/jcostanzo/Development/embermap-cms/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 795, in Write
    self.Pchify))
  File "/Users/jcostanzo/Development/embermap-cms/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 1190, in WriteSources
    cflags = self.xcode_settings.GetCflags(configname)
  File "/Users/jcostanzo/Development/embermap-cms/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 551, in GetCflags
    archs = self.GetActiveArchs(self.configname)
  File "/Users/jcostanzo/Development/embermap-cms/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 420, in GetActiveArchs
    xcode_archs_default = GetXcodeArchsDefault()
  File "/Users/jcostanzo/Development/embermap-cms/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 118, in GetXcodeArchsDefault
    xcode_version, _ = XcodeVersion()
  File "/Users/jcostanzo/Development/embermap-cms/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py", line 1265, in XcodeVersion
    version = re.match(r'(\d\.\d\.?\d*)', version).groups()[0]
AttributeError: 'NoneType' object has no attribute 'groups'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/jcostanzo/Development/embermap-cms/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/Cellar/node/11.5.0/bin/node" "/Users/jcostanzo/Development/embermap-cms/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/jcostanzo/Development/embermap-cms/node_modules/node-sass
gyp ERR! node -v v11.5.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok```

@l02162010
Copy link

@jrock2004 I have same problem

@mkochco
Copy link

mkochco commented Feb 23, 2019

@jrock2004 - ran into the same problem on Node.js release lines 8 (8.15.1) and 10 (10.0.0). Release line 6 (6.9.5) worked fine. Resolution on 8 and 10 required that Xcode be fully installed and that sudo xcode-select --reset had been run.

@DorelBesliu
Copy link

Thank you @mkochco

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.

10 participants