pietern/hiredis-rb — Issue #3: Failed gem build on OS X 10.6.8
Author: alexfarrill
Created: 2011-11-30 19:23:49+00:00
State: open

Hi, I am having some trouble installing the gem and was wondering if you have any insight into the following. I've googled for the issue unsuccessfully, any help would be appreciated.

$ sudo gem install hiredis
Password:
Building native extensions. This could take a while...
ERROR: Error installing hiredis:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -arch i386 -arch x86_64 -g -ggdb net.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -arch i386 -arch x86_64 -g -ggdb hiredis.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -arch i386 -arch x86_64 -g -ggdb sds.c
cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -arch i386 -arch x86_64 -g -ggdb async.c
libtool -static -o libhiredis.a - net.o hiredis.o sds.o async.o
libtool: unrecognized option `-static'
libtool: Try `libtool --help' for more information.
make: *** [libhiredis.a] Error 1
creating Makefile

make
gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -I/Library/Ruby/Gems/1.8/gems/hiredis-0.4.1/vendor/hiredis -c connection.c
gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -I/Library/Ruby/Gems/1.8/gems/hiredis-0.4.1/vendor/hiredis -c hiredis_ext.c
gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -I/Library/Ruby/Gems/1.8/gems/hiredis-0.4.1/vendor/hiredis -c reader.c
cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup -o hiredis_ext.bundle connection.o hiredis_ext.o reader.o -L. -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64 /Library/Ruby/Gems/1.8/gems/hiredis-0.4.1/vendor/hiredis/libhiredis.a -lruby -lpthread -ldl
i686-apple-darwin10-llvm-gcc-4.2: /Library/Ruby/Gems/1.8/gems/hiredis-0.4.1/vendor/hiredis/libhiredis.a: No such file or directory
i686-apple-darwin10-llvm-gcc-4.2: /Library/Ruby/Gems/1.8/gems/hiredis-0.4.1/vendor/hiredis/libhiredis.a: No such file or directory
lipo: can't figure out the architecture type of: /var/tmp//ccvQ1LBK.out
make: *** [hiredis_ext.bundle] Error 1

Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/hiredis-0.4.1 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/hiredis-0.4.1/ext/hiredis_ext/gem_make.out

$ ruby --version
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin10.0]
$ gem --version
1.3.7