redis / hiredis-rb

Ruby wrapper for hiredis
BSD 3-Clause "New" or "Revised" License
319 stars 90 forks source link

Error compiling on FreeBSD #8

Closed Jellyfrog closed 10 years ago

Jellyfrog commented 11 years ago

...and yes I applied the patch to make it use gmake.

Submodule 'vendor/hiredis' (git://github.com/antirez/hiredis.git) registered for path 'vendor/hiredis'
Cloning into 'vendor/hiredis'...
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 3 (delta 0)
Receiving objects: 100% (3/3), done.
fatal: reference is not a tree: 95e83386f7d592d021bed87f4df1530eda454c6a
Unable to checkout '95e83386f7d592d021bed87f4df1530eda454c6a' in submodule path 'vendor/hiredis'
make: don't know how to make clean. Stop
rm -r tmp/amd64-freebsd9/hiredis_ext/1.8.7
mkdir -p tmp/amd64-freebsd9/hiredis_ext/1.8.7
cd tmp/amd64-freebsd9/hiredis_ext/1.8.7
/usr/local/bin/ruby18 -I. ../../../../ext/hiredis_ext/extconf.rb
gmake: *** No rule to make target `static'.  Stop.
creating Makefile
cd -
cd tmp/amd64-freebsd9/hiredis_ext/1.8.7
gmake
cc -I. -I/usr/local/lib/ruby/1.8/amd64-freebsd9 -I/usr/local/lib/ruby/1.8/amd64-freebsd9 -I../../../../ext/hiredis_ext -I/usr/local/include    -fPIC -fwrapv -I/usr/local/include -O2 -pipe -fno-strict-aliasing -std=gnu89  -fPIC  -I/tmp/gem/hiredis-rb/vendor/hiredis  -c ../../../../ext/hiredis_ext/connection.c
In file included from ../../../../ext/hiredis_ext/connection.c:3:
../../../../ext/hiredis_ext/hiredis_ext.h:4:21: error: hiredis.h: No such file or directory
In file included from ../../../../ext/hiredis_ext/connection.c:3:
../../../../ext/hiredis_ext/hiredis_ext.h:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'redisExtReplyObjectFunctions'
../../../../ext/hiredis_ext/connection.c:6: error: expected specifier-qualifier-list before 'redisContext'
../../../../ext/hiredis_ext/connection.c: In function 'parent_context_try_free_context':
../../../../ext/hiredis_ext/connection.c:11: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c:12: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c:13: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c: In function 'parent_context_try_free_timeout':
../../../../ext/hiredis_ext/connection.c:18: error: 'redisParentContext' has no member named 'timeout'
../../../../ext/hiredis_ext/connection.c:19: error: 'redisParentContext' has no member named 'timeout'
../../../../ext/hiredis_ext/connection.c:20: error: 'redisParentContext' has no member named 'timeout'
../../../../ext/hiredis_ext/connection.c: In function 'parent_context_mark':
../../../../ext/hiredis_ext/connection.c:31: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c:31: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c:32: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c: In function 'parent_context_raise':
../../../../ext/hiredis_ext/connection.c:49: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c:50: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c:54: error: 'REDIS_ERR_IO' undeclared (first use in this function)
../../../../ext/hiredis_ext/connection.c:54: error: (Each undeclared identifier is reported only once
../../../../ext/hiredis_ext/connection.c:54: error: for each function it appears in.)
../../../../ext/hiredis_ext/connection.c:58: error: 'REDIS_ERR_EOF' undeclared (first use in this function)
../../../../ext/hiredis_ext/connection.c: In function 'connection_parent_context_alloc':
../../../../ext/hiredis_ext/connection.c:70: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c:71: error: 'redisParentContext' has no member named 'timeout'
../../../../ext/hiredis_ext/connection.c: At top level:
../../../../ext/hiredis_ext/connection.c:123: error: expected declaration specifiers or '...' before 'redisContext'
../../../../ext/hiredis_ext/connection.c: In function 'connection_generic_connect':
../../../../ext/hiredis_ext/connection.c:130: error: 'c' undeclared (first use in this function)
../../../../ext/hiredis_ext/connection.c:139: error: 'REDIS_ERR_IO' undeclared (first use in this function)
../../../../ext/hiredis_ext/connection.c:149: error: 'redisParentContext' has no member named 'timeout'
../../../../ext/hiredis_ext/connection.c:150: error: 'redisParentContext' has no member named 'timeout'
../../../../ext/hiredis_ext/connection.c:184: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c:185: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c:185: error: 'redisExtReplyObjectFunctions' undeclared (first use in this function)
../../../../ext/hiredis_ext/connection.c: In function 'connection_connect':
../../../../ext/hiredis_ext/connection.c:195: error: 'redisContext' undeclared (first use in this function)
../../../../ext/hiredis_ext/connection.c:195: error: 'c' undeclared (first use in this function)
../../../../ext/hiredis_ext/connection.c:218: error: too many arguments to function 'connection_generic_connect'
../../../../ext/hiredis_ext/connection.c: In function 'connection_connect_unix':
../../../../ext/hiredis_ext/connection.c:223: error: 'redisContext' undeclared (first use in this function)
../../../../ext/hiredis_ext/connection.c:223: error: 'c' undeclared (first use in this function)
../../../../ext/hiredis_ext/connection.c:244: error: too many arguments to function 'connection_generic_connect'
../../../../ext/hiredis_ext/connection.c: In function 'connection_is_connected':
../../../../ext/hiredis_ext/connection.c:250: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c:250: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c: In function 'connection_disconnect':
../../../../ext/hiredis_ext/connection.c:259: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c: In function 'connection_write':
../../../../ext/hiredis_ext/connection.c:279: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c:293: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c: In function 'connection_flush':
../../../../ext/hiredis_ext/connection.c:301: error: 'redisContext' undeclared (first use in this function)
../../../../ext/hiredis_ext/connection.c:301: error: 'c' undeclared (first use in this function)
../../../../ext/hiredis_ext/connection.c:305: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c:308: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c:312: error: 'REDIS_ERR' undeclared (first use in this function)
../../../../ext/hiredis_ext/connection.c:320: error: 'redisParentContext' has no member named 'timeout'
../../../../ext/hiredis_ext/connection.c: In function '__get_reply':
../../../../ext/hiredis_ext/connection.c:335: error: 'redisContext' undeclared (first use in this function)
../../../../ext/hiredis_ext/connection.c:335: error: 'c' undeclared (first use in this function)
../../../../ext/hiredis_ext/connection.c:335: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c:340: error: 'REDIS_ERR' undeclared (first use in this function)
../../../../ext/hiredis_ext/connection.c:358: error: 'redisParentContext' has no member named 'timeout'
../../../../ext/hiredis_ext/connection.c:381: error: 'redisParentContext' has no member named 'timeout'
../../../../ext/hiredis_ext/connection.c: In function 'connection_read':
../../../../ext/hiredis_ext/connection.c:414: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c: In function 'connection_set_timeout':
../../../../ext/hiredis_ext/connection.c:441: error: 'redisParentContext' has no member named 'timeout'
../../../../ext/hiredis_ext/connection.c: In function 'connection_fileno':
../../../../ext/hiredis_ext/connection.c:453: error: 'redisParentContext' has no member named 'context'
../../../../ext/hiredis_ext/connection.c:456: error: 'redisParentContext' has no member named 'context'
gmake: *** [connection.o] Error 1
rake aborted!
Command failed with status (2): [gmake...]
Tasks: TOP => default => rebuild => compile => compile:amd64-freebsd9 => compile:hiredis_ext:amd64-freebsd9 => copy:hiredis_ext:amd64-freebsd9:1.8.7 => tmp/amd64-freebsd9/hiredis_ext/1.8.7/hiredis_ext.so
(See full trace by running task with --trace)
FreeBSD 9.0-RELEASE
ruby 1.8.7 (2012-10-12 patchlevel 371) [amd64-freebsd9]
rake, version 10.0.2
GNU Make 3.82
kiela commented 11 years ago

Git is trying to checkout submodule from old hiredis repo for a commit 95e83386 which does not exist in this repo but exists in new repo. Try to fork hiredis-rb, change path to git submodule of hiredis, commit, push, use forked repo in Gemfile or use mine repo by adding this line to your Gemfile:

gem 'hiredis', git: 'git@github.com:kiela/hiredis-rb.git', submodules: true

Although, there is waiting pull request for that..

pietern commented 10 years ago

This has been fixed with merging #5.