[LLVMdev] Kaleidoscope-tutorial: Fails to create the JIT
Garrison Venn
gvenn.cfe.dev at gmail.com
Sun Jan 24 02:02:31 PST 2010
Change your g++ build to:
g++ -g -O0 toy-example26.cpp -o toy-example26 `/Users/albert/NoTimeMachine/LLCM_Clang/llvm-trunk/BUILD/Debug/bin/llvm-config --cppflags --ldflags --libs core jit interpreter native`
After you get this working, try it with the source interpreter include removed, and minus the above interpreter llvm-config addition.
Garrison
On Jan 23, 2010, at 18:55, ALbert Mietus wrote:
>
> --Groetjes, Albert
>
> ALbert Mietus
> GSM: +316 16 531 258
> Send prive mail to: ALbert at ons-huis dot net
> Don't send spam mail!
> Mijn missie: http://SoftwareBeterMaken.nl product, proces & imago.
> Mijn leven in het kort: http://albert.mietus.nl/Doc/CV_ALbert.html
>
>
> On 23 Jan 2010., at 22:07, Garrison Venn wrote:
>
>> Look at what is in <llvm source root>/examples/Kaleidoscope/toy.cpp.
>> This is the final version of the tutorial and worked the last time I played with 2.6.
>
> Tried, that code ... And got a error (which I not really understand, yet)
> || > g++ -g -O0 toy-example26.cpp -o toy-example26 \
> || `/Users/albert/NoTimeMachine/LLCM_Clang/llvm-trunk/BUILD/Debug/bin/llvm-config --cppflags --ldflags --libs core jit native`
> || Undefined symbols:
> || "_LLVMLinkInInterpreter", referenced from:
> || (anonymous namespace)::ForceInterpreterLinking::ForceInterpreterLinking() in ccXf1BAH.o
> || ld: symbol(s) not found
> || collect2: ld returned 1 exit status
>
> Note, `/Users/albert/NoTimeMachine/LLCM_Clang/llvm-trunk/BUILD/Debug/bin/llvm-config --cppflags --ldflags --libs core jit native` gives
> (formating by me)
> -I/Users/albert/NoTimeMachine/LLCM_Clang/BUILD-llvm-2.6+clang/../llvm-2.6/include \
> -I/Users/albert/NoTimeMachine/LLCM_Clang/BUILD-llvm-2.6+clang/include
> -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS \
> \
> -L/Users/albert/NoTimeMachine/LLCM_Clang/llvm-trunk/BUILD/Debug/lib -lpthread -lffi -lm \
> -lLLVMX86Disassembler \
> -lLLVMX86AsmParser \
> -lLLVMMCParser \
> -lLLVMX86AsmPrinter \
> -lLLVMX86CodeGen \
> -lLLVMSelectionDAG \
> -lLLVMAsmPrinter \
> -lLLVMX86Info \
> -lLLVMJIT \
> -lLLVMExecutionEngine \
> -lLLVMCodeGen \
> -lLLVMScalarOpts \
> -lLLVMInstCombine \
> -lLLVMTransformUtils \
> -lLLVMipa \
> -lLLVMAnalysis \
> -lLLVMTarget \
> -lLLVMMC \
> -lLLVMCore \
> -lLLVMSupport \
> -lLLVMSystem \
> #eol
>
> Trying to build with other version/Build (PreBuild one, Debug-version, or trunk) give same error and simular values for llvm-config output (same, but for the path)
>
> Any Idea? --THANKS
>
>>
>> Garrison
>>
>> On Jan 23, 2010, at 12:21, ALbert Mietus wrote:
>>
>>> I ask for advice, for TheExecutionEngine === NULL,
>>>
>>>>> Which result's in a null-pointer for "TheExecutionEngine"; which
>>>>> explains the bus-errror ..
>>>
>>> Reid Kleckner wrote:
>>>> Try changing the above line to:
>>>> std::string str;
>>>> TheExecutionEngine =
>>>> EngineBuilder(OurModuleProvider).setErrorStr(str).create();
>>>> cout << str << '\n';
>>>>
>>>> This interface should set str to an appropriate error message if it
>>>> returns NULL.
>>>
>>> I tried this, assuming that line should be
>>> || TheExecutionEngine =
>>> EngineBuilder(TheModule).setErrorStr(&str).create();
>>> ---------------------------------------------------------
>>> ^^^^^^^^^^------------------^----------------
>>> * There is on "OurModuleProvider, g++ says .., and
>>> * g++ complains about the str-type
>>> (Well, g++ actually complain about the function; but I assume this
>>> is what is means, ...
>>> At least adding the & help to compile it:-)
>>>
>>> The result: nada. No string is printed! (or an empty string, I should
>>> say)
>>>
>>> So more help is welcome.! Can somebody just try the code on his/her
>>> machine; maybe the tutorial is "to old"
>>> The code is, as you probably know, at: http://llvm.org/releases/2.6/docs/tutorial/LangImpl4.html#code
>>> When it is working on your system, please email me, including that
>>> version (or svn- tag/date) And I will try the same version
>>>
>>> Thanks
>>>
>>> --Groetjes, Albert
>>>
>>> ALbert Mietus
>>> GSM: +316 16 531 258
>>> Send prive mail to: ALbert at ons-huis dot net
>>> Don't send spam mail!
>>> Mijn missie: http://SoftwareBeterMaken.nl product, proces & imago.
>>> Mijn leven in het kort: http://albert.mietus.nl/Doc/CV_ALbert.html
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
More information about the llvm-dev
mailing list