<div dir="ltr">Hi,<div><br></div><div>This looks like a question for the numba folks: some of the symbols here as provided by the numba runtime.</div><div><br></div><div>-- </div><div>Mehdi</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Feb 22, 2021 at 3:06 PM sangeeta chowdhary via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><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" target="_blank">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" target="_blank">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-ligatures:normal;font-variant-caps:normal;font-variant-east-asian: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-ligatures:normal;font-variant-caps:normal;font-variant-east-asian: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-ligatures:normal;font-variant-caps:normal;font-variant-east-asian: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-ligatures:normal;font-variant-caps:normal;font-variant-east-asian: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-ligatures:normal;font-variant-caps:normal;font-variant-east-asian: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-ligatures:normal;font-variant-caps:normal;font-variant-east-asian: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-ligatures:normal;font-variant-caps:normal;font-variant-east-asian: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>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>