bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cygwin build problem with m4 HEAD


From: Eric Blake
Subject: Re: cygwin build problem with m4 HEAD
Date: Thu, 8 Sep 2005 21:06:45 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Eric Blake <ebb9 <at> byu.net> writes:

> 
> I notice that it is attempting to link against /usr/lib/libltdl.dll.a,
> which comes from libtool 1.5.18, rather than /usr/local/lib/libltdl.dll.a,
> which is my installed libtool 2.1a, and I am pretty sure that
> lt_dlhandle_fi{nd,rst} were added in 2.x, explaining the link failure.
> What I can't track down is why the link command is looking in the wrong
> directory, and thus getting the wrong symbols for libltdl.

I managed to work around the earlier bug report by configuring m4 using --with-
included-ltdl, but it still feels hackish.  I wish I knew why m4 was trying to 
link against the wrong libltld.  In the meantime, once I was using my 
workaround, it exposed another bug.

ltdl.c, in lt_argz_insert, blindly calls argz_insert without checking whether 
the before argument is NULL.  But newlib (up until my patch posted there today 
is incorporated, http://sources.redhat.com/ml/newlib/2005/msg00516.html) 
treated this as EINVAL, thus breaking load_deplibs() and failing every single 
testcase of the m4 testsuite because of a failure to initialize.

2005-09-08  Eric Blake  <address@hidden>  (tiny change)

        * libltdl/ltdl.c (lt_argz_insert): Work around newlib argz_insert bug.

Index: libltdl/ltdl.c
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/ltdl.c,v
retrieving revision 1.231
diff -u -b -r1.231 ltdl.c
--- libltdl/ltdl.c      28 Jul 2005 10:01:03 -0000      1.231
+++ libltdl/ltdl.c      8 Sep 2005 20:54:46 -0000
@@ -1,5 +1,5 @@
 /* ltdl.c -- system independent dlopen wrapper
-   Copyright (C) 1998, 1999, 2000, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2004, 2005 Free Software Foundation, Inc.
    Originally by Thomas Tanner <address@hidden>
 
    NOTE: The canonical source of this file is maintained with the
@@ -1445,7 +1445,13 @@
 {
   error_t error;
 
-  if ((error = argz_insert (pargz, pargz_len, before, entry)))
+  /* Prior to Sep 8, 2005, newlib had a bug where argz_insert(pargz,
+     pargz_len, NULL, entry) failed with EINVAL.  */
+  if (before)
+    error = argz_insert (pargz, pargz_len, before, entry);
+  else
+    error = argz_add (pargz, pargz_len, entry);
+  if (error)
     {
       switch (error)
        {






reply via email to

[Prev in Thread] Current Thread [Next in Thread]