Closed GoogleCodeExporter closed 9 years ago
I can confirm this, I get exactly the same error...
The bugtracker seems pretty dead though
Original comment by 237...@gmail.com
on 1 Jan 2011 at 12:35
It seems that the embed LLVM bitcode containing the main loop for standalone
applications is generated at compile time with the bin2c util (included in
llvm-lua) into liblua_main_bc.h. The magic number of LLVM IR bitcode is 'BC'
(0xC0DE) and liblua_main_bc.h does not contain a valid bitcode signature
(lua_vm_ops_bc.h has a valid signature and contains 0xC0DE).
Looking in the build dir I found liblua_main.bc and liblua_main.bc.bc. The
first one contains a shell script and the other is the correct file with LLVM
IR bitcode. liblua_main_bc.h is the dump from the shell script and that's the
reason why we get the 'Invalid bitcode signature' error.
This seems to be an error in the CMake file configuration that generates
incorrect files for LLVM bitcode.
Kind regards,
Christophe
Original comment by christop...@gmail.com
on 9 Jan 2011 at 3:00
Thanks for debugging this. The problem is with llvm-ld which was the default
command tool used by llvm-lua's CMake files to link multiple LLVM bitcodes into
one bitcode.
You can change the LLVM_LD variable with this command:
cmake . -D LLVM_LD=llvm-link
I have changed the default value for that variable and commited the change.
Original comment by rjakabo...@gmail.com
on 9 Jan 2011 at 3:30
sorry that command should be:
cmake -DLLVM_LD=llvm-link .
Original comment by rjakabo...@gmail.com
on 9 Jan 2011 at 3:33
Original issue reported on code.google.com by
christop...@gmail.com
on 16 Dec 2010 at 4:38