Search code examples
pythonpipsolarishiredisjoyent

How do I install hiredis on Solaris 11?


I'm trying to install hiredis on my Joyent SmartMachine running Solaris 11. I keep getting the following error.

In file included from /usr/include/iso/string_iso.h:48:0,

             from /opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/include-fixed/string.h:41,

             from vendor/hiredis/read.c:34:

/opt/local/gcc47/lib/gcc/x86_64-sun-solaris2.11/4.7.3/include-fixed/sys/feature_tests.h:366:2: error: #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications        require the use of c99"

error: command 'gcc' failed with exit status 1

----------------------------------------
Cleaning up...

Solution

  • You need to manually override your C compiler while doing the pip install. Try the following command:

    CC="gcc -std=gnu99" pip install hiredis