[New-bugs-announce] [issue13493] using python embed on AIX 6.1, Modules import error!

python_hu report at bugs.python.org
Mon Nov 28 12:29:13 CET 2011


New submission from python_hu <nari_hu at 163.com>:

Using python api embed on AIX 6.1,Modules import error,need help!!!!!
I have compile Python2.5.5 on Aix 6.1 using condigure:
 ./configure --with-gcc="xlc_r -q64" --with-cxx="xlC_r -q64" --disable-ipv6 AR="ar -X64"
when i run Python,and import math module,it works well:

ibm1:python2.5>python
Python 2.5.5 (r255:77872, Nov 28 2011, 13:32:10) [C] on aix6
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> 

But when i using in my C++ program,it works erro,the follow is mt code :
//{{C++

#include <stdio.h>
#include "Python.h"
#include <dlfcn.h> 

int main( int argc, char **argv )
{
             Py_Main(argc, argv); 
}

//}}

When i run this code.it has erro like that:
ibm1:pytest>pytest
Python 2.5.5 (r255:77872, Nov 28 2011, 13:32:10) [C] on aix6
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
_PyImport_GetDynLoadFunc142:/usr/local/lib/python2.5/lib-dynload/math.so,flags=2_____
_PyImport_GetDynLoadFunc_erro:/usr/local/lib/python2.5/lib-dynload/math.so
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError:    0509-130 Symbol resolution failed /usr/local/lib/python2.5/lib-dynload/math.so because:
        0509-136   Symbol PyArg_Parse (number 0) is not exported from
                   dependent module pytest.
        0509-136   Symbol PyArg_ParseTuple (number 1) is not exported from
                   dependent module pytest.
        0509-136   Symbol Py_BuildValue (number 2) is not exported from
                   dependent module pytest.
        0509-136   Symbol PyDict_GetItemString (number 3) is not exported from
                   dependent module pytest.
        0509-136   Symbol PyErr_NoMemory (number 4) is not exported from
                   dependent module pytest.
        0509-136   Symbol PyErr_Occurred (number 5) is not exported from
                   dependent module pytest.
        0509-021 Additional errors occurred but are not reported.
        0509-192 Examine .loader section symbols with the
                 'dump -Tv' command.
                
>>>

----------
components: None
messages: 148474
nosy: python_hu
priority: normal
severity: normal
status: open
title: using python embed on AIX 6.1,Modules import error!
type: crash
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13493>
_______________________________________


More information about the New-bugs-announce mailing list