Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: Python-8.4.1, Python-8.4.3, Python-Aprium
-
Component/s: Python Driver
-
Labels:None
-
Environment:
CentOS 5.6 x64
CUBRID 8.4.3.1005 x64
Python 2.4.3 + python-devel from YUM
Description
I downloaded the CUBRID-Pyhon-8.4.3.0002.tar.gz source code, then tried to compile it but failed with the following error:
$ cd RB-8.4.3/ [vagrant@localhost RB-8.4.3]$ python setup.py build running build running build_py creating build creating build/lib.linux-x86_64-2.4 creating build/lib.linux-x86_64-2.4/CUBRIDdb copying CUBRIDdb/__init__.py -> build/lib.linux-x86_64-2.4/CUBRIDdb copying CUBRIDdb/connections.py -> build/lib.linux-x86_64-2.4/CUBRIDdb copying CUBRIDdb/cursors.py -> build/lib.linux-x86_64-2.4/CUBRIDdb copying CUBRIDdb/FIELD_TYPE.py -> build/lib.linux-x86_64-2.4/CUBRIDdb running build_ext building '_cubrid' extension creating build/temp.linux-x86_64-2.4 gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fPIC -I/opt/cubrid/include -I/usr/include/python2.4 -c python_cubrid.c -o build/temp.linux-x86_64-2.4/python_cubrid.o python_cubrid.c:106: error: expected declaration specifiers or ‘...’ before ‘Py_ssize_t’ python_cubrid.c: In function ‘_cubrid_return_PyUnicode_FromString’: python_cubrid.c:109: error: ‘size’ undeclared (first use in this function) python_cubrid.c:109: error: (Each undeclared identifier is reported only once python_cubrid.c:109: error: for each function it appears in.) python_cubrid.c: In function ‘_cubrid_CursorObject_dbval_to_pyvalue’: python_cubrid.c:2000: warning: passing argument 2 of ‘_cubrid_return_PyUnicode_FromString’ makes pointer from integer without a cast python_cubrid.c:2000: error: too many arguments to function ‘_cubrid_return_PyUnicode_FromString’ error: command 'gcc' failed with exit status 1 [vagrant@localhost RB-8.4.3]$

Analysis:
The Py_ssize_t wasn't defined in Python-2.4.
From Python 2.5 on, the Py_ssize_t is defined to support 64bit machine.
http://www.python.org/dev/peps/pep-0353/
Fix in trunk, Revision: 1411
Merge into RB-8.4.1, Revision: 1412
Merge into RB-8.4.3, Revision: 1413
Merge into RB-8.4.4, Revision: 1414
Resolved.