Building Python as a shared lib plugin.
Chachkoff Yann
yann.chachkoff at mailandnews.com
Tue Aug 28 23:00:03 EDT 2001
Le Mardi 28 Août 2001 16:16, vous avez écrit :
> > I get the following error:
> > ImportError: /usr/lib/python2.0/lib-dynload/structmodule.so: undefined
> > symbol: PyString_Type
> >
> > Following my searches, it seems that I need to tell the linker to export
> > all symbols of the dynamic symbol table, so I tried to add
> > -export-dynamic (or -E) in the main making line, but it does not work.
> > What should I do ? Anyone has an idea ?
> Section 5.2 of the Extending and Embedding the Python Interpreter says:
>
<snip>
>
> The '-Xlinker' tells gcc to pass '-export-dynamic' to ld. gcc itself seems
> to ignore it otherwise.
I of course tried this first (I always read manuals before working). It does
not work. I tried the following one:
$(CC) $(FLAGS) -shared -Wl,-soname,plugin_python.so.0 $(OBJECTS)
../common/libcross.a -Xlinker -export-dynamic
/usr/lib/python2.0/config/libpython2.0.a -lpthread -lutil -ldmalloc -o
plugin_python.so.0.1
Maybe I'm completely wrong or simply dumb. But I passed the correct options
to gcc and it simply does not solve the problem. (Thanx for trying to help
anyway)
Chachkoff Y.
More information about the Python-list
mailing list