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: Bert Wesarg (bert.wesarg_at_[hidden])
Date: 2014-07-25 08:05:30


On 07/25/2014 11:51 AM, Peter Breitenlohner wrote:
> 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.

Peter, I was the one who reported this bug to automake:

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928

;-)

And this bug is /present since the beginning/. But where did you get the
impression that this may get fixed in 1.14.2?

Anyway, this $(LN_S) is there to prevent having variable references in
_SOURCES files, thus circumventing the subdir-objects bug in automake.
We (in VT) are building some sources twice. Once with the $(CC) compiler
and a second time with the $(MPICC) compiler. And for this we are now
making symlinks in a new directory, so that it looks like they have the
same paths for both builds.

Bert

>
> Regards
> Peter
>

-- 
Dipl.-Inf. Bert Wesarg
wiss. Mitarbeiter
Technische Universität Dresden
Zentrum für Informationsdienste und Hochleistungsrechnen (ZIH)
01062 Dresden
Tel.: +49 (351) 463-42451
Fax: +49 (351) 463-37773
E-Mail: bert.wesarg_at_[hidden]