Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The built llvm-lua.exe on Windows is broken. #19

Open
GoogleCodeExporter opened this issue Jan 15, 2016 · 0 comments
Open

The built llvm-lua.exe on Windows is broken. #19

GoogleCodeExporter opened this issue Jan 15, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
  1. Fresh clean build of llvm from source
  2. Fresh clean build of clang-3.1 from source
  3. Build llvm-lua from trunk using above dependencies
  4. Run the produced "llvm-lua.exe -O0"

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

  Running "llvm-lua.exe -O0" produces the following:

    $ llvm-lua -O0
    Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
    > f = 1
    LLVM ERROR: Program used external function 'luaV_settable' which could not be re
    solved!
    Stack dump:
    0.      Running pass 'X86 Machine Code Emitter' on function '@vm_OP_SETGLOBAL'


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

  Built llvm-lua from latest trunk with CMake under Windows 7 64-bit using Mingw gcc 4.6.3 + MSYS, clang-3.1 as bitcode emitter.

Please provide any additional information below.

It seems like there is something wrong with how llvm-lua's build is setup. 
There are various problems when it tries to piece itself together during build. 
For example, if you try to build it with just lua-dynamic then the linking step 
fails with unresolved symbols to lua functions that should be private to lua's 
internal implementation.

The above error is coming from a llvm-lua.exe linked with lua-static. Again, we 
see here that it cannot resolve yet another internal lua function 
`luaV_settable`.

Furthermore, running the interpreter without the `-O0` switch would outright 
crash when it attempts to evaluate any lua statements:

    $ llvm-lua
    Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio
    > print 'test'
    pseudo instructions should be removed before code emission
    UNREACHABLE executed at g:/OSS/llvm.src3.1/lib/Target/X86/X86CodeEmitter.cpp:736!

    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application's support team for more information.

I'm not sure why this is happening but there seems to be a common theme that 
surrounds all these errors. Namely, all those problems seem to point back to 
x86 machine code emitter in llvm.

I am unfamiliar the llvm framework so I can't really diagnose this problem 
further. If there's any other piece of info you need me to provide please let 
me know.

Original issue reported on code.google.com by [email protected] on 20 Sep 2013 at 8:56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant