Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Tue, 17 Jul 2001 14:07:16 -0400 From: Jason Tishler To: "Charles S. Wilson" Cc: cygwin AT cygwin DOT com Subject: Re: rpm 4.0.2 Build Problem (was Re: Installing Berkeley DB 3.2.9) Message-ID: <20010717140716.Q614@dothill.com> Mail-Followup-To: "Charles S. Wilson" , cygwin AT cygwin DOT com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="6L2EPva9W2bQJ8yb" Content-Disposition: inline In-Reply-To: <3B5384C0.903@ece.gatech.edu> User-Agent: Mutt/1.3.18i Organization: Dot Hill Systems Corp. --6L2EPva9W2bQJ8yb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Chuck, On Mon, Jul 16, 2001 at 08:20:16PM -0400, Charles S. Wilson wrote: > Jason Tishler wrote > > I followed your advice and read the spec file from the Red Hat db 3.2.9 > > RPM. I used the information gleaned to post process make install to > > match the harmonization mentioned above. Then I reran configure on rpm. > > Finally, after some head banging I managed to "build" rpm. > > Wow. That's great -- and a lot of work, I'll bet. Actually, it was too bad -- it was a piece of cake compared to my Python work. I didn't even need any aspirin this time. OK, maybe my head is just getting harder... :,) > Muchas gracias. You are very welcome. > > I will > > entertain posting a patch once I figure out the right way to correct all > > of the issue. I guess that it is time to learn automake. Sigh... > > See the goat book: http://sources.redhat.com/autobook/ if you haven't > already done so. Chapter 25: Using GNU Autotools with Cygnus Cygwin is > especially interesting (if slightly out-of-date (*)). Thanks for reminding me about the above. I read most of the Cygwin sections before (when Gary first announced it) and I just reread the relevant sections again today. See attached for a patch that enables rpm 4.0.2 to build under the latest Cygwin. The procedure to apply the patch and build is as follows: $ # save the attachment to /tmp/rpm-4.0.2.patch $ wget -nd -P /tmp ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-4.0.2.tar.gz $ tar -xzf /tmp/rpm-4.0.2.tar.gz $ cd rpm-4.0.2 $ patch -p1 /include/db.h -> db3/db.h drwxr-xr-x /include/db3/ -r--r--r-- /include/db3/db.h -r--r--r-- /include/db3/db_185.h -r--r--r-- /include/db3/db_cxx.h drwxr-xr-x /lib/ -r--r--r-- /lib/libdb-3.1.a I am most unhappy about #2, do you (or anyone else) know what is awry? Also, would you (or anyone else) be interested in critiquing my patch? My biggest concern is with the tools/Makefile.am hunk -- maybe this should be conditional for Cygwin only? I'm willing to submit the patch for consideration once I get some feedback and some the above issues are resolved or dismissed. Thanks, Jason -- Jason Tishler Director, Software Engineering Phone: 732.264.8770 x235 Dot Hill Systems Corp. Fax: 732.264.8798 82 Bethany Road, Suite 7 Email: Jason DOT Tishler AT dothill DOT com Hazlet, NJ 07730 USA WWW: http://www.dothill.com --6L2EPva9W2bQJ8yb Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="rpm-4.0.2.patch" diff -upr rpm-4.0.2.orig/configure.in rpm-4.0.2/configure.in --- rpm-4.0.2.orig/configure.in Sun Feb 25 12:13:26 2001 +++ rpm-4.0.2/configure.in Tue Jul 17 10:39:07 2001 @@ -45,6 +45,7 @@ if test X"$GCC" = Xyes ; then *-*-solaris*) LDFLAGS_STATIC="-static";; *-*-hpux*) LDFLAGS_STATIC="-static";; *-*-sysv5uw*) LDFLAGS_STATUS="-static";; # Unixware has no shared libthread. + *-*-cygwin*) LDFLAGS_STATIC="";; # static linking on Cygwin is bad! *-*-*) LDFLAGS_STATIC="-all-static";; esac elif test X"$CC" = Xcc ; then @@ -398,6 +399,9 @@ done AC_CHECK_FUNC(fork, [], [echo "using vfork() instead of fork()"; LIBOBJS=fakefork.o]) + +AC_CHECK_FUNC(errx, [], [echo "using included err.c"; + LIBOBJS="$LIBOBJS err.o"]) dnl AmigaOS and IXEmul have a fork() dummy case "$target" in diff -upr rpm-4.0.2.orig/lib/db3.c rpm-4.0.2/lib/db3.c --- rpm-4.0.2.orig/lib/db3.c Wed Feb 14 19:16:09 2001 +++ rpm-4.0.2/lib/db3.c Mon Jul 16 14:07:30 2001 @@ -135,7 +135,7 @@ static int db_fini(dbiIndex dbi, const c xx = db_env_create(&dbenv, 0); xx = cvtdberr(dbi, "db_env_create", rc, _debug); -#if DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR == 1 +#if DB_VERSION_MAJOR == 3 && (DB_VERSION_MINOR == 1 || DB_VERSION_MINOR == 2) xx = dbenv->remove(dbenv, dbhome, 0); #else xx = dbenv->remove(dbenv, dbhome, NULL, 0); @@ -213,7 +213,7 @@ static int db_init(dbiIndex dbi, const c /* dbenv->set_tx_max(???) */ /* dbenv->set_tx_recover(???) */ if (dbi->dbi_no_fsync) { -#if DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR == 1 +#if DB_VERSION_MAJOR == 3 && (DB_VERSION_MINOR == 1 || DB_VERSION_MINOR == 2) xx = db_env_set_func_fsync(db3_fsync_disable); #else xx = dbenv->set_func_fsync(dbenv, db3_fsync_disable); @@ -231,7 +231,7 @@ static int db_init(dbiIndex dbi, const c #endif /* __USE_DB3 */ #if defined(__USE_DB3) -#if DB_VERSION_MAJOR == 3 && DB_VERSION_MINOR == 1 +#if DB_VERSION_MAJOR == 3 && (DB_VERSION_MINOR == 1 || DB_VERSION_MINOR == 2) rc = dbenv->open(dbenv, dbhome, eflags, dbi->dbi_perms); #else rc = dbenv->open(dbenv, dbhome, NULL, eflags, dbi->dbi_perms); diff -upr rpm-4.0.2.orig/tools/Makefile.am rpm-4.0.2/tools/Makefile.am --- rpm-4.0.2.orig/tools/Makefile.am Mon Dec 11 13:41:27 2000 +++ rpm-4.0.2/tools/Makefile.am Tue Jul 17 11:14:32 2001 @@ -31,6 +31,7 @@ pkgbin_PROGRAMS = javadeps rpmsort_SOURCES = rpmsort.c rpmsort_LDFLAGS = +rpmsort_LDADD = $(myLDADD) @LIBMISC@ javadeps_SOURCES = javadeps.c diff -upr rpm-4.0.2.orig/tools/rpmsort.c rpm-4.0.2/tools/rpmsort.c --- rpm-4.0.2.orig/tools/rpmsort.c Wed Dec 6 18:30:16 2000 +++ rpm-4.0.2/tools/rpmsort.c Mon Jul 16 14:20:10 2001 @@ -6,6 +6,7 @@ #include "depends.h" #include "header.h" #include "debug.h" +#include "err.h" extern int _depends_debug; --6L2EPva9W2bQJ8yb Content-Type: text/plain; charset=us-ascii -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ --6L2EPva9W2bQJ8yb--