Linking in a Linux environment

Roux Claude roux.claude at xrce.xerox.com
Mon Jan 22 06:03:59 EST 2007


Bonjour,

We have implemented Python as an "embedded script language" in our NLP 
application, XIP which a grammar rule engine written in C++ and available as 
a library.

We have also developped a GUI in Java, which is linked to this XIP library, 
to simplify the development of NL grammars.

JAVA GUI IDE
    Library:
        XIP (C++)
            Python Modules can be called from grammar rules


Now we have the following problem, when we try to execute a Python script 
from a grammar in a Linux environment, the system fails when this Python 
module tries to import basic modules like "math" for instance. The system 
returns a "PyExc_OverflowException undefined variable" error.

This problem only occurs on Linux platforms, we do not have any problems on 
Mac OS and on Windows.

We have linked our NLP library with Python 2.4.4, and we have tried many 
different manipulations to solve this problem. We have tried to link with 
the static and the dynamic Python library, without any success.

Searching the WEB, we have discovered similar problems, but none of the 
proposed solutions actually worked. For instance, some people wrote that the 
problem was to due to the compiling options of our Python library; we 
checked the Makefile for these options, which we found to be already there. 
We also tried to modify the dlopen options, as suggested, through the 
specific dlopen operations in the Python corresponding library. NOP...

However, the use the Python 2.5 dynamic library seems to solve most of these 
problems, which would be ok, if people would accept to switch to a version 
that is quite new. Halas, this is not that simple...

I still do not have any clear answer about what is going on. If someone 
could help me on this one, I'll be really grateful... :-)

Merci d'avance,

Claude






More information about the Python-list mailing list