llnode
llnode copied to clipboard
npm install of llnode failing on macOS High Sierra
Not sure what's going on here (I might be doing something wrong).
▶▶▶ nvm i 6 /usr/local/Cellar/llnode/1.6.2 5s
v6.12.0 is already installed.
Now using node v6.12.0 (npm v3.10.10)
▶▶▶ npm -v /usr/local/Cellar/llnode/1.6.2 2s
3.10.10
▶▶▶ npm i -g llnode /usr/local/Cellar/llnode/1.6.2
> [email protected] preinstall /Users/gib/.local/share/nvm/versions/node/v6.12.0/lib/node_modules/.staging/llnode-dbbe1d1a
> node scripts/configure.js
Build dir is: /Users/gib/.local/share/nvm/versions/node/v6.12.0/lib/node_modules/.staging/llnode-dbbe1d1a
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Unable to locate lldb binary. llnode installation failed.
npm ERR! Darwin 17.2.0
npm ERR! argv "/Users/gib/.local/share/nvm/versions/node/v6.12.0/bin/node" "/Users/gib/.local/share/nvm/versions/node/v6.12.0/bin/npm" "i" "-g" "llnode"
npm ERR! node v6.12.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] preinstall: `node scripts/configure.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall script 'node scripts/configure.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the llnode package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/configure.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs llnode
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls llnode
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/Cellar/llnode/1.6.2/npm-debug.log
▶▶▶ which lldb /usr/local/Cellar/llnode/1.6.2 1s
/usr/bin/lldb
▶▶▶ lldb --version /usr/local/Cellar/llnode/1.6.2
lldb-900.0.50.1
Swift-4.0
Can you run xcodebuild -version and see what comes out of it?
▶▶ xcodebuild -version ~/wrk/com/node (f76ce0a756)
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
I have both command line tools and full xcode installed (I think), but I've xcode-selected the Command Line Tools as my main one.
I am not a Xcode guru, although from this SO question
Maybe run this?
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
# or to a path that belongs to your actual Xcode
▶▶▶ xcode-select -p ~/wrk/com/node (f76ce0a756)
/Library/Developer/CommandLineTools
Does llnode require the full version of Xcode? I was hoping to just use the command line tools.
I currently have full xcode installed but I have built llnode in the past using just command line tools.
Then I'm back to being confused about how llnode is "unable to locate lldb binary" if there's one in the path.
Now that you mention it... it's quite possible I had a local build of lldb on the path.
@gibfahn The configure script tries to get the svn version of lldb according to xcodebuild -version, so if xcodebuild -version does not return something for it to parse, then it would fail, I think it's actually trying to say "unable to get the lldb version", because your lldb is separate from xcodebuild.
The script cannot figure out the svn version of lldb by looking at lldb --version because on darwin the build number is a bit different (I am not sure how the correspondence work either..for example the lldb-5.0 on my machine displays lldb-360.99.0. Also the correspondence between xcodebuild -version and the lldb version seems a bit fragile to me, the configure script only guess up to xcodebuild 8.3 -> lldb 3.9).
To work around that you can either somehow make xcodebuild returns a version or get an llvm-config on your path..or open a PR if you can figure out the relationship between these build numbers?
I had a chat with @hhellyer about this, and we came to the conclusion that:
If you have lldb installed, but not xcodebuild or llvm-config, then you're probably using the latest version of the Xcode Command Line Tools (table here), in which case downloading the latest headers seems like a reasonable default.
I'll raise a PR.
@gibfahn Another possible way to get the version is..uh...just let the user specify that via command line flags(we already support custom lldb executable on non-darwin via --lldb_exe i.e. process.env.npm_config_lldb_exe). We can always fallback to a reasonable default if everything fails.
i solved this by setting the following
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Now i can build again. and xcode-select -v is also working again