[LLVMdev] ExecutionEngine::create returns 0

Eric Christopher echristo at apple.com
Tue Sep 28 08:59:21 PDT 2010


On Sep 28, 2010, at 1:53 AM, Subramanyam P.U.R. wrote:

> I am using Fedora 10 and I installed LLVM2.6 from binaries. I use gcc front-end(not Clang). Do I need to install something else, to be able to add JIT support?
> 

I don't know, I don't package it.

> I am able to compile HowToUseJIT example. The compilation command is
> g++ -g -rdynamic toy.cpp `llvm-config --cppflags --ldflags --libs core jit native` -O3 -o toy
> 
> But I am getting segmentation fault because of the NULL returned by ExecutionEngine::create(Module*) method.
> 

Not surprising since you're dereferencing a NULL pointer.

> Here is the error I get when I run HowToUseJIT example
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x080b02f6 in llvm::ExecutionEngine::getTargetData () at /home/subbu/llvm/install/include/llvm/ExecutionEngine/ExecutionEngine.h:167
> 167	  const TargetData *getTargetData() const { return TD; }
> 

Is that using 2.6 or something newer? My guess is that, of course, you don't have a target data.  You'll need to debug why you can't seem to create one for your host.  That said, if you can't get it to work with the 2.8 branch let me know.

-eric



More information about the llvm-dev mailing list