Python embedded - linking problem on Linux - trying again
Jarkko Torppa
torppa at staff.megabaud.fi
Wed Aug 14 11:37:54 EDT 2002
In article <3D5A7348.7010208 at kyborg.dk>, Kim Petersen wrote:
> Jarkko Torppa wrote:
>> In article <3D57BD22.8090305 at kyborg.dk>, Kim Petersen wrote:
>>
>>>When creating an embedded python in an RM/Cobol-85 interpretor, i have
>>>the following problem:
>>>
>>>It seems that i have to link all the modules (the .so's) that i need
>>>with the new dynamic link library, isn't it at all possible to make it
>>>(the python embedded interpretor) just find the .so's like the regular
>>>interpretor does?
>>
>>
>> What is the error message when trying to import something that
>> is not linked in ?
>
> Hmmm, interesting ... my embedded python has no possibility of writing
> the errors (RM/Cobol limitation) - but when enforced to do so with a
> try-except with traceback print to file i was able to capture what i
> haven't seen before ;-)
>
> This is the traceback:
>
> Traceback (most recent call last):
> File "RM_Gui.py", line 17, in ?
> import time
> ImportError: /usr/lib/python2.1/lib-dynload/timemodule.so: undefined
> symbol: PyExc_IOError
> Traceback (most recent call last):
> File "RM_Gui.py", line 32, in RM_GUI_avail
> if sys.platform=='win32':
> File "rmcobol85.py", line 6, in ?
> import RM_Gui
> File "RM_Gui.py", line 86, in ?
> if __name__ == "__main__":
> TypeError: function takes at least 2 arguments (1 given)
>
> PyExc_IOError seems to be the culprit ????
If that embedded python is also 2.1, then i guess: your linker
propably stripped it away as it was unused by the target that you
were creating.
There is this option in some version of GNU ld
-export-dynamic
When creating an ELF file, add all symbols to the
dynamic symbol table. Normally, the dynamic symbol
table contains only symbols which are used by a dy-
namic object. This option is needed for some uses
of dlopen.
which (or something like it) I think that you will need.
> What do i look for? excepting these: (bit long trace below - which to me
> indicates that it actually found and opened the timemodule ????)
Yes that it seemed to do so it finds that from right place, no
other interesting information here.
--
Jarkko Torppa, Elisa Internet
More information about the Python-list
mailing list