Error al instalar redis en windows 8.1 pro : En la función ‘redisKeepAlive’

94 views
Skip to first unread message

Jorge Banguera

unread,
Apr 27, 2015, 5:17:24 PM4/27/15
to redi...@googlegroups.com
I am attempting to use redis with rails, so I am following this tutorial on how to install redis on windows: https://wmendezc.wordpress.com/2014/03/20/instalando-redis-en-windows-8/

When I'm attempting to run on Cygwin:
$ make lua hiredis linenoise

it throws the following error message: 

$ make lua hiredis linenoise
MAKE lua
cd lua/src && make all CFLAGS="-O2 -Wall -DLUA_ANSI -DENABLE_CJSON_GLOBAL " MYLDFLAGS="" AR="ar rcu"
make[1]: se entra en el directorio '/cygdrive/e/_VELOCITY/downloads/redis/redis-3.0.0/deps/lua/src'
make[1]: No se hace nada para 'all'.
make[1]: se sale del directorio '/cygdrive/e/_VELOCITY/downloads/redis/redis-3.0.0/deps/lua/src'
MAKE hiredis
cd hiredis && make static
make[1]: se entra en el directorio '/cygdrive/e/_VELOCITY/downloads/redis/redis-3.0.0/deps/hiredis'
cc -std=c99 -pedantic -c -O3 -fPIC  -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb  net.c
net.c:1:0: aviso: se descarta -fPIC para el objetivo (todo el código es independiente de posición)
 /* Extracted from anet.c to work properly with Hiredis error reporting.
 ^
net.c: En la función ‘redisKeepAlive’:
net.c:143:37: error: ‘TCP_KEEPIDLE’ no se declaró aquí (primer uso en esta función)
     if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &val, sizeof(val)) < 0) {
                                     ^
net.c:143:37: nota: cada identificador sin declarar se reporta sólo una vez para cada función en el que aparece
net.c:150:37: error: ‘TCP_KEEPINTVL’ no se declaró aquí (primer uso en esta función)
     if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &val, sizeof(val)) < 0) {
                                     ^
net.c:156:37: error: ‘TCP_KEEPCNT’ no se declaró aquí (primer uso en esta función)
     if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &val, sizeof(val)) < 0) {
                                     ^
Makefile:118: fallo en las instrucciones para el objetivo 'net.o'
make[1]: *** [net.o] Error 1
make[1]: se sale del directorio '/cygdrive/e/_VELOCITY/downloads/redis/redis-3.0.0/deps/hiredis'
Makefile:45: fallo en las instrucciones para el objetivo 'hiredis'
make: *** [hiredis] Error 2


Do you have any idea why?

Jan-Erik Rediger

unread,
Apr 28, 2015, 5:02:49 AM4/28/15
to redi...@googlegroups.com
The mentioned lines were added after the version your linked tutorial
uses.
Neither TCP_KEEPIDLE, TCP_KEEPINTVL nor TCP_KEEPCNT seem to be available
in a Cygwin environment.

You could try to remove the mentioned lines (basically remove everything
between the #ifndef __sun and #endif in net.c) and see if it works then.
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
> To post to this group, send email to redi...@googlegroups.com.
> Visit this group at http://groups.google.com/group/redis-db.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages