0

I'm trying to build the python module pyodbc on a RHEL5 server. I've downloaded the source directly from the pyodbc google code page. Whenever I run the

python setup.py build

command, I'm greeted with this:

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 /home/pyodbc-2.1.8/src/pyodbcmodule.cpp -o build/temp.linux-x86_64-2.4/home/pyodbc-2.1.8/src/pyodbcmodule.o -Wno-write-strings
/home/pyodbc-2.1.8/src/pyodbcmodule.cpp: In function âvoid initpyodbc()â:
/home/pyodbc-2.1.8/src/pyodbcmodule.cpp:919: error: invalid conversion from âconst char*â to âchar*â
/home/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

Not sure where those "â" are coming from, but I have a hunch those are causing the problem. I have checked http://code.google.com/p/pyodbc/wiki/Building and have unixODBC-devel installed.

Omega192
  • 125
  • 1
  • 1
  • 8

1 Answers1

1

Those odd characters aren't causing the problem. The -Wall option is given causing type conversion warning to become an error. It is fixed in 2.1.9.

http://code.google.com/p/pyodbc/issues/detail?id=174

Mark Wagner
  • 18,019
  • 2
  • 32
  • 47