<div dir="ltr">Any suggestions or pointers?<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br>From: <strong class="gmail_sendername" dir="auto">sangeeta chowdhary</strong> <span dir="auto"><<a href="mailto:sangitachowdhary@gmail.com">sangitachowdhary@gmail.com</a>></span><br>Date: Fri, Dec 18, 2020 at 8:34 AM<br>Subject: How to execute LLVM IR code generated from Python source code using numba<br>To: LLVM Developers Mailing List <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>><br></div><br><br><div dir="ltr">Hello Everyone,<br><div><br></div><div>I am trying to generate llvm IR from python and then execute it. I used numba to generate llvm IR. While linking I am getting some undefined references. I am not sure which python packages I need to load to resolve this issue. If someone can help me I would appreciate it. If there is any other way to get llvm IR from python, please let me know.</div><div><br></div><div>#   <span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Monaco">numba test.py --dump-llvm > test.ll</span></div><div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Monaco"># </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Monaco">llvm-as test.ll –o test.bc</span></div><div>





<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Monaco;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"># llc test.bc -filetype=obj -o test.c.o</span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Monaco;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"># </span><span style="font-variant-ligatures:no-common-ligatures">clang -pg test.c.o -o test.o</span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:Monaco;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">test.ll:(.text+0x631): undefined reference to `numba_gil_ensure'</span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:Monaco;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">test.ll:(.text+0x643): undefined reference to `numba_unpickle'</span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:Monaco;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">test.ll:(.text+0x64e): undefined reference to `PyObject_Str'</span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:Monaco;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">test.ll:(.text+0x659): undefined reference to `PyUnicode_AsUTF8'</span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:Monaco;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">test.ll:(.text+0x668): undefined reference to `PySys_WriteStdout'</span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:Monaco;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">test.ll:(.text+0x670): undefined reference to `Py_DecRef'</span></p><p style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;font-family:Monaco;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">test.ll:(.text+0x678): undefined reference to `Py_DecRef'</span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Monaco;color:rgb(0,0,0)">












</p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Monaco;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">test.ll:(.text+0x684): undefined reference to `PySys_WriteStdout'</span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;font-family:Monaco;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font face="arial, sans-serif">Regards,</font></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font face="arial, sans-serif">Sangeeta</font></span></p>





</div>











</div>
</div></div>