The interpreter uses libffi to make external function calls. However, it
needs to be detected at LLVM's compile time. If you're using the
released packages, we disabled that because we were worried about users
who don't have libffi installed.
In short, install libffi and rebuild LLVM.
Nick
> _______________________________________________
> LLVM Developers mailing list
> LLV...@cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
_______________________________________________
LLVM Developers mailing list
LLV...@cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
This seems to be quite a common problem (I too hit it once, thought it
was a bug and reported it at
http://llvm.org/bugs/show_bug.cgi?id=5466) how about making lli inform
the user that LLVM was built without FFI support?
Thanks for the reminder. I recall looking at the patch but I didn't
apply it at the time because I couldn't figure out why the code above it
used errs() in one case and llvm_report_error in another.
Nick
Only because the optimizer saw sin(constant) and folded it away. The
entire program became 'print constant string'. There is certainly a bug
calling sinf() from the interpreter but I don't know what it is yet.
> The pthread problem remains after llvm-ld:
>
> $ lli -force-interpreter=true -load=/lib/libpthread.so.0 phello.llvm.bc
> 0 lli 0x08796bf8
> Segmentation fault
I don't expect this to work at all. Unlike the JIT, I don't know of any
work having been done to make the interpreter thread-safe.
By the way, the interpreter can't support many more things, such as
qsort() or any method which expects to call a function pointer. Is there
a reason you need to use the interpreter? It's been largely
undermaintained because it's pretty much useless when you've got a
working JIT.
Nick
> Nick Lewycky<nich...@mxc.ca <mailto:nich...@mxc.ca>> writes:
>
> The interpreter uses libffi to make external function
> calls. However, it
> needs to be detected at LLVM's compile time. If you're
> using the
> released packages, we disabled that because we were
> worried about users
> who don't have libffi installed.
>
>
> This seems to be quite a common problem (I too hit it once,
> thought it
> was a bug and reported it at
> http://llvm.org/bugs/show_bug.cgi?id=5466) how about making
> lli inform
> the user that LLVM was built without FFI support?
>
>
> Thanks for the reminder. I recall looking at the patch but I
> didn't apply it at the time because I couldn't figure out why
> the code above it used errs() in one case and llvm_report_error
> in another.
>
> Nick
>
>
>
_______________________________________________
Fixed in r89198.
What was the reason? (I think I too wondered that.)
Nick