Compiling BerkeleyDB3.3.11 for Mac OS X

Find out how to get that @*&^$&@ thing to compile!

Compiling BerkeleyDB3.3.11 for Mac OS X

Postby jasont » Fri Aug 17, 2001 12:56 pm

First I'd like to thank Keith Bostic and Don Anderson from sleepycat for their support in providing this patch.

I just finished building this and it seems to work.

1) Prerequisite: The latest version of gnu tar from gnu (binary here)
-you can test your version by tar --help (it should say gnu somewhere at the bottom).
-if you have it installed an it isn't run by default run it from its install directory

2) Make the patch file (I called it mail.txt) I'm not sure how well it will post here, but I think I have it down so copy it and save it as mail.txt or whatever you want. Just use that name when patching.
<BLOCKQUOTE><font size="1" face="Verdana, Helvetica, sans-serif">code:</font><HR><pre>
*** dist/configure.orig Thu Aug 16 14:37:05 2001
--- dist/configure Thu Aug 16 14:41:15 2001
***************
*** 1260,1266 **** DB_VERSION_UNIQUE_NAME=_3003
! DB_VERSION_STRING="\"Sleepycat Software: Berkeley DB 3.3.11: (July 12, 2001)\""
# Set the default installation location.
--- 1260,1266 ----

DB_VERSION_UNIQUE_NAME=_3003
! DB_VERSION_STRING="\"Sleepycat Software: Berkeley DB 3.3.11: (August 16, 2001)\""
# Set the default installation location.
***************
*** 3678,3685 ****
# Because of shared library building, the ${CC} used for config tests
# may be different than the ${CC} we want to put in the Makefile.
# The latter is known as ${MAKEFILE_CC} in this script.
! MAKEFILE_CC=${CC}
! MAKEFILE_CCLINK="\$(CC)"
MAKEFILE_CXX="nocxx"
MAKEFILE_CXXLINK="nocxx"

--- 3678,3685 ----
# Because of shared library building, the ${CC} used for config tests
# may be different than the ${CC} we want to put in the Makefile.
# The latter is known as ${MAKEFILE_CC} in this script.
! MAKEFILE_CC="${CC}"! MAKEFILE_CCLINK="${CC}"
MAKEFILE_CXX="nocxx"
MAKEFILE_CXXLINK="nocxx"

***************
*** 4257,4264 ****
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
! MAKEFILE_CXX=${CXX}
! MAKEFILE_CXXLINK="\$(CXX)"
fi
# Do some gcc specific configuration.
--- 4257,4264 ----
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
! MAKEFILE_CXX="${CXX}"
! MAKEFILE_CXXLINK="${CXX}"
fi
# Do some gcc specific configuration.
***************
*** 8439,8457 ****
# Prevent multiple expansion
LIBTOOL="\$(SHELL) ./libtool"
- SOSUFFIX=`sed -e '/^library_names_spec=/!d' -e 's/.*\.\([a-zA-Z0-9_]*\).*/\1/' ./libtool`
SOFLAGS="-rpath \$(libdir)"
! SAVE_CC="${MAKEFILE_CC}"
! SAVE_CXX="${MAKEFILE_CXX}"
! MAKEFILE_CC="\$(LIBTOOL) --mode=compile ${SAVE_CC}"
! MAKEFILE_CXX="\$(LIBTOOL) --mode=compile ${SAVE_CXX}"
! MAKEFILE_CCLINK="\$(LIBTOOL) --mode=link ${SAVE_CC}"
! MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${SAVE_CXX}"

- SOLINK="\$(LIBTOOL) --mode=link ${SAVE_CC} -avoid-version"
INSTALLER="\$(LIBTOOL) --mode=install cp"
# Configure for shared libraries, static libraries, or both. If both are
# configured, build the utilities and example programs with shared versions.
#
--- 8439,8479 ----
# Prevent multiple expansion

LIBTOOL="\$(SHELL) ./libtool"
SOFLAGS="-rpath \$(libdir)"

