Search code examples
pythonibm-mqpymqi

How do I force Python PyMQI 1.2 to use my GCC compiler when I build it?


When I run the following command on AIX 6.1 to build PyMQI 1.2:

python setup.py build server

I get the following error:

Building PyMQI server 32bits

running build

running build_py

running build_ext

building 'pymqe' extension

cc_r -qlanglvl=extc89 -DNDEBUG -O3 -qstrict -qtune=pwr4 -qarch=pwr4 -qcpluscmt -D_LARGE_FILES -DPYQMI_SERVERBUILD=1 -I/usr/mqm/inc -I/opt/freeware/include/python2.6 -c pymqe.c -o build/temp.aix-6.1-2.6/pymqe.o unable to execute cc_r: No such file or directory

error: command 'cc_r' failed with exit status 1

How do I force the Python build scipt to use my GCC compiler instead of cc_r ?


Solution

  • The setup.py build command has the following two options

      --compiler (-c)    specify the compiler type
      --help-compiler    list available compilers
    

    Use those to specify the compiler which you want to use.