cdb on Mac OS X

Finn Smith <[email protected]> Fri, 2 Jan 2004 15:54:10 -0500
Newsgroups gmane.comp.djb.cdb
Message-ID <[email protected]>
Hi,

I was wondering if anyone has had any success installing and running 
cdb on Mac OS X (I'm running Panther: 10.3.2). I have poked around a 
fair amount on the web/usenet but haven't found any web pages or posts 
detailing anyone's success in doing so.

Downloading and going through the standard install process of cdb it 
built and installed fine. I am able to read data out of the test db 
crated from the /etc/services file:

% ./cdbget smtp/tcp < test.cdb && echo ''
25
% ./cdbget @25/tcp < test.cdb && echo ''
smtp

However, running cdbtest and cdbstats results in errors concerning 
truncated files. e.g.

% ./cdbtest < test.cdb
cdbtest: fatal: unable to read input: truncated file
% ./cdbstats < test.cdb
cdbstats: fatal: unable to read input: truncated file

I've been unable to find any information on the web about these error 
messages and what they are caused by. Any help or advice would be 
appreciated.

Thanks,
Finn

Last Minute Addendum: I just found the GNU-Darwin cdb package 
(http://www.gnu-darwin.org/). Maybe I can get that to work.