Reputation: 69
When I install thrift_client
using this command:
sudo gem install thrift_client -v '0.7.1'
I get this error:
Building native extensions. This could take a while...
ERROR: Error installing thrift_client:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
checking for strlcpy() in string.h... no
creating Makefile
make
gcc -I. -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -fPIC -g -O2 -Wall -Werror -o protocol.o -c protocol.c
gcc -I. -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -fPIC -g -O2 -Wall -Werror -o struct.o -c struct.c
struct.c:28:1: ошибка: static-декларация «strlcpy» после неstatic-декларации
/usr/include/ruby-1.9.1/ruby/missing.h:157:20: замечание: здесь была предыдущая декларация «strlcpy»
make: *** [struct.o] Ошибка 1
Gem files will remain installed in /var/lib/gems/1.9.1/gems/thrift-0.7.0 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/thrift-0.7.0/ext/gem_make.out
What's wrong?
I use Ubuntu 11.10, Thrift 0.8.0, Rails 3, Ruby 1.9.3
Upvotes: 1
Views: 875
Reputation: 4651
Thrift_client has not yet updated its thrift gem dependency to 0.8.0, the version that builds on ubuntu. So they say... Update thrift pull request
I actually got it working by cloning a fix branch and building and installing it myself:
git clone https://github.com/bitlove/thrift_client.git
cd thrift_client/
rake build
gem build thrift_client.gemspec
gem install thrift_client-0.7.2.gem
Upvotes: 2