Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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 and have unixODBC-devel installed.

share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
I'm guessing github is where to get 2.1.9? Thanks for the info! – Omega192 Jul 20 '11 at 20:54
Wait. Nope. Github just has the ports to Python 3. Hmm, 2.1.9 hasn't been released yet? Drat. – Omega192 Jul 20 '11 at 21:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.