cant find -ldb-4.4 when running make, on mac os x.

12 views
Skip to first unread message

rubymaverick

unread,
Oct 14, 2007, 12:36:57 PM10/14/07
to dbslayer, install, need
Installing on Mac OS X (10.4.10):
gcc version 4.0.1 (Apple Computer, Inc. build 5363)

my PATH="/opt/local/bin:/opt/local/sbin:/opt/local/lib/mysql5:/usr/
local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin"

I used MacPorts to install binaries. Here are my installed ports

apr @1.2.11_0 (active)
apr-util @1.2.10_0 (active)
autoconf @2.61_1 (active)
automake @1.10_0 (active)
bzip2 @1.0.4_1 (active)
db44 @4.4.20_1+darwin_8 (active)
expat @2.0.1_0 (active)
gettext @0.16.1_0 (active)
gzip @1.3.12_0+darwin_8 (active)
libiconv @1.11_6+darwin_8 (active)
libtool @1.5.24_1 (active)
libxml2 @2.6.30_0 (active)
m4 @1.4.10_1 (active)
mysql5 @5.0.45_3+darwin_8+server (active)
ncurses @5.6_0+darwin_8 (active)
ncursesw @5.6_0+darwin_8 (active)
neon @0.26.4_0 (active)
openssl @0.9.8e_0+darwin_8 (active)
p5-locale-gettext @1.05_0 (active)
perl5.8 @5.8.8_0+darwin_8 (active)
pkgconfig @0.22_0 (active)
rb-mysql @2.7.3_1 (active)
rb-rubygems @0.9.4_0 (active)
readline @5.2.007_0 (active)
ruby @1.8.6_0+thread_hooks (active)
sqlite3 @3.4.2_1+darwin_8 (active)
subversion @1.4.5_0+tools (active)
tiff @3.8.2_1+darwin_8+macosx (active)
XFree86 @4.7.0_0+macosx (active)
zlib @1.2.3_1 (active)

This is what I get when trying to install:

./configure --with-mysql-config=/opt/local/bin/mysql_config5

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for apr-1-config... /opt/local/bin/apr-1-config
checking for APR CFLAGS... -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -
no-cpp-precomp
checking for APR includes... -I/opt/local/include/apr-1
checking for APR libraries... -L/opt/local/lib -lapr-1 -lpthread
checking for apu-1-config... /opt/local/bin/apu-1-config
checking for APR Utility includes... -I/opt/local/include/apr-1 -I/
opt/local/include
checking for APR Utility libraries... -L/opt/local/lib -laprutil-1 -
ldb-4.4 -lsqlite3 -lexpat -liconv
checking for MySQL CFLAGS... -I/opt/local/include/mysql5/mysql
checking for MySQL includes... -I/opt/local/include/mysql5/mysql
checking for MySQL libraries... -L/opt/local/lib -L/opt/local/lib/
mysql5/mysql -lmysqlclient_r -L/opt/local/lib -lz -lm -L/opt/local/
lib -lssl -lcrypto
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for working volatile... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for working strtod... yes
checking for memset... yes
checking for pow... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strstr... yes
checking for strtol... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating common/Makefile
config.status: creating db/Makefile
config.status: creating server/Makefile
config.status: executing depfiles commands

That seems to work fine, but when I run make it breaks. It looks like
it cant locate -ldb-4.4, which is a part of the APR utility libraries:

checking for APR Utility libraries... -L/opt/local/lib -laprutil-1 -
ldb-4.4 -lsqlite3 -lexpat -liconv

This is the output at the end of make:

gcc -I/opt/local/include/mysql5/mysql -DDARWIN -
DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I../include -I/opt/
local/include/mysql5/mysql -I/opt/local/include/apr-1 -I/opt/local/
include/apr-1 -I/opt/local/include -g -O2 -o dbslayer dbslayer.o
dbslayer_logging.o dbslayer_stats.o -L../common -lsimplejson -L../db -
ldbaccess -L/opt/local/lib -laprutil-1 -ldb-4.4 -lsqlite3 -lexpat -
liconv -L/opt/local/lib -lapr-1 -lpthread -L/opt/local/lib -L/opt/
local/lib/mysql5/mysql -lmysqlclient_r -L/opt/local/lib -lz -lm -L/
opt/local/lib -lssl -lcrypto
/usr/bin/ld: can't locate file for: -ldb-4.4
collect2: ld returned 1 exit status
make[1]: *** [dbslayer] Error 1
make: *** [all-recursive] Error 1

