Failed to install llvm-node on macOS Sierra
pyrocat101 opened this issue · comments
OS version: macOS 10.12.4
LLVM version: Homebrew installed LLVM 4.0.0_1
Below is the error message when npm install llvm-node
:
> llvm-node@1.0.5 install /Users/linjie/Desktop/t/node_modules/llvm-node
> node-gyp rebuild
CXX(target) Release/obj.target/llvm/src/llvm-node.o
CXX(target) Release/obj.target/llvm/src/bitcode/bitcode.o
CXX(target) Release/obj.target/llvm/src/bitcode/bitcode-writer.o
CXX(target) Release/obj.target/llvm/src/ir/ir.o
CXX(target) Release/obj.target/llvm/src/ir/attribute.o
CXX(target) Release/obj.target/llvm/src/ir/alloca-inst.o
CXX(target) Release/obj.target/llvm/src/ir/array-type.o
CXX(target) Release/obj.target/llvm/src/ir/argument.o
../src/ir/argument.cc:69:26: error: no matching constructor for initialization of 'llvm::Argument'
auto* argument = new llvm::Argument { type, name, function, argNo };
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/llvm/4.0.0_1/include/llvm/IR/Argument.h:46:12: note: candidate constructor not viable: requires at most 3 arguments, but 4 were provided
explicit Argument(Type *Ty, const Twine &Name = "", Function *F = nullptr);
^
/usr/local/Cellar/llvm/4.0.0_1/include/llvm/IR/Argument.h:34:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 4 were
provided
class Argument : public Value, public ilist_node<Argument> {
^
../src/ir/argument.cc:120:15: error: no member named 'addAttrs' in 'llvm::Argument'
argument->addAttrs(builder);
~~~~~~~~ ^
2 errors generated.
make: *** [Release/obj.target/llvm/src/ir/argument.o] Error 1
I think I know what the issue is. What clang version are you using for compiling?
Should be fixed with v 1.0.6
The build is currently in progress. Can you please retest if the install command now succeeds?
Thanks! Indeed it is fixed in 1.0.6. The clang I am using:
$ clang --version
clang version 4.0.0 (tags/RELEASE_400/final)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
But here is the CXX:
$ `which c++` --version
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin