hiredis: Can't build on macosx 10.7

Hi! I’m getting trouble installing package on Leon. … Running setup.py install for hiredis building ‘hiredis’ library /Developer/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -O2 -fwrapv -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -Ivendor/hiredis -c vendor/hiredis/hiredis.c -o build/temp.macosx-10.7-x86_64-2.7/vendor/hiredis/hiredis.o vendor/hiredis/hiredis.c:691:21: error: second argument to ‘va_arg’ is of incomplete type ‘void’ va_arg(ap,void); ^~~~~~~~~~~~~~~ /Developer/usr/bin/…/lib/clang/3.0/include/stdarg.h:35:50: note: instantiated from: #define va_arg(ap, type) builtin_va_arg(ap, type) ^ vendor/hiredis/hiredis.c:691:31: note: instantiated from: va_arg(ap,void); ^~~~ 1 error generated. error: command ‘/Developer/usr/bin/clang’ failed with exit status 1 Complete output from command /Users/demon/Work/sportlook.ru/env/bin/python -c "import setuptools;__file=‘/Users/demon/Work/sportlook.ru/env/build/hiredis/setup.py’;exec(compile(open(file).read().replace(‘\r\n’, ‘\n’), file, ‘exec’))" install --single-version-externally-managed --record /var/folders/s5/3z_j0lyx3r9__09nfn7vb7wh0000gn/T/pip-4asypi-record/install-record.txt --install-headers /Users/demon/Work/sportlook.ru/env/bin/…/include/site/python2.7: running install

running build

running build_py

creating build

creating build/lib.macosx-10.7-x86_64-2.7

creating build/lib.macosx-10.7-x86_64-2.7/hiredis

copying hiredis/init.py -> build/lib.macosx-10.7-x86_64-2.7/hiredis

copying hiredis/version.py -> build/lib.macosx-10.7-x86_64-2.7/hiredis

running build_clib

building ‘hiredis’ library

creating build/temp.macosx-10.7-x86_64-2.7

creating build/temp.macosx-10.7-x86_64-2.7/vendor

creating build/temp.macosx-10.7-x86_64-2.7/vendor/hiredis

/Developer/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -pipe -O2 -fwrapv -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -Ivendor/hiredis -c vendor/hiredis/hiredis.c -o build/temp.macosx-10.7-x86_64-2.7/vendor/hiredis/hiredis.o

vendor/hiredis/hiredis.c:691:21: error: second argument to ‘va_arg’ is of incomplete type ‘void’

                va_arg(ap,void);

                ^~~~~~~~~~~~~~~

/Developer/usr/bin/…/lib/clang/3.0/include/stdarg.h:35:50: note: instantiated from:

define va_arg(ap, type) __builtin_va_arg(ap, type)

                                             ^

vendor/hiredis/hiredis.c:691:31: note: instantiated from:

                va_arg(ap,void);

                          ^~~~

1 error generated.

error: command ‘/Developer/usr/bin/clang’ failed with exit status 1


Command /Users/demon/Work/sportlook.ru/env/bin/python -c “import setuptools;file=‘/Users/demon/Work/sportlook.ru/env/build/hiredis/setup.py’;exec(compile(open(file).read().replace(‘\r\n’, ‘\n’), file, ‘exec’))” install --single-version-externally-managed --record /var/folders/s5/3z_j0lyx3r9__09nfn7vb7wh0000gn/T/pip-4asypi-record/install-record.txt --install-headers /Users/demon/Work/sportlook.ru/env/bin/…/include/site/python2.7 failed with error code 1 Storing complete log in /Users/demon/.pip/pip.log

About this issue

  • Original URL
  • State: closed
  • Created 12 years ago
  • Comments: 23 (6 by maintainers)

Most upvoted comments

Also works:

$ brew install gcc
$ export CC=/usr/local/bin/gcc-6 && export CXX=/usr/local/bin/g++-6 && export LD=/usr/local/bin/gcc-6
$ npm install hiredis

On Mavericks I installed gcc-4.2 w/ homebrew, then exported the variables pointing to that.

brew install apple-gcc42
export CC=/usr/local/bin/gcc-4.2 
export CXX=/usr/local/bin/g++-4.2
export LD=/usr/local/bin/gcc-4.2