! echo "$as_me:8444: checking SOSUFFIX from libtool" >&5
! echo $ECHO_N "checking SOSUFFIX from libtool... $ECHO_C" >&6
! # $library_names_spec is a snippet of shell that may
! # defined in terms of $versuffix, $release, $libname.
! # All we want is to eval it and grab the suffix used
! # for shared objects.
! versuffix=""
! release=""
! libname=libfoo
! eval library_names=\"$library_names_spec\"
! SOSUFFIX=`echo "$library_names" | sed -e 's/.*\.\([a-zA-Z0-9_]*\).*/\1/'`
! echo "$as_me:8455: result: $SOSUFFIX" >&5
! echo "${ECHO_T}$SOSUFFIX" >&6
!
! if test "$SOSUFFIX" = '' ; then
! SOSUFFIX=so
! if test "$enable_shared" = "yes"; then
! { echo "$as_me:8461: WARNING: libtool may not know about this architecture." >&5! echo "$as_me: WARNING: libtool may not know about this architecture." >&2;}
! { echo "$as_me:8463: WARNING: assuming .$SOSUFFIX suffix for dynamic libraries." >&5
! echo "$as_me: WARNING: assuming .$SOSUFFIX suffix for dynamic libraries." >&2;}
! fi
! fi

INSTALLER="\$(LIBTOOL) --mode=install cp"

+ MAKEFILE_CC="\$(LIBTOOL) --mode=compile ${MAKEFILE_CC}"
+ MAKEFILE_SOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK} -avoid-version"
+ MAKEFILE_CCLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK}"
+ MAKEFILE_CXX="\$(LIBTOOL) --mode=compile ${MAKEFILE_CXX}"
+ MAKEFILE_XSOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK} -avoid-version"
+ MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK}"
+
# Configure for shared libraries, static libraries, or both. If both are
# configured, build the utilities and example programs with shared versions.
#
***************
*** 14054,14067 ****
s,@LIBXSO_LIBS@,$LIBXSO_LIBS,;t t
s,@MAKEFILE_CC@,$MAKEFILE_CC,;t t
s,@MAKEFILE_CCLINK@,$MAKEFILE_CCLINK,;t t
s,@MAKEFILE_CXX@,$MAKEFILE_CXX,;t t
s,@MAKEFILE_CXXLINK@,$MAKEFILE_CXXLINK,;t t
s,@POSTLINK@,$POSTLINK,;t t
s,@RPC_CLIENT_OBJS@,$RPC_CLIENT_OBJS,;t t
s,@RPM_POST_INSTALL@,$RPM_POST_INSTALL,;t t
s,@RPM_POST_UNINSTALL@,$RPM_POST_UNINSTALL,;t t
s,@SOFLAGS@,$SOFLAGS,;t t
- s,@SOLINK@,$SOLINK,;t t
s,@SOSUFFIX@,$SOSUFFIX,;t t
s,@TEST_LIBS@,$TEST_LIBS,;t t
s,@db_cv_path_embedix_install@,$db_cv_path_embedix_install,;t t
--- 14076,14090 ----
s,@LIBXSO_LIBS@,$LIBXSO_LIBS,;t t
s,@MAKEFILE_CC@,$MAKEFILE_CC,;t t
s,@MAKEFILE_CCLINK@,$MAKEFILE_CCLINK,;t t
+ s,@MAKEFILE_SOLINK@,$MAKEFILE_SOLINK,;t t
s,@MAKEFILE_CXX@,$MAKEFILE_CXX,;t t
s,@MAKEFILE_CXXLINK@,$MAKEFILE_CXXLINK,;t t
+ s,@MAKEFILE_XSOLINK@,$MAKEFILE_XSOLINK,;t t
s,@POSTLINK@,$POSTLINK,;t t
s,@RPC_CLIENT_OBJS@,$RPC_CLIENT_OBJS,;t t
s,@RPM_POST_INSTALL@,$RPM_POST_INSTALL,;t t
s,@RPM_POST_UNINSTALL@,$RPM_POST_UNINSTALL,;t t
s,@SOFLAGS@,$SOFLAGS,;t t
s,@SOSUFFIX@,$SOSUFFIX,;t t
s,@TEST_LIBS@,$TEST_LIBS,;t t
s,@db_cv_path_embedix_install@,$db_cv_path_embedix_install,;t t
*** dist/configure.ac.orig Tue Jul 10 15:32:09 2001
--- dist/configure.ac Thu Aug 16 14:40:53 2001
***************
*** 50,63 ****
AC_SUBST(LIBXSO_LIBS)
AC_SUBST(MAKEFILE_CC)
AC_SUBST(MAKEFILE_CCLINK)
AC_SUBST(MAKEFILE_CXX)
AC_SUBST(MAKEFILE_CXXLINK)
AC_SUBST(POSTLINK)
AC_SUBST(RPC_CLIENT_OBJS)
AC_SUBST(RPM_POST_INSTALL)
AC_SUBST(RPM_POST_UNINSTALL)
AC_SUBST(SOFLAGS)
- AC_SUBST(SOLINK)
AC_SUBST(SOSUFFIX)
AC_SUBST(TEST_LIBS)
AC_SUBST(db_cv_path_embedix_install)
--- 50,64 ----
AC_SUBST(LIBXSO_LIBS)
AC_SUBST(MAKEFILE_CC)
AC_SUBST(MAKEFILE_CCLINK)
+ AC_SUBST(MAKEFILE_SOLINK)
AC_SUBST(MAKEFILE_CXX)
AC_SUBST(MAKEFILE_CXXLINK)
+ AC_SUBST(MAKEFILE_XSOLINK)
AC_SUBST(POSTLINK)
AC_SUBST(RPC_CLIENT_OBJS)
AC_SUBST(RPM_POST_INSTALL)
AC_SUBST(RPM_POST_UNINSTALL)
AC_SUBST(SOFLAGS)
AC_SUBST(SOSUFFIX)
AC_SUBST(TEST_LIBS)
AC_SUBST(db_cv_path_embedix_install)
***************
*** 204,211 ****
# Because of shared library building, the ${CC} used for config tests
# may be different than the ${CC} we want to put in the Makefile.
# The latter is known as ${MAKEFILE_CC} in this script.
! MAKEFILE_CC=${CC}
! MAKEFILE_CCLINK="\$(CC)"
MAKEFILE_CXX="nocxx"
MAKEFILE_CXXLINK="nocxx"

