4

I am trying to install Kyoto Cabinet via ruby gems. I am putting inside the Gemfile

gem "kyotocabinet", "~> 1.0"

as opposed here but when I run bundle it fails with

setting variables ...
$CFLAGS = -I. -I/usr/local/include -Wall $(cflags)  -fPIC -O2
$LDFLAGS = -L.  -rdynamic -Wl,-export-dynamic -L. -L/usr/local/lib
$libs =  -lkyotocabinet -lz -lstdc++ -lrt -lpthread -lm -lc
checking for kccommon.h... yes
creating Makefile

make
g++ -I. -I/home/gerry/.rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1/x86_64-linux -I/home/gerry/.rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1/ruby/backward -I/home/gerry/.rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1 -I. -DHAVE_KCCOMMON_H    -fPIC -I. -I/usr/local/include -Wall -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC -O2   -o kyotocabinet.o -c kyotocabinet.cc
kyotocabinet.cc:29: error: ‘INT32_MAX’ was not declared in this scope
kyotocabinet.cc:30: error: ‘INT32_MAX’ was not declared in this scope
kyotocabinet.cc:61: warning: type qualifiers ignored on function return type
kyotocabinet.cc:320: warning: type qualifiers ignored on function return type
kyotocabinet.cc: In function ‘void init_err()’:
kyotocabinet.cc:387: error: ‘NOFILE’ is not a member of ‘kyotocabinet::BasicDB::Error’
kyotocabinet.cc: In function ‘VALUE db_increment(int, VALUE*, VALUE)’:
kyotocabinet.cc:1009: error: ‘INT64_MIN’ was not declared in this scope
kyotocabinet.cc: In function ‘VALUE db_synchronize(int, VALUE*, VALUE)’:
kyotocabinet.cc:1094: error: cannot declare variable ‘proc’ to be of abstract type ‘SoftFileProcessor’
kyotocabinet.cc:288: note:   because the following virtual functions are pure within ‘SoftFileProcessor’:
/usr/local/include/kcdb.h:1070: note:   virtual bool
kyotocabinet::BasicDB::FileProcessor::process(const std::string&, int64_t, int64_t)
make: *** [kyotocabinet.o] Error 1

If anyone knows a way to bypass this error please help! I am using Ubuntu 10.10 FYI.

Thanks a lot for any help!

Gerry
  • 5,326
  • 1
  • 23
  • 33

2 Answers2

2

Try using the gem "kyotocabinet-ruby" instead.

bratsche
  • 2,666
  • 20
  • 23
1

You need to install the libkyotocabinet-dev package:

sudo apt-get install libkyotocabinet-dev

And then you can use kyotocabinet-ruby:

sudo gem install kyotocabinet-ruby

Dorian
  • 22,759
  • 8
  • 120
  • 116
  • 1
    Is there a way to do this without relying on debian packages? Can header files be installed any other way? – Doug F Jan 08 '14 at 22:36
  • To be fair, I think you should not use this gem, it's not maintained anymore: last update in August 2011 (see http://rubygems.org/gems/kyotocabinet-ruby) – Dorian Jan 08 '14 at 23:52