Subject: guile 1.6.3: libltdl troubles with error_t, old libtool
To: None <>
From: Greg Troxel <>
List: tech-pkg
Date: 02/27/2003 13:17:25
I had some grief with guile because our libtool is old.  pkgsrc guile
is fine, but I have guile in CVS because I'm munging it.  Guile has a
private copy of libltdl which is newer, and expects newer ltdl.m4
support.  Arguably guile should include ltdl.m4 as well so aclocal
gets the new one, but a) it doesn't and b) that depends on libtool.m4,
and pulling them both in causes libtool to barf due to version skew.

Arguably ltdl and libtool should not be split up, or alternatively
they should be split up cleanly.

I believe pkgsrc guile avoids all this because it doesn't rebuild
aclocal.  I had removed all such files and rerun libtoolize, doing
what I think is the equivalent of LIBTOOL_OVERRIDE.

So none of this is really a NetBSD bug, but it would be nice to have a
more recent libtool.  I am competely unfamiliar with libtool versions
and the reason we have a mid-2001 version.  So this is not a
complaint, just a lossage report for what it's worth.

My system is 1.6ish/i386 and has libtool-base-1.4.20010614nb13.


------- Forwarded Message

From: Greg Troxel <>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
Content-ID: <>
Date: Thu, 27 Feb 2003 12:42:46 -0500
Message-Id: <>
Subject: 1.6.3: libltdl troubles with error_t

- ------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <>

I have 1.6.3 imported into CVS, and am building it on NetBSD 1.6.
Because I modified and for pkgconfig, I am
running most of what's in from guile CVS, and I removed from my own repo.

libltdl.c failed to build because error_t was not defined.  error_t
seems to be a glibc thing related to 'argz', but I'm not sure.  Newer
libtool versions have checks in ltdl.m4 to #define error_t to int if
it isn't defined.

I lost because NetBSD pkgsrc has an old, patched libtool, and the
ltdl.m4 used to make aclocal.m4 came from the old libtool.  The
central problem is that guile includes ltdl but does not include the
corresponding autoconf macros.

Of course, one can say that NetBSD is broken because it doesn't have
an up-to-date libtool.  But the libtool that comes with NetBSD seems
to be self-consistent and working ok otherwise.

So, I added the new ltdl.m4 to guile-config, and that failed because
it depends on new stuf libtool.m4.  Building with both included got me:

gmake[3]: Entering directory
source='guile-ltdl.c' object='guile-ltdl.lo' libtool=yes \
depfile='.deps/guile-ltdl.Plo' tmpdepfile='.deps/guile-ltdl.TPlo' \
depmode=gcc /usr/pkg/bin/bash ../depcomp \
/usr/pkg/bin/bash ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I. -I.. -I./..    -I/usr/pkg/include -Wall -Wmissing-prototypes -c -o guile-ltdl.lo `test -f 'guile-ltdl.c' || echo './'`guile-ltdl.c
libtool: ltconfig version `' does not match version `1.4a'
Fatal configuration error.  See the libtool docs for more information.
gmake[3]: *** [guile-ltdl.lo] Error 1

This is really for libtool, not guile, but when using nonstandard
features like error_t (if indeed it is non-POSIX), it would be good to
conditionalize the source on HAVE_ERROR_T, so that simply declining to
define HAVE_ERROR_T causes the right behavior.  I did this, and
realized there was also a missing test for errno.h

With this patch, i can build 1.6.3 with the older libtool m4 files.
I know it's gross, but I thought it might help someone else.

- ------- =_aaaaaaaaaa0
Content-Type: text/plain; name="ltdl-error_t"; charset="us-ascii"
Content-ID: <>
Content-Description: libltdl patch

Index: libguile-ltdl/raw-ltdl.c
RCS file: /QUIST-CVS/guile/libguile-ltdl/raw-ltdl.c,v
retrieving revision
diff -u -r1.1.1.1 raw-ltdl.c
- --- libguile-ltdl/raw-ltdl.c	2002/12/07 22:41:33
+++ libguile-ltdl/raw-ltdl.c	2003/02/27 17:20:37
@@ -86,6 +86,14 @@
 #  include <argz.h>
+/* empty */
+/* Probably we were compiled without new enough ltdl.m4 support */
+#define error_t int
+#include <errno.h>
 #  include <assert.h>

- ------- =_aaaaaaaaaa0
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

Guile-devel mailing list

- ------- =_aaaaaaaaaa0--

------- End of Forwarded Message