Issue 174: Error while building v 2.1.8 on Red Hat 5 with Python 2.4.3
Status:  Complete
Owner: ----
Closed:  Jul 2011
Reported by flor...@captier.org, May 4, 2011
Impossible to build the module on my server due to an error occuring with Python 2.4.3.

For information I built successfully pyodbc 2.1.7 on the same config.

Environment:
  - RHEL 5.5
  - Linux 2.6.18-238.9.1.el5 x86_64
  - Python 2.4.3
  - gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)

Here is the result of the build command:

[root@myhost pyodbc-2.1.8]# python setup.py build
running build
running build_ext
building 'pyodbc' extension
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 -DPYODBC_VERSION=2.1.8 -I/usr/include/python2.4 -c /tmp/pyodbc-2.1.8/src/pyodbcmodule.cpp -o build/temp.linux-x86_64-2.4/tmp/pyodbc-2.1.8/src/pyodbcmodule.o -Wno-write-strings
/tmp/pyodbc-2.1.8/src/pyodbcmodule.cpp: In function 'void initpyodbc()':
/tmp/pyodbc-2.1.8/src/pyodbcmodule.cpp:919: error: invalid conversion from 'const char*' to 'char*'
/tmp/pyodbc-2.1.8/src/pyodbcmodule.cpp:919: error:   initializing argument 3 of 'int PyModule_AddStringConstant(PyObject*, char*, char*)'
error: command 'gcc' failed with exit status 1

May 20, 2011
Project Member #1 mkleehammer
(No comment was entered for this change.)
Status: Started
May 20, 2011
Project Member #2 mkleehammer
Apparently I'm not looking at the same version.  Can you paste in the offending line?  I'm wondering if quoted strings need a cast or not.  There is a cast (recent) on the line that sets the version.

May 20, 2011
#3 flor...@captier.org
I pasted all the lines I have while trying to build the module... Which additionnal line do you need ?
Jul 10, 2011
Project Member #4 mkleehammer
Fixed in 2.1.9

Status: Complete