On 09 Jun 2001 10:15:07 +0000, Yosi wrote: > Hello, > > I have downloaded the latest (200106080800) snapshot evolution source > rpm and wanted to compile it on my machine. However, the configuration > script claims it cannot find libdb 3.1.17 libraries. I looked inside > the configure script and saw that the script is looking for the static > library (namely the ".a") and not the shared library. So I turned to > the package redhat has, and it does not provide a static library. > A quick search on rpmfind.net confirmed that no distribution (except > Polished Linux) provides the static library. Any ideas on how to solve > this problem? > Yes. The problem lies in the fact that you cannot compile static and shared libraries at the same time, with db3 (it's in the documentation that way, and my experience has proven the documentation correct. Hmph. go figure...). Anyhow, you need to compile/install the --enable-static db3, and then compile/install the --enable-shared db3. Then, you need to create a symlink libdb3.so ---> libdb-3.1.so. It would have been much simpler had Evolution just used the shared libdb-3 libraries. I played with it all day today, and finally figured out what needed to be done to get Evolution to compile. It was really frustrating, but persistence paid off. Also, remember that you need to do a "db_dump185 addressbook.db | db_load addressbooknew.db" and copy/backup as appropriate. I've attached the spec file I used to compile db-3. Please read it and make sure it won't cause conflicts with other db libraries on your system. It works for me, but no guarantees/warranties. Also get the db-3 tarball from sleepycat. DO NOT USE THE TARBALL FROM THE REDHAT-7.1 SRPM!!!! It's md5sum is different from sleepycat's, and I found a few compile-time errors that are not in sleepycat's. Not sure what RH is trying to pull on us.... Pull out the --enable-java and/or --enable-tcl options if you don't have java or tcl installed, before building. Also, adjust the DB185INC stuff in the spec file as appropriate. This is just an offering in hopes it may help someone--it's not official or anything like that. As I said before, it works for me. YMMV. Good luck, ciao. -- Matthew Vanecek perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);' ******************************************************************************** For 93 million miles, there is nothing between the sun and my shadow except me. I'm always getting in the way of something...
# compatibility with legacy rpm %{!?_lib:%define _lib lib} %define __s -s %define __soversion 3.1 %define _libdb_a libdb-%{__soversion}.a %define _libcxx_a libdb_cxx-%{__soversion}.a Summary: The Berkeley DB database library for C. Name: db3 Version: 3.1.17 Release: 900 Source: http://www.sleepycat.com/update/%{version}/db-%{version}.tar.gz URL: http://www.sleepycat.com/ License: BSDish Group: System Environment/Libraries %ifos linux # XXX written as a file prereq in order to build with glibc-2.1.3 BuildPreReq: /usr/lib/libdb1.a %endif BuildPreReq: findutils, perl, tcl BuildRoot: %{_tmppath}/%{name}-root Prefix: %{_prefix} %description The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. Berkeley DB is used by many applications, including Python and Perl, so this should be installed on all systems. %package utils Summary: Command line tools for managing Berkeley DB databases. Group: Applications/Databases Requires: db3 = %{version} Prefix: %{_prefix} %description utils The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. Berkeley DB includes B+tree, Extended Linear Hashing, Fixed and Variable-length record access methods, transactions, locking, logging, shared memory caching and database recovery. DB supports C, C++, Java and Perl APIs. This package contains command line tools for managing Berkeley DB databases. %package devel Summary: Development libraries/header files for the Berkeley DB library. Group: System Environment/Libraries Requires: db3 = %{version} Prefix: %{_prefix} %description devel The Berkeley Database (Berkeley DB) is a programmatic toolkit that provides embedded database support for both traditional and client/server applications. Berkeley DB includes B+tree, Extended Linear Hashing, Fixed and Variable-length record access methods, transactions, locking, logging, shared memory caching and database recovery. DB supports C, C++, Java and Perl APIs. This package contains the header files, libraries, and documentation for building programs which use Berkeley DB. %prep %setup -q -n db-%{version} # fixup doc paths find docs -name "*.html" | xargs perl -p -i -e 's,="images/,="../%{name}-%{version}/images/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./images/,="../../%{name}-%{version}/images/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./\.\./images/,="../../../%{name}-%{version}/images/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="api_c/,="../%{name}-devel-%{version}/api_c/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./api_c/,="../../%{name}-devel-%{version}/api_c/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./\.\./api_c/,="../../../%{name}-devel-%{version}/api_c/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="api_cxx/,="../%{name}-devel-%{version}/api_cxx/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./api_cxx/,="../../%{name}-devel-%{version}/api_cxx/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./\.\./api_cxx/,="../../../%{name}-devel-%{version}/api_cxx/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="api_java/,="../%{name}-devel-%{version}/api_java/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./api_java/,="../../%{name}-devel-%{version}/api_java/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./\.\./api_java/,="../../../%{name}-devel-%{version}/api_java/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="api_tcl/,="../%{name}-devel-%{version}/api_tcl/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./api_tcl/,="../../%{name}-devel-%{version}/api_tcl/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./\.\./api_tcl/,="../../../%{name}-devel-%{version}/api_tcl/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="examples_c/,="../%{name}-devel-%{version}/examples_c/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./examples_c/,="../../%{name}-devel-%{version}/examples_c/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./\.\./examples_c/,="../../../%{name}-devel-%{version}/examples_c/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="examples_cxx/,="../%{name}-devel-%{version}/examples_cxx/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./examples_cxx/,="../../%{name}-devel-%{version}/examples_cxx/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./\.\./examples_cxx/,="../../../%{name}-devel-%{version}/examples_cxx/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="ref/,="../%{name}-devel-%{version}/ref/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./ref/,="../../%{name}-devel-%{version}/ref/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./\.\./ref/,="../../../%{name}-devel-%{version}/ref/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="sleepycat/,="../%{name}-devel-%{version}/sleepycat/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./sleepycat/,="../../%{name}-devel-%{version}/sleepycat/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./\.\./sleepycat/,="../../../%{name}-devel-%{version}/sleepycat/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="utility/,="../%{name}-utils-%{version}/utility/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./utility/,="../../%{name}-utils-%{version}/utility/,g' find docs -name "*.html" | xargs perl -p -i -e 's,="\.\./\.\./utility/,="../../../%{name}-utils-%{version}/utility/,g' chmod -R a+w * cd dist sed -e 's|\(DB185INC=[[:space:]]-c\)|\1 -I/usr/include/db1 |g' Makefile.in > Makefile.2 sed -e 's|\(DB185LIB=\)|\1 -L/usr/lib -ldb1|g' Makefile.2 > Makefile.in %build rm -rf $RPM_BUILD_ROOT cd build_unix CFLAGS="$RPM_OPT_FLAGS" ../dist/configure --prefix=/usr \ --enable-compat185 --enable-dump185 \ --enable-static\ --enable-rpc --enable-cxx \ --enable-test make CFLAGS="$RPM_OPT_FLAGS" ../dist/configure --prefix=/usr \ --enable-compat185 --enable-dump185 \ --enable-shared --enable-static\ --enable-rpc --enable-tcl --enable-cxx \ --enable-test --enable-java --enable-dynamic make # remove dangling tags symlink from examples. rm -f examples_cxx/tags rm -f examples_c/tags %install cd build_unix make prefix=$RPM_BUILD_ROOT/%{prefix} install install_static install_static_cxx # XXX annoying set -x ( cd ${RPM_BUILD_ROOT} mkdir -p .%{_includedir}/db3 mv .%{_prefix}/include/*.h .%{_includedir}/db3 ln -sf db3/db.h .%{_includedir}/db.h cd usr/lib && ln -sf libdb-%{__soversion}.so libdb3.so # ln -sf ../../lib/libdb-%{__soversion}.so .%{_libdir}/libdb-%{__soversion}.so ) set +x %clean rm -rf ${RPM_BUILD_ROOT} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) %doc LICENSE README docs/images %{prefix}/lib/libdb-*.so* %{prefix}/lib/libdb_cxx*.so* %files utils %defattr(-,root,root) %doc docs/utility %{prefix}/lib/libdb_tcl*.so* %{prefix}/lib/libdb_java*.so* %{prefix}/bin/berkeley_db_svc %{prefix}/bin/db*_archive %{prefix}/bin/db*_checkpoint %{prefix}/bin/db*_deadlock %{prefix}/bin/db*_dump %{prefix}/bin/db*_dump185 %{prefix}/bin/db*_load %{prefix}/bin/db*_printlog %{prefix}/bin/db*_recover %{prefix}/bin/db*_stat %{prefix}/bin/db*_upgrade %{prefix}/bin/db*_verify %files devel %defattr(-,root,root) %doc docs/api_c docs/api_cxx docs/api_java docs/api_tcl docs/index.html %doc docs/ref docs/sleepycat %doc examples_c examples_cxx %{_libdir}/libdb*a %{_libdir}/libdb.so %{_libdir}/libdb3* %{_includedir}/db3/db.h %{_includedir}/db3/db_185.h %{_includedir}/db3/db_cxx.h %{_includedir}/db.h