All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch 1/1] CLD: fix crash in __mutex_get_max (libdb-4.7.so) on F13
@ 2009-11-30  1:17 Pete Zaitcev
  2009-11-30  1:38 ` Jeff Garzik
  2009-11-30 13:34 ` Jeff Garzik
  0 siblings, 2 replies; 6+ messages in thread
From: Pete Zaitcev @ 2009-11-30  1:17 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Project Hail List

Fedora 13 comes with db4.8 and apparently the compat-db4.7 is bust.
Let us link with 4.8 as a workaround.

Signed-Off-By: Pete Zaitcev <zaitcev@redhat.com>

---
 configure.ac |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Not sure how safe or desirable this is, but it seems to work.

commit 77e89dfc8f0a9296ebfb02d5ca34d48f083df50c
Author: Master <zaitcev@hitlain.zaitcev.lan>
Date:   Sun Nov 29 18:12:40 2009 -0700

    Fix crash in __mutex_get_max because db4.7 is toast on F13
    by letting to link against db4.8.

diff --git a/configure.ac b/configure.ac
index b1247b6..aec971f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,11 +73,12 @@ dnl AC_TYPE_PID_T
 dnl -----------------------------
 dnl Checks for required libraries
 dnl -----------------------------
-AC_CHECK_LIB(db-4.7, db_create, DB4_LIBS=-ldb-4.7,
+AC_CHECK_LIB(db-4.8, db_create, DB4_LIBS=-ldb-4.8,
+	AC_CHECK_LIB(db-4.7, db_create, DB4_LIBS=-ldb-4.7,
 	AC_CHECK_LIB(db-4.6, db_create, DB4_LIBS=-ldb-4.6,
 	AC_CHECK_LIB(db-4.5, db_create, DB4_LIBS=-ldb-4.5,
 	AC_CHECK_LIB(db-4.4, db_create, DB4_LIBS=-ldb-4.4,
-	AC_CHECK_LIB(db-4.3, db_create, DB4_LIBS=-ldb-4.3, exit 1)))))
+	AC_CHECK_LIB(db-4.3, db_create, DB4_LIBS=-ldb-4.3, exit 1))))))
 AC_CHECK_LIB(argp, argp_parse, ARGP_LIBS=-largp)
 AC_CHECK_LIB(crypto, MD5_Init, CRYPTO_LIBS=-lcrypto)
 AC_CHECK_LIB(resolv, ns_initparse, RESOLV_LIBS=-lresolv)

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Patch 1/1] CLD: fix crash in __mutex_get_max (libdb-4.7.so) on F13
  2009-11-30  1:17 [Patch 1/1] CLD: fix crash in __mutex_get_max (libdb-4.7.so) on F13 Pete Zaitcev
@ 2009-11-30  1:38 ` Jeff Garzik
  2009-11-30  2:05   ` Pete Zaitcev
  2009-12-02  1:18   ` Pete Zaitcev
  2009-11-30 13:34 ` Jeff Garzik
  1 sibling, 2 replies; 6+ messages in thread
From: Jeff Garzik @ 2009-11-30  1:38 UTC (permalink / raw)
  To: Pete Zaitcev; +Cc: Project Hail List

On 11/29/2009 08:17 PM, Pete Zaitcev wrote:
> Fedora 13 comes with db4.8 and apparently the compat-db4.7 is bust.
> Let us link with 4.8 as a workaround.
>
> Signed-Off-By: Pete Zaitcev<zaitcev@redhat.com>
>
> ---
>   configure.ac |    5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> Not sure how safe or desirable this is, but it seems to work.
>
> commit 77e89dfc8f0a9296ebfb02d5ca34d48f083df50c
> Author: Master<zaitcev@hitlain.zaitcev.lan>
> Date:   Sun Nov 29 18:12:40 2009 -0700
>
>      Fix crash in __mutex_get_max because db4.7 is toast on F13
>      by letting to link against db4.8.