At this point im not sure what to do. I looked in /opt/local/lib and
there is no db-4.4 lib. I did find this:

:/opt/local/lib/db44 $ ls
libdb-4.4.a libdb-4.4.la
libdb.dylib libdb_cxx-4.4.dylib libdb_cxx-4.dylib
libdb-4.4.dylib libdb-4.dylib
libdb_cxx-4.4.a libdb_cxx-4.4.la libdb_cxx.dylib

Not sure if that will help or makes a difference. I'm stuck guys, any
suggestions?

Michael Welles

unread,
Oct 15, 2007, 5:11:30 PM10/15/07
to dbsl...@googlegroups.com, eric...@gmail.com
Eric:

I just managed to get a build of dbslayer on my OSX box. My
environment is a little bit different, I'm using fink and created my
own builds of APR and APU, but I ran into the same issues as you, and
also one new one that required a patch (which I've committed now).

The .dylib issue I had was that configure coudln't find the apr libs
under /usr/local/apr/lib

Setting this before build fixed:

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/apr/lib

In your case, you'll need change the /usr/local/apr lib to
/opt/local/lib/db and keep adding the respective subdirs as failures
happen.

After that, though I ran into a darwin specific issue in the source. I
got it to build and committed the fix.

So you'll need to grab the latest source from subversion:

svn co http://code.nytimes.com/dbslayer/trunk

If you have any more troubles, let me know.

Thanks,

Mike

rubymaverick

unread,
Oct 15, 2007, 11:05:02 PM10/15/07
to dbslayer
Mike, thanks for the reply man, much appreciated. I think I may be
doing something wrong though, because after following your directions
im getting the same exact problem.

On Oct 15, 5:11 pm, "Michael Welles" <mlwel...@gmail.com> wrote:
> Eric:
>
> I just managed to get a build of dbslayer on my OSX box. My
> environment is a little bit different, I'm using fink and created my
> own builds of APR and APU, but I ran into the same issues as you, and
> also one new one that required a patch (which I've committed now).
>
> The .dylib issue I had was that configure coudln't find the apr libs
> under /usr/local/apr/lib
>
> Setting this before build fixed:
>
> export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/apr/lib
>
> In your case, you'll need change the /usr/local/apr lib to
> /opt/local/lib/db and keep adding the respective subdirs as failures
> happen.

I dont have an /opt/local/lib/db directory, only an /opt/local/lib/
db44 directory these libs:

libdb-4.4.a libdb-4.4.la
libdb.dylib libdb_cxx-4.4.dylib libdb_cxx-4.dylib
libdb-4.4.dylib libdb-4.dylib
libdb_cxx-4.4.a libdb_cxx-4.4.la libdb_cxx.dylib

I tried this:

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/local/lib/db44

and

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/local/lib/db

also, your export was /usr/local/apr/lib, and i couldn't find anything
similar for darwin ports, eg: /opt/local/apr/lib

Thanks for the help!

>
> After that, though I ran into a darwin specific issue in the source. I
> got it to build and committed the fix.
>
> So you'll need to grab the latest source from subversion:
>

> svn cohttp://code.nytimes.com/dbslayer/trunk


>
> If you have any more troubles, let me know.
>
> Thanks,
>
> Mike

Michael Welles

unread,
Oct 16, 2007, 10:57:02 AM10/16/07
to dbsl...@googlegroups.com, eric...@gmail.com
Eric:

Can you give it one more try? But this time, can you run script
before starting and send me the logfile it produces? A-la:

------
mike@hotplate:dbslayer> /usr/bin/script buildlog.txt
Script started, output file is buildlog.txt
-------

When you hit the failure during the build, hit C-d to exit script.

Oh, and while script is running can you run /usr/bin/env so that I
can see what your environment looks like in the log?

Thanks,
Mike

Reply all
Reply to author
Forward
0 new messages