Re: CVS glib libtool

Josh MacDonald <jmacd@paris.CS.Berkeley.EDU> writes:

> The and ltconfig in the CVS glib repository seem broken
> on both Solaris and FreeBSD.  If I configure with --disable-shared
> (as I prefer during development) then when the archive command arrives,
> I see something like:
> /bin/sh ./libtool --mode=link gcc -g -O2 -Wall  -o -rpath /usr/local/
> lib -version-info 3:0:0 -release 1.1 garray.lo gcache.lo gcompletion.lo gdataset
> .lo gerror.lo ghash.lo glist.lo gmem.lo gmessages.lo gnode.lo gprimes.lo gslist.
> lo gtimer.lo gtree.lo grel.lo gstring.lo gstrfuncs.lo gscanner.lo gutils.lo
> rm -fr .libs/ .libs/libglib.* .libs/libglib-1.1.*
> ar cru .libs/libglib.a
> ar: no archive members specified
> This happened on both systems.  Solaris silently doesn't produce an
> archive and the problem shows up later.

This is a problem with libtool-1.2b on all platforms. libtool-1.2b
adds a "convenience library" feature, and the effect of that patch on
--disable-static apparently wasn't tested. The patch below seems
to get --disable-static and --disable-shared working properly.

I haven't tested to see if convenience libraries will work with
this patch, however. (Not having an example of their use around.)


diff -ur libtool-1.2b.orig/ libtool-1.2b/
--- libtool-1.2b.orig/	Wed Jul  1 04:08:34 1998
+++ libtool-1.2b/	Sun Sep 20 18:00:48 1998
@@ -932,7 +932,7 @@
       # Now set the variables for building old libraries.
-      oldlibs="$objdir/$libname.a"
+      oldlibs=
       if test -z "$rpath"; then
 	# Building a libtool convenience library.
 	oldlibs="$objdir/$ $oldlibs"
@@ -1074,6 +1074,14 @@
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+        oldlibs="$oldlibs $objdir/$libname.a"
+	# Transform .lo files to .o files.
+	oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^   ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
+      fi
       if test "$build_libtool_libs" = yes; then
 	# Get the real and link names of the library.
 	eval library_names=\"$library_names_spec\"
@@ -1095,9 +1103,6 @@
 	# Use standard objects if they are PIC.
 	test -z "$pic_flag" && libobjs=`$echo "X$libobjs " | $Xsed -e 's/\.lo /.o /g' -e 's/ $//g'`
-	# Transform .lo files to .o files.
-	test "$build_old_libs" = yes && oldobjs="$objs"`$echo "X$libobjs " | $Xsed -e 's/[^   ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
 	if test -n "$whole_archive_flag_spec"; then
 	  if test -n "$convenience"; then

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