Interesting...  I recall the root cause clearly, now:  /usr/include/db.h 
always refers to the latest installed db4, even if compat-db{,45,46} is 
installed.  Our configure recipe links with the most recent db4 listed 
in configure.ac, combined with the installed /usr/include/db.h.  Thus, 
each new db4 version produces a mismatch.

If we could include /usr/include/db4.6.21/db.h when db-4.6 is present, 
that would be ideal.  But given that db4 lacks anything approaching 
pkgconfig, autodetection becomes quite difficult.

While I would like to see configure.ac have a better test (surely Google 
can find an autoconf recipe for db4?), I think your proposed patch will 
be the best method we can find.

	Jeff


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch 1/1] CLD: fix crash in __mutex_get_max (libdb-4.7.so) on F13
  2009-11-30  1:38 ` Jeff Garzik
@ 2009-11-30  2:05   ` Pete Zaitcev
  2009-12-02  1:18   ` Pete Zaitcev
  1 sibling, 0 replies; 6+ messages in thread
From: Pete Zaitcev @ 2009-11-30  2:05 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Project Hail List

On Sun, 29 Nov 2009 20:38:45 -0500, Jeff Garzik <jeff@garzik.org> wrote:
> On 11/29/2009 08:17 PM, Pete Zaitcev wrote:

> > Fedora 13 comes with db4.8 and apparently the compat-db4.7 is bust.
> > Let us link with 4.8 as a workaround.

> Interesting...  I recall the root cause clearly, now:  /usr/include/db.h 
> always refers to the latest installed db4, even if compat-db{,45,46} is 
> installed.  Our configure recipe links with the most recent db4 listed 
> in configure.ac, combined with the installed /usr/include/db.h.  Thus, 
> each new db4 version produces a mismatch.

Aww, I didn't realize how it worked. Could you add this to the commit
message, in case?

-- Pete

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch 1/1] CLD: fix crash in __mutex_get_max (libdb-4.7.so) on F13
  2009-11-30  1:17 [Patch 1/1] CLD: fix crash in __mutex_get_max (libdb-4.7.so) on F13 Pete Zaitcev
  2009-11-30  1:38 ` Jeff Garzik