--- 205,212 ----
# Because of shared library building, the ${CC} used for config tests
# may be different than the ${CC} we want to put in the Makefile.
# The latter is known as ${MAKEFILE_CC} in this script.
! MAKEFILE_CC="${CC}"
! MAKEFILE_CCLINK="${CC}"
MAKEFILE_CXX="nocxx"
MAKEFILE_CXXLINK="nocxx"

***************
*** 226,233 ****
esac
fi
AC_PROG_CXX
! MAKEFILE_CXX=${CXX}
! MAKEFILE_CXXLINK="\$(CXX)"
fi

# Do some gcc specific configuration.
--- 227,234 ----
esac
fi
AC_PROG_CXX
! MAKEFILE_CXX="${CXX}"
! MAKEFILE_CXXLINK="${CXX}"
fi

# Do some gcc specific configuration.
***************
*** 242,259 ****
AC_PROG_LIBTOOL

LIBTOOL="\$(SHELL) ./libtool"
- SOSUFFIX=`sed -e '/^library_names_spec=/!d' -e 's/.*\.\([[a-zA-Z0-9_]]*\).*/\1/' ./libtool`
SOFLAGS="-rpath \$(libdir)"

! SAVE_CC="${MAKEFILE_CC}"
! SAVE_CXX="${MAKEFILE_CXX}"
! MAKEFILE_CC="\$(LIBTOOL) --mode=compile ${SAVE_CC}"
! MAKEFILE_CXX="\$(LIBTOOL) --mode=compile ${SAVE_CXX}"
! MAKEFILE_CCLINK="\$(LIBTOOL) --mode=link ${SAVE_CC}"
! MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${SAVE_CXX}"

- SOLINK="\$(LIBTOOL) --mode=link ${SAVE_CC} -avoid-version"
INSTALLER="\$(LIBTOOL) --mode=install cp"

# Configure for shared libraries, static libraries, or both. If both are
# configured, build the utilities and example programs with shared versions.
--- 243,278 ----
AC_PROG_LIBTOOL

LIBTOOL="\$(SHELL) ./libtool"
SOFLAGS="-rpath \$(libdir)"

! AC_MSG_CHECKING([SOSUFFIX from libtool])
! # $library_names_spec is a snippet of shell that may
! # defined in terms of $versuffix, $release, $libname.
! # All we want is to eval it and grab the suffix used
! # for shared objects.
! versuffix=""
! release=""
! libname=libfoo
! eval library_names=\"$library_names_spec\"
! SOSUFFIX=`echo "$library_names" | sed -e 's/.*\.\([[a-zA-Z0-9_]]*\).*/\1/'`
! AC_MSG_RESULT($SOSUFFIX)
!
! if test "$SOSUFFIX" = '' ; then
! SOSUFFIX=so
! if test "$enable_shared" = "yes"; then
! AC_MSG_WARN([libtool may not know about this architecture.])
! AC_MSG_WARN([assuming .$SOSUFFIX suffix for dynamic libraries.])
! fi
! fi

