guile-devel
[Top][All Lists]
Advanced

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

1.6.3: libltdl troubles with error_t


From: Greg Troxel
Subject: 1.6.3: libltdl troubles with error_t
Date: Thu, 27 Feb 2003 12:42:46 -0500

I have 1.6.3 imported into CVS, and am building it on NetBSD 1.6.
Because I modified Makefile.am and configure.in for pkgconfig, I am
running most of what's in autogen.sh from guile CVS, and I removed
Makefile.in/configure/aclocal 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
`/home/gdt/QUIST-current/guile/libguile-ltdl'
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 ltmain.sh 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.

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

reply via email to

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