"undefined symbol" in C extension module

Dan Stromberg drsalists at gmail.com
Sat Jan 22 23:59:18 EST 2022


Perhaps try:
https://stromberg.dnsalias.org/svn/find-sym/trunk

It tries to find symbols in C libraries.

In this case, I believe you'll find it in -lpythonx.ym


On Sat, Jan 22, 2022 at 12:43 PM Robert Latest via Python-list <
python-list at python.org> wrote:

> Hi guys,
>
> I've written some CPython extension modules in the past without problems.
> Now
> after moving to a new Archlinux box with Python3.10 installed, I can't
> build
> them any more. Or rather, I can build them but not use them due to
> "undefined
> symbols" during linking. Here's ldd's output when used on the "spam"
> example
> library from the docs:
>
>         linux-vdso.so.1 (0x00007ffe2454a000)
>         libc.so.6 => /usr/lib/libc.so.6 (0x00007fb6b6eb9000)
>         /usr/lib64/ld-linux-x86-64.so.2 (0x00007fb6b70a4000)
> undefined symbol: PyObject_Init (./build/lib.linux-x86_64-3.10/
>     spam.cpython-310-x86_64-linux-gnu.so)
>
> [and more of the same]
>
> It seems that I need to install some library to make this work, but which
> one?
> --
> https://mail.python.org/mailman/listinfo/python-list
>


More information about the Python-list mailing list