@ 2009-11-30 13:34 ` Jeff Garzik
  1 sibling, 0 replies; 6+ messages in thread
From: Jeff Garzik @ 2009-11-30 13:34 UTC (permalink / raw)
  To: Pete Zaitcev; +Cc: Project Hail List

On 11/29/2009 08:17 PM, Pete Zaitcev wrote:
> Fedora 13 comes with db4.8 and apparently the compat-db4.7 is bust.
> Let us link with 4.8 as a workaround.
>
> Signed-Off-By: Pete Zaitcev<zaitcev@redhat.com>
>
> ---
>   configure.ac |    5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> Not sure how safe or desirable this is, but it seems to work.
>
> commit 77e89dfc8f0a9296ebfb02d5ca34d48f083df50c
> Author: Master<zaitcev@hitlain.zaitcev.lan>
> Date:   Sun Nov 29 18:12:40 2009 -0700
>
>      Fix crash in __mutex_get_max because db4.7 is toast on F13
>      by letting to link against db4.8.

applied, with updated commit message.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch 1/1] CLD: fix crash in __mutex_get_max (libdb-4.7.so) on F13
  2009-11-30  1:38 ` Jeff Garzik
  2009-11-30  2:05   ` Pete Zaitcev
@ 2009-12-02  1:18   ` Pete Zaitcev
  2009-12-02 10:40     ` Jeff Garzik
  1 sibling, 1 reply; 6+ messages in thread
From: Pete Zaitcev @ 2009-12-02  1:18 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Project Hail List

On Sun, 29 Nov 2009 20:38:45 -0500
Jeff Garzik <jeff@garzik.org> wrote:

> Interesting...  I recall the root cause clearly, now:  /usr/include/db.h 
> always refers to the latest installed db4, even if compat-db{,45,46} is 
> installed.  Our configure recipe links with the most recent db4 listed 
> in configure.ac, combined with the installed /usr/include/db.h.  Thus, 
> each new db4 version produces a mismatch.

I solicited suggestions on a blog, and someone asked why we don't
use db without specific version. I assumed we do it so we don't
get linked with something ancient like db3. Is that so? If yes,
how about something like this:

--- a/configure.ac
+++ b/configure.ac
@@ -76,13 +76,11 @@ dnl -----------------------------
 AC_CHECK_LIB(pcre, pcre_compile, PCRE_LIBS=-lpcre)
 AC_CHECK_LIB(crypto, MD5_Init, CRYPTO_LIBS=-lcrypto)
 AC_CHECK_LIB(ssl, SSL_new, SSL_LIBS=-lssl)
-AC_CHECK_LIB(db-4.8, db_create, DB4_LIBS=-ldb-4.8,
-       AC_CHECK_LIB(db-4.7, db_create, DB4_LIBS=-ldb-4.7,
-       AC_CHECK_LIB(db-4.6, db_create, DB4_LIBS=-ldb-4.6,
-       AC_CHECK_LIB(db-4.5, db_create, DB4_LIBS=-ldb-4.5,
-       AC_CHECK_LIB(db-4.4, db_create, DB4_LIBS=-ldb-4.4,
-       AC_CHECK_LIB(db-4.3, db_create, DB4_LIBS=-ldb-4.3,
-  [AC_MSG_ERROR([Missing required libdb 4.x])]))))))
+
+AC_CHECK_HEADERS([db.h], [], [AC_MSG_ERROR(Missing required db.h)])
+dnl We do not use sequence objects. It is a trick to force db4.3 or later.
+AC_CHECK_LIB(db, db_sequence_create, DB4_LIBS=-ldb)
+
 AC_CHECK_LIB(event, event_base_new, EVENT_LIBS=-levent,
   [AC_MSG_ERROR([Missing required libevent])])
 AC_CHECK_LIB(argp, argp_parse, ARGP_LIBS=-largp)

(URL http://zaitcev.livejournal.com/195586.html)

-- Pete

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Patch 1/1] CLD: fix crash in __mutex_get_max (libdb-4.7.so) on F13
  2009-12-02  1:18   ` Pete Zaitcev
@ 2009-12-02 10:40     ` Jeff Garzik
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Garzik @ 2009-12-02 10:40 UTC (permalink / raw)
  To: Pete Zaitcev; +Cc: Project Hail List

On 12/01/2009 08:18 PM, Pete Zaitcev wrote:
> On Sun, 29 Nov 2009 20:38:45 -0500
> Jeff Garzik<jeff@garzik.org>  wrote:
>
>> Interesting...  I recall the root cause clearly, now:  /usr/include/db.h
>> always refers to the latest installed db4, even if compat-db{,45,46} is
>> installed.  Our configure recipe links with the most recent db4 listed
>> in configure.ac, combined with the installed /usr/include/db.h.  Thus,
>> each new db4 version produces a mismatch.
>
> I solicited suggestions on a blog, and someone asked why we don't
> use db without specific version. I assumed we do it so we don't
> get linked with something ancient like db3. Is that so? If yes,
> how about something like this:

libdb does not exist anywhere but more recent versions of Linux.  That 
link does not exist on older, non-RHL Linux's, nor on FreeBSD, nor on 
Solaris.  The proposed configure change would actually make us much 
-less- portable, unfortunately.

The ideal is somewhat close to what a LJ poster proposed:
* include from $include_dir/$db_version
* link from libdb-$db_version
* provide pkgconfig info that gives us precise location information

That's how, eg. glib/gtk+ 1.x can co-exist with glib/gtk+ 2.x.

But we lack a time machine to make this happen :/

	Jeff



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-12-02 10:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-30  1:17 [Patch 1/1] CLD: fix crash in __mutex_get_max (libdb-4.7.so) on F13 Pete Zaitcev
2009-11-30  1:38 ` Jeff Garzik
2009-11-30  2:05   ` Pete Zaitcev
2009-12-02  1:18   ` Pete Zaitcev
2009-12-02 10:40     ` Jeff Garzik
2009-11-30 13:34 ` Jeff Garzik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.