xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir.xen@gmail.com>
To: Juergen Gross <juergen.gross@ts.fujitsu.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: xen-unstable: build fails
Date: Thu, 17 Mar 2011 08:11:57 +0000	[thread overview]
Message-ID: <C9A772CD.14F43%keir.xen@gmail.com> (raw)
In-Reply-To: <4D81A1B7.2060306@ts.fujitsu.com>

On 17/03/2011 05:52, "Juergen Gross" <juergen.gross@ts.fujitsu.com> wrote:

> The reason is clear: XEN_ROOT is set to a *relative* path. And when make is
> including a Makefile, it switches the working directory to the directory of
> the included Makefile. Including another Makefile via XEN_ROOT then is the
> problem...

Well it's not clear to me. In my tests, including another Makefile does not
change the working directory, only recursive make with -C specified does
that. That seems logical -- pulling in standard rules containing wildcard
globs would otherwise have unpredictable results, if the wildcards were
evaluated in the directory of the included Makefile.

In your case, if Config.mk was getting run with incorrect relative XEN_ROOT,
how would the earlier include lines in that file work? You are getting an
error on '-include $(XEN_ROOT)/.config', but there are earlier (and
unconditional!) include lines in Config.mk that also reference XEN_ROOT. I
suppose they must be working.

So I think something is weird in your environment, or your make is broken.
However in this one specific failure case I can avoid redefining XEN_ROOT
outside xen/Makefile, since all hypervisor builds start at that Makefile. So
you can see whether c/s 23048 in xen-unstable staging fixes your build. I
applied it as it happens to be a teeny tiny cleanup as well.

 -- Keir

>> 
>>> The reason seems to be a directory /root/.config which isn't present on my
>>> other machines.
>> 
>> We shouldn't be referring outside the repository. AFAICS the above logging
>> doesn't indicate that we are. I don't understand why you are getting that
>> error. I haven't been able to reproduce it.
> 
> I have :-(
> 
>> 
>>> fails in a similar way. Many Makefiles seem to contain lines like:
>>> 
>>> XEN_ROOT=../..
>>> 
>>> which is a really bad idea in my opinion. XEN_ROOT should only be set, if it
>>> is not yet defined.
>> 
>> Why? It's private to our build system. We don't want the user screwing with
>> it. I also don't see why relative paths within our repository should be
>> avoided, as you try to do in your alternative formulation.
> 
> You have to avoid relative paths in make variables used in different directory
> levels.
> 
> 
> Juergen

  reply	other threads:[~2011-03-17  8:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16 13:50 xen-unstable: build fails Juergen Gross
2011-03-16 14:45 ` Juergen Gross
2011-03-16 16:50 ` Keir Fraser
2011-03-17  5:52   ` Juergen Gross
2011-03-17  8:11     ` Keir Fraser [this message]
2011-03-17  8:59       ` Juergen Gross
2011-03-17 10:13         ` Jan Beulich
2011-03-17 10:29           ` Juergen Gross
2011-03-17 10:48             ` Jan Beulich
2011-03-17 10:55               ` Keir Fraser
2011-03-17 10:36         ` Keir Fraser
  -- strict thread matches above, loose matches on Subject: below --
2010-05-05  5:46 xen-unstable " Juergen Gross
2010-05-05  6:31 ` Shriram R
2010-05-05  9:00 ` Keir Fraser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C9A772CD.14F43%keir.xen@gmail.com \
    --to=keir.xen@gmail.com \
    --cc=juergen.gross@ts.fujitsu.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).