INSTALLER="\$(LIBTOOL) --mode=install cp"
+
+ MAKEFILE_CC="\$(LIBTOOL) --mode=compile ${MAKEFILE_CC}"
+ MAKEFILE_SOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK} -avoid-version"
+ MAKEFILE_CCLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK}"
+ MAKEFILE_CXX="\$(LIBTOOL) --mode=compile ${MAKEFILE_CXX}"
+ MAKEFILE_XSOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK} -avoid-version"
+ MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK}"
# Configure for shared libraries, static libraries, or both. If both are
# configured, build the utilities and example programs with shared versions.
*** dist/Makefile.in.orig Thu Aug 16 14:36:45 2001
--- dist/Makefile.in Thu Aug 16 14:39:37 2001
***************
*** 42,48 ****
LIBTOOL= @LIBTOOL@

POSTLINK= @POSTLINK@
! SOLINK= @SOLINK@
SOFLAGS= @SOFLAGS@
SOMAJOR= @DB_VERSION_MAJOR@ SOVERSION= @DB_VERSION_MAJOR@.@DB_VERSION_MINOR@
--- 42,48 ----
LIBTOOL= @LIBTOOL@
POSTLINK= @POSTLINK@
! SOLINK= @MAKEFILE_SOLINK@
SOFLAGS= @SOFLAGS@
SOMAJOR= @DB_VERSION_MAJOR@
SOVERSION= @DB_VERSION_MAJOR@.@DB_VERSION_MINOR@
***************
*** 76,81 ****
--- 76,82 ----
CXXFLAGS= -c $(CPPFLAGS) @CXXFLAGS@
CXX= @MAKEFILE_CXX@
CXXLINK= @MAKEFILE_CXXLINK@
+ XSOLINK= @MAKEFILE_XSOLINK@
LIBXSO_LIBS= @LIBXSO_LIBS@
libcxx= libdb_cxx.a
***************
*** 273,279 ****
$(SOLINK) $(SOFLAGS) -o $@ $(TCL_OBJS) $(C_OBJS) $(LDFLAGS) $(LIBTSO_LIBS)

$(libxso_target): $(CXX_OBJS) $(C_OBJS)
! $(SOLINK) $(SOFLAGS) -o $@ $(CXX_OBJS) $(C_OBJS) $(LDFLAGS) $(LIBXSO_LIBS)
##################################################
# Creating individual dependencies and actions for building class
--- 274,280 ----
$(SOLINK) $(SOFLAGS) -o $@ $(TCL_OBJS) $(C_OBJS) $(LDFLAGS) $(LIBTSO_LIBS)

$(libxso_target): $(CXX_OBJS) $(C_OBJS)
! $(XSOLINK) $(SOFLAGS) -o $@ $(CXX_OBJS) $(C_OBJS) $(LDFLAGS) $(LIBXSO_LIBS)
##################################################
# Creating individual dependencies and actions for building class
</pre>[/quote]

Phew..OK, here's the non ubb edited paste

<snip> I removed this, as i believe it was causing a problem, see my post below. -ob1

If that doesn't work I can either email to admin here or post to an idisk


3) Build the application:
[/CODE]
mkdir bdbuild
cd bdbuild
wget <A HREF="http://www.sleepycat.com/update/3.3.11/db-3.3.11.tar.gz" TARGET=_blank>http://www.sleepycat.com/update/3.3.11/db-3.3.11.tar.gz</A>
tar -zxvf db-3.3.11.tar.gz
cd db-3.3.11
cp /path/to/mail.txt ./
patch -bp0 < mail.txt
cd db-3.3.11/buid_unix
../dist/configure --enable-compat185
make
(make looked like it hung halfway through and I entered a couple of returns, but it continued normally)
sudo -s
make install

-Jason Trindade
jtrindade@mac.com

[ August 17, 2001: Message edited by: jasont ]

[ August 17, 2001: Message edited by: ob1 ]
jasont
 
Posts: 50
Joined: Tue Aug 14, 2001 7:00 pm
Location: Palo Alto, CA

Re: Compiling BerkeleyDB3.3.11 for Mac OS X

Postby jasont » Fri Aug 17, 2001 10:38 pm

BTW, If anyone does get it working with copy and paste can they drop a note in this forum so I know I got that nasty little format right -j
jasont
 
Posts: 50
Joined: Tue Aug 14, 2001 7:00 pm
Location: Palo Alto, CA

Re: Compiling BerkeleyDB3.3.11 for Mac OS X

Postby ob1 » Sat Aug 18, 2001 7:49 am

IF anyone feels the need to use this mail.txt file but can't get it to work simply by copy/paste, you can use this link: <A HREF="http://macosx.forked.net/mail.txt" TARGET=_blank>mail.txt</A>.

-ohbee
ob1
 
Posts: 10
Joined: Mon Aug 13, 2001 7:00 pm
Location: Wisconsin


Return to Compile Problems

Who is online

Users browsing this forum: No registered users and 6 guests

cron