Closed GoogleCodeExporter closed 8 years ago
Adding #define __EXTENSIONS__ to redis.c and anet.c seems to fix this. Not sure
if this is correct though.
Original comment by unilo...@gmail.com
on 18 Apr 2009 at 7:26
cheers, your fork on github builds and runs for me on solaris, though it fails
to build on mac os x:
cc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6 -g adlist.c
cc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6 -g ae.c
cc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6 -g anet.c
cc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6 -g dict.c
cc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6 -g redis.c
cc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6 -g sds.c
cc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6 -g zmalloc.c
cc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6 -g lzf_c.c
cc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6 -g lzf_d.c
cc -o redis-server -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6
-ldl -lnsl -lsocket -g
adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o
ld: library not found for -lnsl
collect2: ld returned 1 exit status
make: *** [redis-server] Error 1
antirez - any chance you could integrate the changes into the mainline, needed
for solaris support?
Original comment by jeanpie...@gmail.com
on 25 Apr 2009 at 4:07
applying bc18c02f:
http://github.com/unilogic/redis/commit/bc18c02f958a45f868d345bd5afdb3893c874ca4
onto mainline git HEAD, redis-server and benchmark build and run but redis-cli
does not and there are several perhaps
concerning warnings
% CC=/usr/sfw/bin/gcc gmake
/usr/sfw/bin/gcc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6
-g adlist.c
/usr/sfw/bin/gcc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6
-g ae.c
ae.c: In function `aeProcessEvents':
ae.c:211: warning: implicit declaration of function `memset'
/usr/sfw/bin/gcc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6
-g anet.c
/usr/sfw/bin/gcc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6
-g dict.c
dict.c: In function `dictGetRandomKey':
dict.c:382: warning: implicit declaration of function `random'
/usr/sfw/bin/gcc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6
-g redis.c
redis.c: In function `daemonize':
redis.c:3781: warning: int format, pid_t arg (arg 3)
redis.c: In function `rdbLoad':
redis.c:2033: warning: 'o' might be used uninitialized in this function
/usr/sfw/bin/gcc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6
-g sds.c
/usr/sfw/bin/gcc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6
-g zmalloc.c
/usr/sfw/bin/gcc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6
-g lzf_c.c
/usr/sfw/bin/gcc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6
-g lzf_d.c
/usr/sfw/bin/gcc -o redis-server -std=c99 -pedantic -O2 -Wall -W
-DSDS_ABORT_ON_OOM -D_XPG6 -ldl -lnsl -lsocket -
g adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o
Hint: To run the test-redis.tcl script is a good idea.
Launch the redis server with ./redis-server, then in another
terminal window enter this directory and run 'make test'.
/usr/sfw/bin/gcc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6
-g benchmark.c
/usr/sfw/bin/gcc -o redis-benchmark -std=c99 -pedantic -O2 -Wall -W
-DSDS_ABORT_ON_OOM -D_XPG6 -ldl -lnsl -
lsocket -g ae.o anet.o benchmark.o sds.o adlist.o zmalloc.o
/usr/sfw/bin/gcc -c -std=c99 -pedantic -O2 -Wall -W -DSDS_ABORT_ON_OOM -D_XPG6
-g redis-cli.c
redis-cli.c: In function `lookupCommand':
redis-cli.c:116: warning: implicit declaration of function `strcasecmp'
/usr/sfw/bin/gcc -o redis-cli -std=c99 -pedantic -O2 -Wall -W
-DSDS_ABORT_ON_OOM -D_XPG6 -g anet.o sds.o adlist.o
redis-cli.o zmalloc.o
Undefined first referenced
symbol in file
bind anet.o
accept anet.o
listen anet.o
gethostbyname anet.o
socket anet.o
setsockopt anet.o
connect anet.o
inet_aton anet.o
inet_ntoa anet.o
ld: fatal: Symbol referencing errors. No output written to redis-cli
collect2: ld returned 1 exit status
gmake: *** [redis-cli] Error 1
Original comment by jeanpie...@gmail.com
on 25 Apr 2009 at 4:19
there is already an open issue for this problems.
Original comment by anti...@gmail.com
on 23 Oct 2009 at 12:43
Original issue reported on code.google.com by
jeanpie...@gmail.com
on 9 Apr 2009 at 12:58