Skip to content

Loading…

Unable to install node 0.8.8 #14915

Closed
lra opened this Issue · 14 comments

5 participants

@lra

Hi,

I'm using Mountain Lion (upgraded from Lion) with the CLT.
Trying to install node give me errors.
I had it install with an earlier version, and the upgrade gave me the same error, I tried uninstalling it, same error.

Here are the output:

Traceback (most recent call last):
  File "tools/install.py", line 225, in <module>
    run(sys.argv[:])
  File "tools/install.py", line 220, in run
    if cmd == 'install': return files(install)
  File "tools/install.py", line 195, in files
    action(['out/Release/node'], 'bin/node')
  File "tools/install.py", line 74, in install
    def install(paths, dst): map(lambda path: try_copy(path, dst), paths)
  File "tools/install.py", line 74, in <lambda>
    def install(paths, dst): map(lambda path: try_copy(path, dst), paths)
  File "tools/install.py", line 66, in try_copy
    return shutil.copy2(source_path, target_path)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 127, in copy2
    copyfile(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 81, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'out/Release/node'
make: *** [install] Error 1

And the full output: https://gist.github.com/3714923

@janlimpens

Same here, only the first error encountered is

/usr/include/MacTypes.h:693:63: error: expected function body after function declarator
Debugger(void)                                                __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,  __MAC_10_8, __IPHONE_NA, __IPHONE_NA);
                                                          ^

full output here: https://gist.github.com/3715046

@adamv

Exception: Error 2 running xcode-select

Node requires a full Xcode install and xcode-select to be configured properly.

@janlimpens

Hm. at least in my case this should be there…

@adamv

@janlimpens your compiler set looks out of sync:

Xcode: 4.4.1
CLT: 1.0.0.9000000000.1.1249367152
GCC-4.2: build 5666
LLVM-GCC: build 2335
Clang: 2.1 build 163

Xcode 4.4.1 ahs no gcc 4.2, and clang is at build 421.

@jacknagel

@lra For CLT-only setups, you must sudo xcode-select -switch /usr/bin to install node. See #13337

@lra

Thanks, should we add this to the description of the formula ?

@Sharpie

Thanks, should we add this to the description of the formula ?

Not really, since setting the xcode-select patch on a CLT-only setup is something that brew doctor warns against. What really needs to happen is that the people affected by this bug need to go and make some noise on the GYP issue Jack referenced above so that we can get a proper fix instead of a hack that breaks xcodebuild and other things.

@adamv

It might be worth doing a check in a Requirement to avoid future support calls.

@Sharpie

Or maybe we should just revert bfc71f7 and make Node depend on a full XCode install again until this gets fixed upstream. Because really, there is no good advice here to give users when the Requirement fails. There is a hack that we could suggest---but this sets up additional traps trap that some may stumble into down the road.

And setting the xcode-select path with a CLT-only install is indeed a hack. As I've noted other places, you can point it at a porn folder and Node will suddenly be able to build. There is no XCode at / or /usr/bin or any of the other suggestions, setting the XCode path on a CLT-only setup is just a lie that keeps GYP from wandering down a broken code path.

@adamv

Sure, add the :xcode back, with a comment pointing to the upstream bug maybe.

@Sharpie Sharpie added a commit that closed this issue
@Sharpie Sharpie node: Depend on full XCode install
Reverts commit bfc71f7.

This is necessary due to an upstream bug with the GYP buildsystem that has no
solid workaround:

  http://code.google.com/p/gyp/issues/detail?id=292

Fixes #14915.
eb8b633
@Sharpie Sharpie closed this in eb8b633
@Sharpie

Allright. XCode dependency re-instated.

@Sharpie

Aw snap. I just thought of another possible workaround that will restrict any collateral damage of lying to xcode-select to the node formula. How about we set the DEVELOPER_DIR environment variable during install if the user only has CLT?

ENV['DEVELOPER_DIR'] = MacOS.dev_tools_path unless MacOS.xcode_installed?

Then xcode-select will return a path, but only for the duration of the Node install.

@halloleo halloleo added a commit that referenced this issue
@Sharpie Sharpie node: Depend on full XCode install
Reverts commit bfc71f7.

This is necessary due to an upstream bug with the GYP buildsystem that has no
solid workaround:

  http://code.google.com/p/gyp/issues/detail?id=292

Fixes #14915.
b65673d
@DennisOSRM DennisOSRM pushed a commit that referenced this issue
@Sharpie Sharpie node: Depend on full XCode install
Reverts commit bfc71f7.

This is necessary due to an upstream bug with the GYP buildsystem that has no
solid workaround:

  http://code.google.com/p/gyp/issues/detail?id=292

Fixes #14915.
6ba5311
@snakeyroc3 snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue
@Sharpie Sharpie node: Depend on full XCode install
Reverts commit bfc71f7.

This is necessary due to an upstream bug with the GYP buildsystem that has no
solid workaround:

  http://code.google.com/p/gyp/issues/detail?id=292

Fixes #14915.
201d22b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.