[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sup-devel] Tokyo Cabinet fails with invalid record header



On Tuesday 21 June 2011 01:42:24 William Morgan wrote:
> Reformatted excerpts from Horacio Sanson's message of 2011-06-20:
> > When you say try 0.4 you mean leveldb-ruby version 0.4 right?, because
> > I downloaded the source from github and the latest version I get is
> > 0.3. Also rubygems only has version 0.3.
> 
> Whoops, forgot to upload it. Try now. (0.4 should have the fix for
> cstdatomic issue, but nothing with -fPIC.)

Indeed it fixed the cstdatomic issue but not the linking one:

####################################
sudo gem1.9.1 install leveldb-ruby
Building native extensions.  This could take a while...
ERROR:  Error installing leveldb-ruby:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby1.9.1 extconf.rb
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 db/builder.cc -o db/builder.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 db/db_impl.cc -o db/db_impl.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 db/db_iter.cc -o db/db_iter.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 db/filename.cc -o db/filename.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 db/dbformat.cc -o db/dbformat.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 db/log_reader.cc -o db/log_reader.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 db/log_writer.cc -o db/log_writer.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 db/memtable.cc -o db/memtable.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 db/repair.cc -o db/repair.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 db/table_cache.cc -o db/table_cache.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 db/version_edit.cc -o db/version_edit.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 db/version_set.cc -o db/version_set.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 db/write_batch.cc -o db/write_batch.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 port/port_posix.cc -o port/port_posix.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 table/block.cc -o table/block.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 table/block_builder.cc -o table/block_builder.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 table/format.cc -o table/format.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 table/iterator.cc -o table/iterator.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 table/merger.cc -o table/merger.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 table/table.cc -o table/table.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 table/table_builder.cc -o table/table_builder.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 table/two_level_iterator.cc -o table/two_level_iterator.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 util/arena.cc -o util/arena.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 util/cache.cc -o util/cache.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 util/coding.cc -o util/coding.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 util/comparator.cc -o util/comparator.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 util/crc32c.cc -o util/crc32c.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 util/env.cc -o util/env.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 util/env_posix.cc -o util/env_posix.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 util/hash.cc -o util/hash.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 util/histogram.cc -o util/histogram.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 util/logging.cc -o util/logging.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 util/options.cc -o util/options.o
g++ -c -I. -I./include -DLEVELDB_PLATFORM_POSIX -std=c++0x -O2 -DNDEBUG        
-DUSE_SNAPPY=1 util/status.cc -o util/status.o
rm -f libleveldb.a
ar -rs libleveldb.a ./db/builder.o ./db/db_impl.o ./db/db_iter.o 
./db/filename.o ./db/dbformat.o ./db/log_reader.o ./db/log_writer.o 
./db/memtable.o ./db/repair.o ./db/table_cache.o ./db/version_edit.o 
./db/version_set.o ./db/write_batch.o ./port/port_posix.o ./table/block.o 
./table/block_builder.o ./table/format.o ./table/iterator.o ./table/merger.o 
./table/table.o ./table/table_builder.o ./table/two_level_iterator.o 
./util/arena.o ./util/cache.o ./util/coding.o ./util/comparator.o 
./util/crc32c.o ./util/env.o ./util/env_posix.o ./util/hash.o 
./util/histogram.o ./util/logging.o ./util/options.o ./util/status.o
ar: creating libleveldb.a
creating Makefile

make
g++ -I. -I/usr/include/ruby-1.9.1/x86_64-linux -
I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I.   -fPIC -
fno-strict-aliasing -g -g -O2 -fPIC -I../../leveldb/include  -fno-strict-
aliasing -g -o leveldb.o -c leveldb.cc
g++ -shared -o leveldb.so leveldb.o -L. -L/usr/lib -L.  -rdynamic -Wl,-export-
dynamic   -lruby-1.9.1  -lpthread -lrt -ldl -lcrypt -lm   -lc -L../../leveldb 
-lleveldb
/usr/bin/ld: ../../leveldb/libleveldb.a(db_impl.o): relocation R_X86_64_32S 
against `vtable for leveldb::DB' can not be used when making a shared object; 
recompile with -fPIC
../../leveldb/libleveldb.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [leveldb.so] エラー 1


Gem files will remain installed in /var/lib/gems/1.9.1/gems/leveldb-ruby-0.4 
for inspection.
Results logged to /var/lib/gems/1.9.1/gems/leveldb-
ruby-0.4/ext/leveldb/gem_make.out
################################


I tried qwith both g++-4.4 and g++-4.5 that come with standard Ubuntu 11.04 
distribution.

-- 
regards,                                                                                                                                                                                                       
Horacio Sanson
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel