Open LlinksRechts opened 3 years ago
After some research I found that it is able to find the f
symbol, but can't find sin
. I haven't really looked into what arith
actually does, so I haven't put too much more time into that.
EDIT: This is because the llvm libraries (in fact, no external libraries) are not linked, so llvm.sin.f64
is not available. I have yet to find out how to get it to link these in.
This PR fixes parts of #13
I ran across the same problem when trying to run the ORC and Arith examples, so I took a deep dive into LLVM and found out the following:
ORC
This example was simply missing the registration of the module, ie. the call to
withModule
. Therefore, theadd
symbol could not be found (that llvm-hs simply returns aJITSymbolError ""
without any message is a bug imo, I'm going to report that right after).Arith
In this example, the symbol resolver was not registered and added to the resolver map. Therefore, an error was thrown in the call to
withModule
, which needs a resolver. However, this example still does not work (can't find the symbol); the problem lies somewhere in the module definition (I tried executing the module with theeagerJit
function from ORC, and that didn't work either); I haven't been able to look into that more.