weimingtom / llvm-lua

Automatically exported from code.google.com/p/llvm-lua
Other
0 stars 0 forks source link

llvm-lua 1.3.0 fails to compile to native machine code #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. lua-compiler hello.lua

What is the expected output? What do you see instead?

$ lua-compiler hello.lua 
/usr/bin/lua-compiler: line 5: realpath: command not found
dirname: missing operand
Try `dirname --help' for more information.
/usr/bin/llvm-luac -O3 -s -bc -o hello.bc hello.lua
Two passes with the same argument (-preverify) attempted to be registered!
UNREACHABLE executed!
/usr/bin/lua-compiler: line 40: 28376 Aborted                 $CMD "$@"
llvm-luac: failed to compile Lua code into LLVM bitcode.

What version of the product are you using? On what operating system?

LLVM-lua 1.3.0, LLVM 2.8, Slackware 13.1

Original issue reported on code.google.com by cjsthomp...@gmail.com on 26 Oct 2010 at 12:21

GoogleCodeExporter commented 9 years ago
You need to install the 'realpath' command.

Original comment by rjakabo...@gmail.com on 26 Oct 2010 at 12:34

GoogleCodeExporter commented 9 years ago
/usr/bin/llvm-luac -O3 -s -bc -o hello.bc hello.lua
Two passes with the same argument (-preverify) attempted to be registered!
UNREACHABLE executed!

What about that ?

Original comment by cjsthomp...@gmail.com on 26 Oct 2010 at 7:41

GoogleCodeExporter commented 9 years ago
I don't know why you would be getting that message and I can't reproduce that 
error.  The only thing I can think of is that something is wrong with how LLVM 
& llvm-lua are linked together, or there is a bad/broken pass compiled into 
LLVM.  Try running clang to see if it has the same error.

Original comment by rjakabo...@gmail.com on 1 Nov 2010 at 4:46

GoogleCodeExporter commented 9 years ago
clang works fine, been compiling stuff with it without any problems. This 
problem didn't occur with LLVM 2.7 and llvm-lua 1.2.0.

Original comment by cjsthomp...@gmail.com on 1 Nov 2010 at 11:53

GoogleCodeExporter commented 9 years ago
Please attach the output from:
cmake .
and from:
make clean ; make VERBOSE=1

Based on the description of this LLVM bug:
http://llvm.org/bugs/show_bug.cgi?id=6801
it seems that a pass is link into twice.

Original comment by rjakabo...@gmail.com on 2 Nov 2010 at 11:04

GoogleCodeExporter commented 9 years ago
Hi,

Sorry for the delay. Here are the logs of the output.

Original comment by cjsthomp...@gmail.com on 3 Nov 2010 at 12:04

Attachments:

GoogleCodeExporter commented 9 years ago
It looks like you have LLVM 2.8rc (release candicate installed) and not the 
offical 2.8 release.

But the real problem is that llvm-luac is being statically & dynamically linked 
to LLVM.
llvm-luac shouldn't be dynamically linked to:
/usr/lib/libLLVM-2.8rc.so

The last line of the cmake.log shows that .so file.  CMake gets that info from 
this command:
llvm-config --libs all

If you run that command you should see the .so file at the end.  It is wrong 
for llvm-config to be returning those static & dynamic libs together.

Attached is the output I get from that command.

Original comment by rjakabo...@gmail.com on 3 Nov 2010 at 12:44

Attachments: