Python embedded - linking problem on Linux - trying again

Kim Petersen kp at
Wed Aug 14 12:38:27 EDT 2002

Jarkko Torppa wrote:
> In article <3D5A7C7F.2030800 at>, Kim Petersen wrote:
>>>>ImportError: /usr/lib/python2.1/lib-dynload/ undefined 
>>>>symbol: PyExc_IOError
> ...
>>When doing an `nm` 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 -> (my module) -> (Where timemodule 
can't find symbols in

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

I suspect that the symbols from 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