OS X: ./configure fails with latest Command Line Tools installed (instead of Xcode) #3681
Comments
Well it looks like
That is: $ xcode-select -switch /Applications/Xcode.app |
Except, with the Command Line Tools installed, I don't have /Applications/Xcode.app This worked fine on 0.8.1 with only the Command Line Tools installed. Why does gyp insist on having full-blown Xcode now? |
Hhmm, could have something to do with the latest gyp upgrade. @bnoordhuis Any ideas? |
@evocateur If the command line tools package installs its files into $ sudo xcode-select -switch /Developer |
Since Xcode 4.3, The Command Line Tools package basically extracts the headers and other utilities directly into their standard locations. |
Well perhaps just |
According to Homebrew/legacy-homebrew#10245 , this causes issues with homebrew (which has it's own issues with CLT, per Homebrew/legacy-homebrew#10510). At this point, I'll just sacrifice the disk space and stop whining. You might want to put some sort of note in the wiki or something about requiring full Xcode, though. Thanks for the attentive response, @TooTallNate |
Just ran into this as well (compiling directly from source, only Xcode Command Line Tools installed). |
This should probably be re-opened and dealt with. Using |
It's not for us to fix, it's a gyp bug (if it is a bug). |
Fair enough. Since the build stopped working in 0.8.2, which version of GYP was used in 0.8.1 and which version was shipped in 0.8.2? I didn't see anything related to GYP versions in the ChangeLog. |
r1214 with one out-of-tree patch that fixed a 'argument list too long' error (since fixed upstream). 0.8.2 ships with r1426. r1237 (bnoordhuis/gyp@3019d85) is the revision that started using xcode-select. |
Awesome. Thanks for the info. |
Also, I would classify this as a bug since Node will build fine under the CLT even if
|
Does this patch help? diff --git a/tools/gyp_node b/tools/gyp_node
index 5c4882f..02a8c2d 100755
--- a/tools/gyp_node
+++ b/tools/gyp_node
@@ -45,6 +45,8 @@ if __name__ == '__main__':
# There's a bug with windows which doesn't allow this feature.
if sys.platform != 'win32':
+ # Force Makefile output. See #3681.
+ args.extend(['-f', 'make'])
# Tell gyp to write the Makefiles into output_dir
args.extend(['--generator-output', output_dir]) |
Unfortunately, that patch didn't help. According to the previously posted traceback, the root of the problem is in the The ultimate issue is that the Command Line Tools don't include multiple SDKs so the whole operation of figuring out what the SDK root is should be skipped if XCode.app is not installed. But, this work probably needs to be punted upstream to GYP. |
@Sharpie Nice detective work. This is definitely a gyp bug, and it sounds like you're on the right track to writing a patch to fix it. Has anyone created an upstream issue to the gyp issue tracker yet? |
I'm slowly working my way towards getting an issue open but I'm not a heavy Node user so I really don't have a dog in the fight to motivate me other than being tired of resolving the same issue over and over on the Homebrew tracker. If someone who knows GYP well gets around to writing a patch before I muster the spare time to do so, here is the code we use to detect XCode.app in Homebrew. Basically, we flag a full XCode installation as being present if:
|
Allright, logged on the gyp tracker as issue 292. |
I was trying to install nodejs using nvm and got the same errors listed at the top of this thread. I could install node by changing the access rights for After I did
I checked out the permission for os x 10.8.1, xcode 4.4.1, CLT installed |
Also just hit this with node v0.10.16 when setting up a new machine. It looks like the gyp issue has been fixed upstream: http://code.google.com/p/gyp/issues/detail?id=292#makechanges. Does this mean that the blocker is now node or node-gyp pulling in a new gyp version? |
Realizing now that the patch I found above has not actually been accepted yet and even so upgrading the gyp version to trunk breaks node-gyp since the After trying For the benefit of others like me that might be stuck tethering (and therefore with no ability to download xcode to work around this) I was able to get node-gyp working like: # find your node-gyp directory
cd ~/.nvm/v0.10.16/lib/node_modules/npm/node_modules/node-gyp/gyp/
# download the proposed patch for http://code.google.com/p/gyp/issues/detail?id=292#makechanges
curl -o issue_292.diff https://codereview.chromium.org/download/issue14887003_1_2.diff
patch pylib/gyp/xcode_emulation.py issue_292.diff
`` |
fix finally landed in gyp master https://code.google.com/p/gyp/source/detail?r=1819 thanks to the work of @mistydemeo |
See #6730 |
I was able to compile 0.8.1 successfully, but now I can't even get through ./configure.
I'm using the Command Line Tools for Xcode - June 2012 package available at https://developer.apple.com/downloads/
I installed the latest Xcode (4.3.3) on another machine that was previously using the CLT, and it does compile there. Perhaps this is a gyp issue?
The text was updated successfully, but these errors were encountered: