# Can't compile bdb 0.6.5 on Mac OS X Snow Leopard (10.6.1)

**URL:** <https://www.ruby-forum.com/t/cant-compile-bdb-0-6-5-on-mac-os-x-snow-leopard-10-6-1/177497>\
**Category:** Ruby\
**Created:** [October 19, 2009, 8:53am UTC](https://www.ruby-forum.com/t/cant-compile-bdb-0-6-5-on-mac-os-x-snow-leopard-10-6-1/177497 "2009-10-19T08:53:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jfoxny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a6a055/32.png) [@jfoxny](https://www.ruby-forum.com/u/jfoxny)\
**Post date:** [October 19, 2009, 8:53am UTC](https://www.ruby-forum.com/t/cant-compile-bdb-0-6-5-on-mac-os-x-snow-leopard-10-6-1/177497/1 "2009-10-19T08:53:08Z")

</div>

I’m trying to use Ruby-WordNet on my recently-Snow-Leopard-upgraded Mac,  
and I’m getting an error saying that it can’t find the bdb library:

/Library/Ruby/Site/1.8/rubygems/custom\_require.rb:31:in  
`gem_original_require': no such file to load -- bdb (LoadError) from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in`require’  
/Library/Ruby/Gems/1.8/gems/wordnet-0.0.5/lib/wordnet/lexicon.rb:34  
[snip]

Predictably, line 34 of lexicon.rb says:  
34 require ‘bdb’

I used porticus to install the macports package for rb-bdb, and it says  
I have 0.6.5\_0 installed:

$ port -v activate rb-bdb@0.6.5\_0  
Port command started with PID 93833  
Activating rb-bdb @0.6.5\_0  
Error: port activate failed: Image error: rb-bdb @0.6.5\_0 is already  
active.

I can see a bdb.bundle file installed:  
cto@bigmac-2 (722) $ ls -l  
opt/local/lib/ruby/vendor\_ruby/1.8/i686-darwin10/bdb.bundle  
-rwxr-xr-x 2 root admin 218168 Oct 18 22:08  
opt/local/lib/ruby/vendor\_ruby/1.8/i686-darwin10/bdb.bundle

…but I can’t find a bdb.rb ruby library anywhere that would satisfy  
the require.

Just for kicks, I tried to download the bdb source after installing the  
port, and running ruby extconf.rb. It errors with “extconf.rb:90: libdb  
not found (RuntimeError)” Then “make” gives me this:

cto@bigmac-2 (727) (master) $ make  
make[1]: \*\*\* No rule to make target `ruby.h', needed by`bdb.o’. Stop.

So no luck with the macport and no luck with compiling. Does anyone have  
experience with this problem? Any help or suggestions would be greatly  
appreciated!

Many thanks!

-Jason

---

<div class="post-metadata">

**Author:** ![jfoxny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a6a055/32.png) [@jfoxny](https://www.ruby-forum.com/u/jfoxny)\
**Post date:** [October 19, 2009, 9:38am UTC](https://www.ruby-forum.com/t/cant-compile-bdb-0-6-5-on-mac-os-x-snow-leopard-10-6-1/177497/2 "2009-10-19T09:38:13Z")

</div>

On Oct 18, 2009, at 11:53 PM, Jason Fr wrote:

> I can see a bdb.bundle file installed:  
> cto@bigmac-2 (722) $ ls -l  
> opt/local/lib/ruby/vendor\_ruby/1.8/i686-darwin10/bdb.bundle  
> -rwxr-xr-x 2 root admin 218168 Oct 18 22:08  
> opt/local/lib/ruby/vendor\_ruby/1.8/i686-darwin10/bdb.bundle

/opt/local/lib/ruby/\* directories are not in Ruby’s library path by  
default. You’ll have to add those directories to your RUBYLIB  
environment variable.

> Just for kicks, I tried to download the bdb source after installing  
> the  
> port, and running ruby extconf.rb. It errors with “extconf.rb:90:  
> libdb  
> not found (RuntimeError)” Then “make” gives me this:
> 
> cto@bigmac-2 (727) (master) $ make  
> make[1]: \*\*\* No rule to make target `ruby.h', needed by`bdb.o’.  
> Stop.

After upgrading to SnowLeopard you need to reinstall the Developer  
Tools to get ruby.h and friends.

Cheers,

Josh
