[Top][All Lists]

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

Re: cygwin build problem with m4 HEAD

From: Ralf Wildenhues
Subject: Re: cygwin build problem with m4 HEAD
Date: Fri, 9 Sep 2005 09:31:02 +0200
User-agent: Mutt/1.4.1i

Hi Eric,

* Eric Blake wrote on Thu, Sep 08, 2005 at 11:06:45PM CEST:
> 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.

I'm sorry for not having looked into this yet; it may be related to
another possible bug I am seeing.  Can you post the value of $(LIBLTDL)?

> 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.

Thank you so much for analyzing this and providing a fix, I owe you a
beer for that one!

Your fix is not quite appropriate for inclusion, however, because our
replacement argz.c does not provide argz_add.  Does newlib have a
similar bug in argz_append?  If not, then the patch below should work as
well, I believe (untested with newlib), and is less work than providing
argz_add as well.  Could you confirm this?  If ok, I'll apply this CVS
HEAD and backport to branch-1-5.

By the way, how does the m4 testsuite fare on cygwin with this fixed?


        * libltdl/ltdl.c (lt_argz_insert): Work around newlib argz_insert bug.
        * Makefile.am (VERSION_INFO): Bumped revision.
        Reported by Eric Blake <address@hidden>.

Index: Makefile.am
RCS file: /cvsroot/libtool/libtool/Makefile.am,v
retrieving revision 1.161
diff -u -r1.161 Makefile.am
--- Makefile.am 5 Sep 2005 06:21:48 -0000       1.161
+++ Makefile.am 9 Sep 2005 07:21:02 -0000
@@ -230,7 +230,7 @@
 AM_CPPFLAGS            = -I. -I$(srcdir) -Ilibltdl -I$(srcdir)/libltdl \
 AM_LDFLAGS             = -no-undefined
-VERSION_INFO           = -version-info 6:0:0
+VERSION_INFO           = -version-info 6:1:0
Index: libltdl/ltdl.c
RCS file: /cvsroot/libtool/libtool/libltdl/ltdl.c,v
retrieving revision 1.231
diff -u -r1.231 ltdl.c
--- libltdl/ltdl.c      28 Jul 2005 10:01:03 -0000      1.231
+++ libltdl/ltdl.c      9 Sep 2005 07:21:02 -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,12 @@
   error_t error;
-  if ((error = argz_insert (pargz, pargz_len, before, entry)))
+  if (before) 
+    error = argz_insert (pargz, pargz_len, before, entry);
+  else
+    error = argz_append (pargz, pargz_len, entry, 1 + strlen (entry));
+  if (error)
       switch (error)

reply via email to

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