[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Various race condition in install mode.
From: |
Bob Friesenhahn |
Subject: |
Re: Various race condition in install mode. |
Date: |
Thu, 7 Oct 2004 21:56:46 -0500 (CDT) |
On Thu, 7 Oct 2004, Sam Varshavchik wrote:
Here's an automake-generate rule that depends on the overall 'make install
target':
install-exec-am: install-pkglibLTLIBRARIES install-pkglibexecPROGRAMS \
install-pkglibexecSCRIPTS install-sbinPROGRAMS \
install-sbinSCRIPTS
As we see, there are two sub-targets here of interest:
install-pkglibLTLIBRARIES and install-pkglibexecPROGRAMS. The first one
installs the shared libraries, the second one installs binaries that
potentially link against the shared libraries. Neither target depends on
each other, they only both depend on their parent, the install-exec-am
target. Since install-pkglibexecPROGRAMS does not depend on
install-pkglibLTLIBRARIES, gmake doesn't see any reason why it can't run
these targets in parallel. Conceivably gmake could end up installing one of
the binaries before it finishes installing all the libraries.
So I was forced to read through a long (and well written) email before
the crux of the matter appeared. If make should not be running these
targets in parallel then this smells like an Automake problem to me.
Probably this has not come up before since most people don't set the
parallelism in MAKEFLAGS.
From researching the first issue, I understand that libtool in certain
situations, will do linking during the install mode. I haven't yet confirmed
whether libtool tries to link against the libraries in their final,
installation directory that it expects to be there already, or it will use
Yes, sometimes it will link against libraries in their final resting
place. In this case, install order makes a big difference.
'make install' goes through the libraries in their listed order, and tries to
install libcourierauthcommon first, which fails because libtool relinks
against libcourierauth.la, which hasn't been installed yet.
The first library has a dependency on the second one, but automake really
doesn't think that it should install the second library before the first one;
that's really a dependency that's introduced by libtool.
Therefore, it needs to be documented that with libtool, the order of the
listed libraries in _LTLIBRARIES should agree with any dependencies they have
between themselves.
I brought this up as an issue on the Automake list about eight months
ago, and it has come up several times since then. While documentation
is easy to update, the actual problem is much less easy to fix.
I suggest that you post an abbreviated version of this email to the
automake list since it seems that the core problems (Makefile
parallelism and library install ordering) are related to automake
rather than libtool.
Bob
======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen