Hello, I'm trying to compile sqlite3 using llvm-gcc, then run it with lli. I've attached a Makefile and a main.c that simply invokes sqlite3_initialize(). You'll need to download sqlite3 (it was too big to attach) and copy main.c and the Makefile into the directory where sqlite3.c is [Link: sqlite-amalgamation-3_7_0_1.zip <http://www.sqlite.org/sqlite-amalgamation-3_7_0_1.zip> ]. The Makefile compiles sqlite3 with flags disabling pthreads and libdl. 1) make This builds sqlite3 with llvm-gcc but does not emit llvm bitcode. It should create executable `test.gcc' which should terminate normally. 2) make LLVM=1 This builds with the exact same flags as above, but with -emit-llvm added. It should create executable `test.llvm' which is a just a script that invokes `lli' on `test.llvm.bc'. This crashes lli (for me). In an effort to debug this, I've built llvm-2.6 with -disable-optimized and -ggdb against the llvm-gcc frontend because I thought that would give me a stacktrace when running lli under gdb, but no such luck. I tried running `lli -jit-emit-debug' but lli says it doesn't support that flag. Does anyone know why the jit crashes? If not, what's the next step? Thanks. -Denis -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100810/71d51e3f/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: Makefile Type: application/octet-stream Size: 660 bytes Desc: Makefile URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100810/71d51e3f/attachment.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: main.c Type: application/octet-stream Size: 99 bytes Desc: main.c URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100810/71d51e3f/attachment-0001.obj>
On Tue, 10 Aug 2010 13:42:05 -0600 "Bueno, Denis" <denbuen at sandia.gov> wrote:> Hello, > http://www.opendylan.org/~housel/bcdump.pl > I'm trying to compile sqlite3 using llvm-gcc, then run it with lli.sqlite3 is part of LLVM testsuite, so it shouldn't crash ...> This builds with the exact same flags as above, but with -emit-llvm > added. It should create executable `test.llvm' which is a just a > script that invokes `lli' on `test.llvm.bc'. This crashes lli (for > me).Can you provide a stacktrace?> > In an effort to debug this, I've built llvm-2.6 with > -disable-optimized and -ggdb against the llvm-gcc frontend because IDid you try llvm-2.7? Best regards, --Edwin
I'm trying to get a stacktrace, so I can't provide one. I'm trying llvm 2.7 right now. I'm hoping there's a 2.6 workaround, though. On 8/10/10 2:01 PM, "Török Edwin" <edwintorok at gmail.com> wrote: On Tue, 10 Aug 2010 13:42:05 -0600 "Bueno, Denis" <denbuen at sandia.gov> wrote:> Hello, > http://www.opendylan.org/~housel/bcdump.pl > I'm trying to compile sqlite3 using llvm-gcc, then run it with lli.sqlite3 is part of LLVM testsuite, so it shouldn't crash ...> This builds with the exact same flags as above, but with -emit-llvm > added. It should create executable `test.llvm' which is a just a > script that invokes `lli' on `test.llvm.bc'. This crashes lli (for > me).Can you provide a stacktrace?> > In an effort to debug this, I've built llvm-2.6 with > -disable-optimized and -ggdb against the llvm-gcc frontend because IDid you try llvm-2.7? Best regards, --Edwin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100810/b642bd79/attachment.html>