Python embedded - linking problem on Linux - trying again

Kim Petersen kp at kyborg.dk
Wed Aug 14 18:38:27 CEST 2002


Jarkko Torppa wrote:
> In article <3D5A7C7F.2030800 at kyborg.dk>, Kim Petersen wrote:
> 
>>>>ImportError: /usr/lib/python2.1/lib-dynload/timemodule.so: undefined 
>>>>symbol: PyExc_IOError
>>>
> ...
> 
>>When doing an `nm rmc85.so` it seems that the symbol is present:
>>
>>0006e930 B PyExc_FloatingPointError
>>0006e924 B PyExc_IOError
>>0006e94c B PyExc_ImportError
>>
>>(unless i'm mistaken - which easily could be the case - since i'm not a 
>>really low level hack ;-)
> 
> 
> Yep seems to be there, 
> 
> does
> :import exceptions
> :exceptions.IOError
> work ?

Yep - that works

> 
> If it works, I suspect that this could be something funny in the
> way dlopen works. Wonder if the dynlinking that python uses is
> somehow incompatible to the one that cobol uses ? But I have
> no idea how to tell.
> 

Hmm - i rather suspect that if i had linked it directly into the cobol 
then it would've worked eg. these two models:

Model 1:
runcobol -> pyrmc85.so (my module) -> timemodule.so (Where timemodule 
can't find symbols in pyrmc85.so)

Model 2:
cobol (linked with pyrmc85.o) -> timemodule.so

I suspect that the symbols from pyrmc85.so doesn't live in the global 
space where the timemodule looks for it ...

But unfortunatly i don't have the possibility of doing this - since the 
old linking model is deprecated in the new Cobol.... and isn't smart 
anyways - since we would have to compile this on every customers 
machine... (since they use runtime licences)

So i'll either have to stick to the "link every module needed into the 
.so" or hope that someone comes up with a solution :(

Thanks very much for your help though ;-)
-- 
Med Venlig Hilsen / Regards

Kim Petersen - Kyborg A/S
IT - Innovationshuset
Havnepladsen 2
7100 Vejle
Tlf. +4576408183 || Fax. +4576408188




More information about the Python-list mailing list