Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Peter Hall
Cannot install gem on OSX: Compile fails [ reply ]  
2011-04-16 18:05
I have compiled and installed proj4 on my development machine and have added the proj4rb gem to my Gemfil.e When I try to run "bundle install" I get the following error:


Installing proj4rb (0.3.1) with native extensions /Users/peter/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/Users/peter/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for proj_api.h... yes
checking for pj_init() in -lproj... yes
creating Makefile

make
gcc -I. -I/Users/peter/.rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1/i386-darwin10.6.0 -I/Users/peter/.rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/Users/peter/.rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1 -I. -DHAVE_PROJ_API_H -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -o projrb.o -c projrb.c
projrb.c: In function ‘proj_initialize’:
projrb.c:76: error: ‘struct RArray’ has no member named ‘len’
make: *** [projrb.o] Error 1

I have tried adding :lib => 'proj4' to my Gemfile (there is another thread in this forum that recommended adding it to my environments file for an older version of Rails) but "bundle install" flat-out refuses to run if I do that, saying that the option is invalid.

Any idea how I can make this library compile?
Thanks