Christian S. Perone
2009-Nov-19 12:51 UTC
[LLVMdev] llvm-c: LLVMCreateExecutionEngine returning empty error message
Hello, I'm using the llvm-c bindings for C, but I'm getting some problems, the LLVMCreateExecutionEngine is returning 1 but the error message is an empty string (it's !=NULL). The steps I'm doing is to create the module, then I call LLVMVerifyModule to verify and it works fine, later I call LLVMCreateModuleProviderForExistingModule and it returns !=NULL MP, so it's ok, but then when I call something like this: error_ret LLVMCreateJITCompiler(&engine, provider, 0, &verror) It returns 1 in error_ret and an empty string in verror, does someone knows why or how can I get the error message ? Or when it returns an empty error message ? I'm using the pre built 2.6 binaries from default ubuntu karmic installation. Thank you, - Christian -- Christian S. Perone http://pyevolve.sourceforge.net/wordpress "Forgive, O Lord, my little jokes on Thee, and I'll forgive Thy great big joke on me." -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091119/31c460df/attachment.html>
Christian S. Perone
2009-Nov-19 23:48 UTC
[LLVMdev] llvm-c: LLVMCreateExecutionEngine returning empty error message
Just to report the answer to the problem if someone get the same problem with llvm-c bindings: Before calling the LLVMCreateJITCompiler, you must do: LLVMLinkInJIT(); LLVMLinkInInterpreter(); LLVMInitializeNativeTarget(); Otherwise it will return 1 and an empty error message. On Thu, Nov 19, 2009 at 10:51 AM, Christian S. Perone < christian.perone.listas at gmail.com> wrote:> Hello, I'm using the llvm-c bindings for C, but I'm getting some problems, > the LLVMCreateExecutionEngine is returning 1 but the error message is an > empty string (it's !=NULL). > > The steps I'm doing is to create the module, then I call LLVMVerifyModule > to verify and it works fine, later I call > LLVMCreateModuleProviderForExistingModule and it returns !=NULL MP, so it's > ok, but then when I call something like this: error_ret > LLVMCreateJITCompiler(&engine, provider, 0, &verror) > It returns 1 in error_ret and an empty string in verror, does someone knows > why or how can I get the error message ? Or when it returns an empty error > message ? > I'm using the pre built 2.6 binaries from default ubuntu karmic > installation. > > Thank you, > - Christian > -- > Christian S. Perone > http://pyevolve.sourceforge.net/wordpress > "Forgive, O Lord, my little jokes on Thee, and I'll forgive Thy great big > joke on me." >-- Christian S. Perone http://pyevolve.sourceforge.net/wordpress "Forgive, O Lord, my little jokes on Thee, and I'll forgive Thy great big joke on me." -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091119/101dd9d0/attachment.html>