% ls -l
total 402
drwxrwxrwx+ 2 crommc mkgroup-l-d 4096 Jan 26 16:40 .
drwxrwxrwx+ 8 crommc mkgroup-l-d 4096 Dec 10 12:36 ..
-rwxr-xr-x 1 crommc mkgroup-l-d 148992 Jan 26 16:39 bdb.so
-rwxr-xr-x 1 crommc mkgroup-l-d 133120 Aug 2 16:21 maxent.so
-rwxr-xr-x 1 crommc mkgroup-l-d 13312 Nov 1 17:29 mod_curia.so
[...]
I read [2] that this was an error in ruby-1.8.1 that should be fixed in
1.8.2, but upgrading Ruby to 1.8.2 didn't change this problem.
Also, in trying to reinstall bdb, I have problems with extconf.rb.
Whatever parameters I give, it says "libdb not found". What is the exact
file it is looking for?
Oliver Cromm <lispamateur@internet.uqam.ca> writes:
Also, in trying to reinstall bdb, I have problems with extconf.rb.
Whatever parameters I give, it says "libdb not found". What is the exact
file it is looking for?
You need to install libdb4.2 and libdb4.2-devel with:
Oliver Cromm <lispamateur@internet.uqam.ca> writes:
Also, in trying to reinstall bdb, I have problems with extconf.rb.
Whatever parameters I give, it says "libdb not found". What is the exact
file it is looking for?
You need to install libdb4.2 and libdb4.2-devel with:
Thank you; FWIW, I was missing libdb4.2-devel. But reinstalling all
Berkeley-related files didn't help me. Without change:
: $ ./extconf.rb
: ./extconf.rb: Entering directory `src'
: checking for db_version() in -ldb-4.3... no
: checking for db_version_4003() in -ldb-4.3... no
: checking for db_version() in -ldb43... no
: checking for db_version_4003() in -ldb43... no
: checking for db_version() in -ldb-4.2... no
: checking for db_version_4002() in -ldb-4.2... no
: checking for db_version() in -ldb42... no
: checking for db_version_4002() in -ldb42... no
: checking for db_version() in -ldb-4.1... no
[etc]
: extconf.rb:78: libdb not found (RuntimeError)
: from extconf.rb:64:in `catch'
: from extconf.rb:64
: ./extconf.rb: Leaving directory `src'
: $ tail -18 src/mkmf.log
: "gcc -o conftest -I/cygdrive/c/Documents and Settings/crommc/Desktop/bdb-0.5.4/
: src -I/usr/lib/ruby/1.8/i386-cygwin -I/usr/include -g -O2 conftest.c -L"/usr/
: lib" -L"/usr/lib" -lruby-static -ldb-4.2 -lcrypt "
: gcc: and: No such file or directory
: gcc: Settings/crommc/Desktop/bdb-0.5.4/src: No such file or directory
: conftest.c: In function `t':
: conftest.c:5: error: `db_version_4002' undeclared (first use in this function)
: conftest.c:5: error: (Each undeclared identifier is reported only once
: conftest.c:5: error: for each function it appears in.)
: checked program was:
: /* begin */
:
:
: /*top*/
: int main() { return 0; }
: int t() { void ((*volatile p)()); p = (void ((*)()))db_version_4002; return 0; }
: /* end */
While on the topic of Ruby-WordNet, you may want to fix a little bug
in convertdb.rb, line 183:
Where it says
if (entries % CommitThreshold).nonzero?
it should be
if (entries % CommitThreshold).zero?
The idea is to have the db commit on every 2000th record, not on every
record _but_ the 2000th ones. I went through a weekend of headaches
before I found that out ;).
You will also get a warning on line 348, where StringScanner#empty? is
obsolete (in favor of #eos?).
While on the topic of Ruby-WordNet, you may want to fix a little bug
in convertdb.rb, line 183:
Where it says
if (entries % CommitThreshold).nonzero?
it should be
if (entries % CommitThreshold).zero?
The idea is to have the db commit on every 2000th record, not on every
record _but_ the 2000th ones. I went through a weekend of headaches
before I found that out ;).
As I said in the other post, the Ruby-dbd installation went ok at home,
so I could install Ruby-WordNet, after the following detours (let's
collect them
1. Your above-mentioned patch.
2. I had to reduce CommitThreshold to 1000, before that I got a "cuold
not allocate memory" error, even after closing all other applications.
I have 192 MB on that machine.
3. I couldn't run the tests, because I didn't have Test::Unit::Mock,
although it is supposed to be included in ruby 1.8.2. Not in the cygwin
version, it seems. I could install the latest release after I changed
this line in the install.rb file:
elsif site_libdir !~ Regexp.quote(@version)
to
elsif !site_libdir =~ Regexp.quote(@version)
because it was giving me a "type mismatch: String given" error. Then all
the tests ran ok.
4. I could install the docs after changing all the references to 'css2'
in docs/makedocs.rb to 'html', because there is no css2.rb file in my
RDoc. It would be better to write scripts in a tad more flexible manner.
: $ nm /usr/lib/libdb.a | grep db_create
: U _db_create
: 0000003a T ___bam_db_create
: 00000039 T ___ham_db_create
: U _db_create
: 0000003a T ___qam_db_create
: U _db_create
: U _db_create
: U _db_create
: U _db_create
: U _db_create
: U ___bam_db_create
: U ___ham_db_create
: U ___qam_db_create
: 00000086 T _db_create
: U _db_create
: U _db_create
: U _db_create
: U _db_create
: U _db_create
: U _db_create
: $ grep db_version /usr/include/db.h
: char *db_version __P((int *, int *, int *));
> : $ grep db_version /usr/include/db.h
> : char *db_version __P((int *, int *, int *));
???
Which says: looks right?
Anyway try it with
[patch]
Thank you for your patience. Today being weekend, I tried the whole
thing at home (instead of ...), and it worked without patch. All your
questions give the same results here, so the problem should be somewhere
else.
Thank you for your patience. Today being weekend, I tried the whole
thing at home (instead of ...), and it worked without patch. All your
questions give the same results here, so the problem should be somewhere
else.