node-llvm icon indicating copy to clipboard operation
node-llvm copied to clipboard

build err under Mac

Open JacksonTian opened this issue 12 years ago • 1 comments

../src/node-llvm.h:12:10: fatal error: 'llvm/LLVMContext.h' file not found
#include "llvm/LLVMContext.h"

JacksonTian avatar Dec 18 '13 08:12 JacksonTian

This is because llvm moved some include files around, i.e. llvm/LLVMContext.h -> llvm/IR/LLVMContext.h (like 1 year ago).

Sad thing is, looks like node-llvm development has stopped (as the time of writing this, 8 months without action).

You can go to src/node-llvm.h and update it this way:

diff --git a/src/node-llvm.h b/src/node-llvm.h index afd016a..2841c30 100644 --- a/src/node-llvm.h +++ b/src/node-llvm.h @@ -9,11 +9,11 @@ using namespace node; using namespace v8;

-#include "llvm/LLVMContext.h" -#include "llvm/Module.h" -#include "llvm/IRBuilder.h" -#include "llvm/BasicBlock.h" -#include "llvm/Function.h" +#include "llvm/IR/LLVMContext.h" +#include "llvm/IR/Module.h" +#include "llvm/IR/IRBuilder.h" +#include "llvm/IR/BasicBlock.h" +#include "llvm/IR/Function.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/PassManager.h" #include "llvm/Support/raw_ostream.h"

(I'd make a pull request myself, but forking and then doing the remaining foo for a simple patch like this is not worth it IHMO ;) )

carlosalberto avatar Dec 28 '13 00:12 carlosalberto