Uploaded image for project: 'CUBRID APIs'
  1. CUBRID APIs
  2. APIS-444

Can't install CUBRID Python driver from source with Python 2.4.3

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • 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:

      {code}
      $ 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]$ {code}

        Activity

        Hide
        jinhu 李金虎 added a comment -

        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.

        Show
        jinhu 李金虎 added a comment - 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.
        Hide
        cn14130 欧明宝[Bom Owen] added a comment -

        Test OS: Linux 64

        Test Build perl driver
        8.4.1.7007 8.4.1
        8.4.3.1005 8.4.3
        8.4.4.0100 8.4.4

        Test Result: pass

        Show
        cn14130 欧明宝[Bom Owen] added a comment - Test OS: Linux 64 Test Build perl driver 8.4.1.7007 8.4.1 8.4.3.1005 8.4.3 8.4.4.0100 8.4.4 Test Result: pass

          People

          • Assignee:
            jinhu 李金虎
            Reporter:
            kadishmal Esen Sagynov
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: