[llvm-dev] About Error: Interpreter has not been linked in

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] About Error: Interpreter has not been linked in

Adam Nemet via llvm-dev
Hello,

When I try to create execution engine I do get "Interpreter has not been linked in." error and EngineBuilder returns NULL.

Here is the line I use to create execution engine:

auto executionEngine = llvm::EngineBuilder(std::move(m_module)).setErrorStr(&error).create();

Here are all headers I have included:

#include "llvm/ADT/STLExtras.h"
#include "llvm/ExecutionEngine/ExecutionEngine.h"
#include "llvm/ExecutionEngine/GenericValue.h"
#include "llvm/IR/Argument.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/raw_ostream.h"


And here is the simple IR code that I'm trying to JIT compile and execute in memory:

; ModuleID = 'Program'
source_filename = "Program"

define i32 @fib(i32) {
entry:
  %i = alloca i32
  store i32 %0, i32* %i
  ret i32* %i
}


Could someone please tell the reason and how I can resolve this?

Thanks for helping!

Best,

Aaron


_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] About Error: Interpreter has not been linked in

Adam Nemet via llvm-dev
Ok. I figured out. Following methods needs to be called. That fixed the issue.

llvm::InitializeNativeTarget();
LLVMInitializeNativeAsmPrinter();
LLVMInitializeNativeAsmParser();
LLVMLinkInMCJIT();

Aaron


On Thu, May 10, 2018 at 8:33 PM, Aaron <[hidden email]> wrote:
Hello,

When I try to create execution engine I do get "Interpreter has not been linked in." error and EngineBuilder returns NULL.

Here is the line I use to create execution engine:

auto executionEngine = llvm::EngineBuilder(std::move(m_module)).setErrorStr(&error).create();

Here are all headers I have included:

#include "llvm/ADT/STLExtras.h"
#include "llvm/ExecutionEngine/ExecutionEngine.h"
#include "llvm/ExecutionEngine/GenericValue.h"
#include "llvm/IR/Argument.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/raw_ostream.h"


And here is the simple IR code that I'm trying to JIT compile and execute in memory:

; ModuleID = 'Program'
source_filename = "Program"

define i32 @fib(i32) {
entry:
  %i = alloca i32
  store i32 %0, i32* %i
  ret i32* %i
}


Could someone please tell the reason and how I can resolve this?

Thanks for helping!

Best,

Aaron



_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] About Error: Interpreter has not been linked in

Adam Nemet via llvm-dev
I believe the correct way is actually include the Interpreter’s header and the rest is handled automatically. Should be similar for MCJIT

Zhang

On 11 May 2018, at 05:21, Aaron via llvm-dev <[hidden email]> wrote:

Ok. I figured out. Following methods needs to be called. That fixed the issue.

llvm::InitializeNativeTarget();
LLVMInitializeNativeAsmPrinter();
LLVMInitializeNativeAsmParser();
LLVMLinkInMCJIT();

Aaron


On Thu, May 10, 2018 at 8:33 PM, Aaron <[hidden email]> wrote:
Hello,

When I try to create execution engine I do get "Interpreter has not been linked in." error and EngineBuilder returns NULL.

Here is the line I use to create execution engine:

auto executionEngine = llvm::EngineBuilder(std::move(m_module)).setErrorStr(&error).create();

Here are all headers I have included:

#include "llvm/ADT/STLExtras.h"
#include "llvm/ExecutionEngine/ExecutionEngine.h"
#include "llvm/ExecutionEngine/GenericValue.h"
#include "llvm/IR/Argument.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/raw_ostream.h"


And here is the simple IR code that I'm trying to JIT compile and execute in memory:

; ModuleID = 'Program'
source_filename = "Program"

define i32 @fib(i32) {
entry:
  %i = alloca i32
  store i32 %0, i32* %i
  ret i32* %i
}


Could someone please tell the reason and how I can resolve this?

Thanks for helping!

Best,

Aaron


_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] About Error: Interpreter has not been linked in

Adam Nemet via llvm-dev
Which header should be included specifically? I would like to know if there is a better/proper way to fix it.

Aaron


On Thu, May 10, 2018 at 10:31 PM, mayuyu.io <[hidden email]> wrote:
I believe the correct way is actually include the Interpreter’s header and the rest is handled automatically. Should be similar for MCJIT

Zhang

On 11 May 2018, at 05:21, Aaron via llvm-dev <[hidden email]> wrote:

Ok. I figured out. Following methods needs to be called. That fixed the issue.

llvm::InitializeNativeTarget();
LLVMInitializeNativeAsmPrinter();
LLVMInitializeNativeAsmParser();
LLVMLinkInMCJIT();

Aaron


On Thu, May 10, 2018 at 8:33 PM, Aaron <[hidden email]> wrote:
Hello,

When I try to create execution engine I do get "Interpreter has not been linked in." error and EngineBuilder returns NULL.

Here is the line I use to create execution engine:

auto executionEngine = llvm::EngineBuilder(std::move(m_module)).setErrorStr(&error).create();

Here are all headers I have included:

#include "llvm/ADT/STLExtras.h"
#include "llvm/ExecutionEngine/ExecutionEngine.h"
#include "llvm/ExecutionEngine/GenericValue.h"
#include "llvm/IR/Argument.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/raw_ostream.h"


And here is the simple IR code that I'm trying to JIT compile and execute in memory:

; ModuleID = 'Program'
source_filename = "Program"

define i32 @fib(i32) {
entry:
  %i = alloca i32
  store i32 %0, i32* %i
  ret i32* %i
}


Could someone please tell the reason and how I can resolve this?

Thanks for helping!

Best,

Aaron


_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev