[LLVMdev] Bugs in Kaleidoscope tutorial code, and a bus error
sabre at nondot.org
Tue Apr 15 13:10:37 CDT 2008
On Tue, 15 Apr 2008, Lane Schwartz wrote:
> I'm working through the Kaleidoscope tutorial through section 2.4, and
> I've encountered some problems: several minor bugs, and finally a bus
> error that has me stumped:
Please make the suggested changes to your local tree and send me a patch
for the tutorial, thanks!
> In the code listed in LLVM Tutorial section 2.2 Implementing a Parser and AST.
> Line 19 has a comma at the end of line that shouldn't be there
> Line 120 is missing a closing angle bracket.
> Line 120 should be std::vector<std::string> Args;
> Line 319 should be PrototypeAST *Proto = new PrototypeAST("",
> Likewise, in the code for LLVM Tutorial section 2.3 Code Generation to LLVM IR,
> Line 27 has a comma at the end of line that shouldn't be there
> Likewise, in the code for LLVM Tutorial section 2.4 Adding JIT and
> Optimizer Support,
> Line 29 has a comma at the end of line that shouldn't be there
> I get several link errors when compiling the code for section 2.4.
> These errors go away if I make the following change to the relevant
> Makefile (tools/sample/Makefile):
> old: LINK_COMPONENTS = core
> new LINK_COMPONENTS = core scalaropts ExecutionEngine
> After successfully compiling the code in section 2.4 Adding JIT and
> Optimizer Support, I attempted to run that code:
> $ ./Release/bin/Sample
> ready> 4 + 5;
> Bus error
> I was able to successfully run the program using the code in section
> 2.2, and also the code in section 2.3 of the tutorial.
> I successfully worked my way through the other problems listed above,
> but this one has me stumped. I'd really like to see the JIT in action.
> Any thoughts or advice on how to proceed, or what might be causing
> this error? I'm running on Mac OS X 10.5 on 32 bit PPC. I compiled
> LLVM 2.2, but did not compile the gcc frontends.
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the LLVMdev