Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Horacio Sanson <hsanson@gmail.com>
To: Sup developer discussion <sup-devel@rubyforge.org>
Subject: Re: [sup-devel] Tokyo Cabinet fails with invalid record header
Date: Tue, 21 Jun 2011 07:26:18 +0900	[thread overview]
Message-ID: <201106210726.19004.hsanson@gmail.com> (raw)
In-Reply-To: <1308588065-sup-5212@masanjin.net>

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

  reply	other threads:[~2011-06-20 22:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-14  8:36 Horacio Sanson
2011-06-14 17:30 ` William Morgan
2011-06-14 22:36   ` Horacio Sanson
2011-06-15 15:11     ` William Morgan
2011-06-18  5:02       ` William Morgan
2011-06-19 13:25         ` Horacio Sanson
2011-06-19 18:30           ` William Morgan
2011-06-19 21:59             ` William Morgan
2011-06-19 22:48               ` Horacio Sanson
2011-06-20  3:54                 ` William Morgan
2011-06-20  5:23                   ` Horacio Sanson
2011-06-20 16:42                     ` William Morgan
2011-06-20 22:26                       ` Horacio Sanson [this message]
2011-06-20 22:52                         ` William Morgan
2011-06-22  3:25                           ` William Morgan
2011-06-22 12:38                             ` Horacio Sanson
2011-06-22 18:06                               ` William Morgan
2011-06-28 17:42                                 ` Alvaro Herrera
2011-06-29  5:18                                   ` William Morgan
2011-06-22 22:41                             ` Horacio Sanson
2011-06-22 23:36                               ` William Morgan
2011-06-23 13:29                                 ` Horacio Sanson
2011-06-23 15:44                                   ` William Morgan
2011-06-15 15:16     ` William Morgan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201106210726.19004.hsanson@gmail.com \
    --to=hsanson@gmail.com \
    --cc=sup-devel@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox