Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install failing for version 2.0.0 python 3.10 #125

Closed
willv opened this issue May 4, 2022 · 2 comments
Closed

pip install failing for version 2.0.0 python 3.10 #125

willv opened this issue May 4, 2022 · 2 comments

Comments

@willv
Copy link

willv commented May 4, 2022

pip 22.0.4
python 3.10.1
hiredis 2.0.0
When doing a pip install hiredis i get this error:

gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ivendor -I/home/[..]/env/include -I/home/[..]/python/include/python3.10 -c vendor/hiredis/read.c -o build/temp.linux-x86_64-3.10/vendor/hiredis/read.o
      vendor/hiredis/read.c: In function ‘redisReaderFree’:
      vendor/hiredis/read.c:646:9: error: ‘for’ loop initial declarations are only allowed in C99 mode
               for (int i = 0; i < r->tasks; i++) {
               ^
      vendor/hiredis/read.c:646:9: note: use option -std=c99 or -std=gnu99 to compile your code
      error: command '/usr/bin/gcc' failed with exit code 1
@willv
Copy link
Author

willv commented May 4, 2022

System used gcc 4.8.5 to produce the error, upgraded gcc and all is well.
thanks

@willv willv closed this as completed May 4, 2022
@wdhwg001
Copy link

And you could also use:

CFLAGS="$CFLAGS -std=c99" \
pip install hiredis

to workaround this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants