automake
[Top][All Lists]
Advanced

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

Re: libtool 2.1a failed mdemo-make.test on Solaris


From: Ralf Wildenhues
Subject: Re: libtool 2.1a failed mdemo-make.test on Solaris
Date: Thu, 23 Jun 2005 12:25:01 +0200
User-agent: Mutt/1.4.1i

[ this thread starts at
http://lists.gnu.org/archive/html/libtool/2005-06/msg00169.html ]

Hi Sven, others,

* Sven Verdoolaege wrote on Thu, Jun 23, 2005 at 09:11:36AM CEST:
> On Thu, Jun 23, 2005 at 08:31:48AM +0200, Ralf Wildenhues wrote:
> 
> > > It's this version that fails on solaris.
> > 
> > Let's see: ls libltdl/argz.h created by running `make' in $top_builddir?
> 
> Yes.  I ran "make check" without a "make" first.
> This seems to work on Linux...

Yes, but that works only because GNU/Linux has argz.h.

> Running make first makes tests/mdemo-make.test pass on Solaris.

Ah, ok.  Thanks for this report.  It's a bit tricky to reproduce: You
need a system which has no argz.h, then configure, then `make check'
without prior make.  If you had ever run `make' before in this build
tree, even after `make clean' the dependency information is stored in
libltdl/.deps/*.Plo, and thus hides this bug.

Now the gnulib snippet in libltdl/Makefile.am leaves us with the
possibility of using the lib_OBJECTS variable to fix this(?).

Several questions (thus the crosspost to all of these lists):
- Is it ok/supposed by gnulib to use lib_OBJECTS for this?
- Is it ok by Automake to use the *_OBJECTS variables it created,
  i.e., may they be treates as exported interface?

all-local cannot be used as it is executed too late.  We could, however,
just require the user to type `make' before `make check'.  Ugly.
Or call `$(MAKE) all-local' from mdemo first, and have a trivial
all-local target in libltdl, if above requests are not confirmed.
Ugly as well.

FYI: libtool/tests/mdemo/Makefile.am has this:

| libmlib_la_SOURCES = mlib.c
| libmlib_la_LIBADD = @LIBLTDL@ "-dlopen" foo1.la "-dlopen" libfoo2.la
| libmlib_la_LDFLAGS = -no-undefined
| libmlib_la_DEPENDENCIES = @LIBLTDL@ libsub.la foo1.la libfoo2.la

| ## use @LIBLTDL@ because some broken makes do not accept macros in targets
| ## we can only do this because our LIBLTDL does not contain ${top_builddir}
| top_distdir = ../..
| @LIBLTDL@: $(top_distdir)/libtool $(top_distdir)/libltdl/libtool \
|     $(top_distdir)/libltdl/config.h $(srcdir)/$(top_distdir)/libltdl/ltdl.c \
|     $(srcdir)/$(top_distdir)/libltdl/ltdl.h
|       (cd $(top_distdir)/libltdl; $(MAKE) `echo $(LIBLTDL) | sed 
's,.*\.\./libltdl/,,g'`)

and libltdl/Makefile.am has this:

| ## --------------------------- ##
| ## Gnulib Makefile.am snippets ##
| ## --------------------------- ##
| 
| ## ((( gnulib module argz
| BUILT_SOURCES += $(ARGZ_H)
| EXTRA_DIST += argz_.h
| 
| # We need the following in order to create an <argz.h> when the system
| # doesn't have one that works with the given compiler.
| all-local $(lib_OBJECTS): $(ARGZ_H)
| argz.h: argz_.h
|       cp $(srcdir)/argz_.h address@hidden
|       mv address@hidden $@
| MOSTLYCLEANFILES += argz.h argz.h-t
| ## ))) gnulib module argz

and the objects below libltdl will all depend on argz.h.

Thanks,
Ralf

Proposed patch:

Index: libltdl/Makefile.am
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/Makefile.am,v
retrieving revision 1.80
diff -u -r1.80 Makefile.am
--- libltdl/Makefile.am 22 Apr 2005 10:10:30 -0000      1.80
+++ libltdl/Makefile.am 23 Jun 2005 08:35:27 -0000
@@ -102,6 +102,17 @@
 ## Make sure these will be cleaned even when they're not built by default:
 CLEANFILES             = libltdl.la libltdlc.la libdlloader.la
 
+## Make sure argz.h will be created before it is needed:
+lib_OBJECTS = \
+       $(dlopen_la_OBJECTS) \
+       $(dld_link_la_OBJECTS) \
+       $(dyld_la_OBJECTS) \
+       $(load_add_on_la_OBJECTS) \
+       $(loadlibrary_la_OBJECTS) \
+       $(shl_load_la_OBJECTS) \
+       $(libltdl_la_OBJECTS) \
+       $(libltdlc_la_OBJECTS)
+
 
 ## --------------------------- ##
 ## Gnulib Makefile.am snippets ##






reply via email to

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