Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] v1.8 - compile/dist problem
From: Peter Breitenlohner (peb_at_[hidden])
Date: 2014-07-25 05:51:27


On Thu, 24 Jul 2014, Bert Wesarg wrote:

> On 07/24/2014 02:52 PM, Peter Breitenlohner wrote:

>> This typically occurs when you try to create a file (symlink) in a
>> nonexistent directory. In such situations the make rules must ensure that
>> such directories exist, e.g., via
>>
>> some_target: Some_prerequisite
>> $(MKDIR_P) hooks
>> $(LN_S) $(srcdir)/hooks/vt_unify_hooks_base.cc
>> hooks/vt_unify_hooks_base.cc
>
> But the dep rules should already ensure this, as it creates the .deps
> directory at the end of configure. Though if this is not guaranteed to happen
> (maybe it depends on the used compiler) than we would need to ensure it in
> the makefile itself.

perhaps true, and I actually don't know where the 'ln -s' comes from.

> Does someone know the details from autoconf about this?

at least part of the problem comes from the Automake option 'subdir-objects'
together with the *_SOURCES defined in Makefile.common in the directories
   openmpi-1.8.1/ompi/contrib/vt/vt/tools/{vtunify,vtfilter}/
defining source files as, e.g.,
   $(VTUNIFYSRCDIR)/hooks/vt_unify_hooks_aevents.cc
together with
   VTUNIFYSRCDIR = $(srcdir)

It was never required (nor recommended) to specify explicitly that sources
are in the source tree, Automake-generated rules always try to find the file
first in the build tree and then in the source tree.

Together with 'subdir-objects' and Automake 1.14.1 this has disastrous effects:
   foo_SOURCES = foo.c ${srcdir}/sub/foosub.c
creates the dependency file
   '${srcdir}'/sub/.deps/foosub.Po
in the build tree but needs
   ${srcdir}/sub/.deps/foosub.Po
and therefore fails. SIMILARLY
   foo_SOURCES = foo.c $(srcdir)/sub/foosub.c
creates
   '$(srcdir)'/sub/.deps/foosub.Po
but needs
   $(srcdir)/sub/.deps/foosub.Po
and fails. Finally
   foo_SOURCES = foo.c @srcdir@/sub/foosub.c
tries to create
   sub/foosub.o
   sub/.deps
and succeeds if the source tree is writable but 'make distcheck' with its
read-only source tree fails as demonstrated by the attached tiny tarball.

Part of all that is due to a bug in Automake 1.14.1 that will probably be
fixed in 1.14.2, but one should certainly not say explicitly that source
files are in the source tree.

Regards
Peter