I'm trying to compile the BerkeleyDB ruby extension into the ruby executable for ruby 1.8.2. I've placed the extension directory underneath the <ruby>/ext directory. When I do configure and make the build process tries to build the BerkleyDB extension but it fails because it can't find the Berkeley libraries. Normally when building this extension you have to specifiy the --with-db-dir=<db dir> parameter when running the extconf.rb file. But I cannot figure out how to pass this same information into the configure/make process for ruby. Anyone have any ideas regarding this?
RIght...I've got that part. But what I'm trying to do is compile and statically link the extension into the ruby executable itself. I've created an entry in the <ruby>/ext/Setup file for bdb so that it will try and build it when Ruby builds. When I try to make ruby it will actually try and compile the bdb extension, but without passing in the --with-db-dir parameter. I need to know how to pass this parameter through to the extconf.rb file for the bdb extension when running the make file for ruby.
Dave
···
On Jan 11, 2005, at 1:22 PM, ts wrote:
> ruby. Anyone have any ideas regarding this?
you don't need to put it into ruby-1.8.2/ext
* Install normally ruby
* extract bdb-0.5.4 *outside* the ruby directory
* then run
ruby extconf.rb --with-db-dir=...
make
make install
In Message-Id: <72066A76-63FF-11D9-AF42-000393CC7770@infoether.com>
David Craine <dave@infoether.com> writes:
actually try and compile the bdb extension, but without passing in the
--with-db-dir parameter. I need to know how to pass this parameter
through to the extconf.rb file for the bdb extension when running the
make file for ruby.
Then give the option to configure. Ruby's configure passes unknown
options to extmk.rb, which then use that options to make extension
libraries.
···
--
kjana@dm4lab.to January 12, 2005
It is never late to mend.
RIght...I've got that part. But what I'm trying to do is compile and
statically link the extension into the ruby executable itself. I've
created an entry in the <ruby>/ext/Setup file for bdb so that it will
try and build it when Ruby builds. When I try to make ruby it will
actually try and compile the bdb extension, but without passing in the
--with-db-dir parameter. I need to know how to pass this parameter
through to the extconf.rb file for the bdb extension when running the
make file for ruby.
There is a bug in extconf.rb for bdb, not really a surprise for me
Try it with
uln% cd ext
uln%
uln% tar zxf ~/ruby/perso/db/bdb-0.5.4.tar.gz
uln%