All of lore.kernel.org
 help / color / mirror / Atom feed
* xen-unstable build fails
@ 2010-05-05  5:46 Juergen Gross
  2010-05-05  6:31 ` Shriram R
  2010-05-05  9:00 ` Keir Fraser
  0 siblings, 2 replies; 14+ messages in thread
From: Juergen Gross @ 2010-05-05  5:46 UTC (permalink / raw)
  To: xen-devel

Hi,

latest xen-unstable doesn't build on my machine:

gcc  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g 
-fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value 
-Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .xen-hptool.o.d 
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -Werror -I 
../../tools/python/xen/lowlevel/xc -I ../../tools/libxc -I ../../tools/include 
-c -o xen-hptool.o xen-hptool.c
xen-hptool.c: In function ‘suspend_guest’:
xen-hptool.c:136: error: too few arguments to function ‘xc_suspend_evtchn_release’
xen-hptool.c: In function ‘hp_mem_offline_func’:
xen-hptool.c:231: error: too few arguments to function ‘xc_suspend_evtchn_release’
make[3]: *** [xen-hptool.o] Error 1
make[3]: Leaving directory `/root/xen-unstable.hg/tools/misc'


Juergen

-- 
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: xen-unstable build fails
  2010-05-05  5:46 xen-unstable build fails Juergen Gross
@ 2010-05-05  6:31 ` Shriram R
  2010-05-05  9:00 ` Keir Fraser
  1 sibling, 0 replies; 14+ messages in thread
From: Shriram R @ 2010-05-05  6:31 UTC (permalink / raw)
  To: Juergen Gross; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 2743 bytes --]

I thing Yang's patch is still not applied. And the build error is my
mistake.. I missed the xen-hptool.c file

changeset 21259:f7605c6c9548 changes the global suspend event channel lock
file
to a per-domain lock file, but do not update xc_suspend_evtchn_release()
call in
misc/hp-tool.c. So I got a build error when building tools. The patch fix
this.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>

diff -r efa1b905d893 tools/misc/xen-hptool.c
--- a/tools/misc/xen-hptool.c   Tue May 04 13:59:55 2010 +0100
+++ b/tools/misc/xen-hptool.c   Wed May 05 19:56:51 2010 +0800
@@ -133,7 +133,7 @@

 failed:
    if (suspend_evtchn != -1)
-        xc_suspend_evtchn_release(xce, suspend_evtchn);
+        xc_suspend_evtchn_release(xce, domid, suspend_evtchn);

    return -1;
 }
@@ -228,7 +228,7 @@
                                mfn, domid);
                    }
                    xc_domain_resume(xc_fd, domid, 1);
-                    xc_suspend_evtchn_release(xce, suspend_evtchn);
+                    xc_suspend_evtchn_release(xce, domid, suspend_evtchn);
                    xc_evtchn_close(xce);
                }
                break;


On Tue, May 4, 2010 at 10:46 PM, Juergen Gross <juergen.gross@ts.fujitsu.com
> wrote:

> Hi,
>
> latest xen-unstable doesn't build on my machine:
>
> gcc  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g
> -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value
> -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .xen-hptool.o.d
> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -Werror -I
> ../../tools/python/xen/lowlevel/xc -I ../../tools/libxc -I
> ../../tools/include -c -o xen-hptool.o xen-hptool.c
> xen-hptool.c: In function ‘suspend_guest’:
> xen-hptool.c:136: error: too few arguments to function
> ‘xc_suspend_evtchn_release’
> xen-hptool.c: In function ‘hp_mem_offline_func’:
> xen-hptool.c:231: error: too few arguments to function
> ‘xc_suspend_evtchn_release’
> make[3]: *** [xen-hptool.o] Error 1
> make[3]: Leaving directory `/root/xen-unstable.hg/tools/misc'
>
>
> Juergen
>
> --
> Juergen Gross                 Principal Developer Operating Systems
> TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
> Fujitsu Technology Solutions              e-mail:
> juergen.gross@ts.fujitsu.com
> Domagkstr. 28                           Internet: ts.fujitsu.com
> D-80807 Muenchen                 Company details:
> ts.fujitsu.com/imprint.html
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>



-- 
perception is but an offspring of its own self

[-- Attachment #1.2: Type: text/html, Size: 3558 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: xen-unstable build fails
  2010-05-05  5:46 xen-unstable build fails Juergen Gross
  2010-05-05  6:31 ` Shriram R
@ 2010-05-05  9:00 ` Keir Fraser
  1 sibling, 0 replies; 14+ messages in thread
From: Keir Fraser @ 2010-05-05  9:00 UTC (permalink / raw)
  To: Juergen Gross, xen-devel

This is fixed already (in the xen-unstable staging tree at least).

 -- Keir

On 05/05/2010 06:46, "Juergen Gross" <juergen.gross@ts.fujitsu.com> wrote:

> Hi,
> 
> latest xen-unstable doesn't build on my machine:
> 
> gcc  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g
> -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value
> -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .xen-hptool.o.d
> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -Werror -I
> ../../tools/python/xen/lowlevel/xc -I ../../tools/libxc -I ../../tools/include
> -c -o xen-hptool.o xen-hptool.c
> xen-hptool.c: In function Œsuspend_guest¹:
> xen-hptool.c:136: error: too few arguments to function
> Œxc_suspend_evtchn_release¹
> xen-hptool.c: In function Œhp_mem_offline_func¹:
> xen-hptool.c:231: error: too few arguments to function
> Œxc_suspend_evtchn_release¹
> make[3]: *** [xen-hptool.o] Error 1
> make[3]: Leaving directory `/root/xen-unstable.hg/tools/misc'
> 
> 
> Juergen

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: xen-unstable: build fails
  2011-03-17 10:48             ` Jan Beulich
@ 2011-03-17 10:55               ` Keir Fraser
  0 siblings, 0 replies; 14+ messages in thread
From: Keir Fraser @ 2011-03-17 10:55 UTC (permalink / raw)
  To: Jan Beulich, Juergen Gross; +Cc: xen-devel

On 17/03/2011 10:48, "Jan Beulich" <JBeulich@novell.com> wrote:

>> As short time measure this seems to be okay.
>> 
>> On the long run I'd prefer to use absolute paths only. Otherwise you've
>> always a risk to use something from outside the intended build environment.
>> 
>> XEN_ROOT = $(abspath ../..)
>> 
>> seems not too hard to use instead of
>> 
>> XEN_ROOT = ../..
> 
> Except that make 3.80 doesn't support this, and that make version
> is - to my knowledge - still in quite wide spread use. But that can
> probably be overcome with a fallback implementation (which newer
> make just wouldn't use).

It has CURDIR, so we can just use that. Which is what I've done. It's also
cleaned up some not-nice bit of build-fu which were prefixing a relative
XEN_ROOT with arbitrary extra ../'s to "make things work".

 -- Keir

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: xen-unstable: build fails
  2011-03-17 10:29           ` Juergen Gross
@ 2011-03-17 10:48             ` Jan Beulich
  2011-03-17 10:55               ` Keir Fraser
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Beulich @ 2011-03-17 10:48 UTC (permalink / raw)
  To: Juergen Gross; +Cc: Keir Fraser, xen-devel

>>> On 17.03.11 at 11:29, Juergen Gross <juergen.gross@ts.fujitsu.com> wrote:
> On 03/17/11 11:13, Jan Beulich wrote:
>>>>> On 17.03.11 at 09:59, Juergen Gross<juergen.gross@ts.fujitsu.com>  wrote:
>>> The problem is still the relative XEN_ROOT specification.
>>> Or the missing .config under XEN_ROOT, so creating this file solves my
>>> problem. :-)
>>
>> I'd favor the latter, e.g. by adding something like
>>
>> cfg-create := $(shell touch $(XEN_ROOT)/.config)
>>
>> to ./Config.mk, or putting the include in a conditional instead
>> of making use of -include.
> 
> As short time measure this seems to be okay.
> 
> On the long run I'd prefer to use absolute paths only. Otherwise you've
> always a risk to use something from outside the intended build environment.
> 
> XEN_ROOT = $(abspath ../..)
> 
> seems not too hard to use instead of
> 
> XEN_ROOT = ../..

Except that make 3.80 doesn't support this, and that make version
is - to my knowledge - still in quite wide spread use. But that can
probably be overcome with a fallback implementation (which newer
make just wouldn't use).

Jan

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: xen-unstable: build fails
  2011-03-17  8:59       ` Juergen Gross
  2011-03-17 10:13         ` Jan Beulich
@ 2011-03-17 10:36         ` Keir Fraser
  1 sibling, 0 replies; 14+ messages in thread
From: Keir Fraser @ 2011-03-17 10:36 UTC (permalink / raw)
  To: Juergen Gross; +Cc: xen-devel

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

> So the problem is not changing the working directory, but implicit directory
> search. $(XEN_ROOT)/.config expands as ../../.config and this file was not
> found, so make searches in /usr/include, as the file path is relative. And
> /usr/include/../../.config results as /.config :-(
> 
> The problem is still the relative XEN_ROOT specification.
> Or the missing .config under XEN_ROOT, so creating this file solves my
> problem. :-)

Okay then the relative XEN_ROOT specifications are a problem. Fixed as c/s
23049.

 -- Keir

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: xen-unstable: build fails
  2011-03-17 10:13         ` Jan Beulich
@ 2011-03-17 10:29           ` Juergen Gross
  2011-03-17 10:48             ` Jan Beulich
  0 siblings, 1 reply; 14+ messages in thread
From: Juergen Gross @ 2011-03-17 10:29 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Keir Fraser, xen-devel

On 03/17/11 11:13, Jan Beulich wrote:
>>>> On 17.03.11 at 09:59, Juergen Gross<juergen.gross@ts.fujitsu.com>  wrote:
>> The problem is still the relative XEN_ROOT specification.
>> Or the missing .config under XEN_ROOT, so creating this file solves my
>> problem. :-)
>
> I'd favor the latter, e.g. by adding something like
>
> cfg-create := $(shell touch $(XEN_ROOT)/.config)
>
> to ./Config.mk, or putting the include in a conditional instead
> of making use of -include.

As short time measure this seems to be okay.

On the long run I'd prefer to use absolute paths only. Otherwise you've
always a risk to use something from outside the intended build environment.

XEN_ROOT = $(abspath ../..)

seems not too hard to use instead of

XEN_ROOT = ../..

And I'm still favoring usage of conditional setting of XEN_ROOT in included
Makefiles other than config/* to avoid hard to find problems.


Juergen

-- 
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: xen-unstable: build fails
  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:36         ` Keir Fraser
  1 sibling, 1 reply; 14+ messages in thread
From: Jan Beulich @ 2011-03-17 10:13 UTC (permalink / raw)
  To: Keir Fraser, Juergen Gross; +Cc: xen-devel

>>> On 17.03.11 at 09:59, Juergen Gross <juergen.gross@ts.fujitsu.com> wrote:
> The problem is still the relative XEN_ROOT specification.
> Or the missing .config under XEN_ROOT, so creating this file solves my
> problem. :-)

I'd favor the latter, e.g. by adding something like

cfg-create := $(shell touch $(XEN_ROOT)/.config)

to ./Config.mk, or putting the include in a conditional instead
of making use of -include. It seems to me that "-include" doing a
default directory search just like "include" does wasn't the best
behavioral decision by the make authors - if one really wants to
include nothing, one just cannot use this to avoid the conditional
(which is what so far I thought was the main advantage of the
"-" prefix).

Jan

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: xen-unstable: build fails
  2011-03-17  8:11     ` Keir Fraser
@ 2011-03-17  8:59       ` Juergen Gross
  2011-03-17 10:13         ` Jan Beulich
  2011-03-17 10:36         ` Keir Fraser
  0 siblings, 2 replies; 14+ messages in thread
From: Juergen Gross @ 2011-03-17  8:59 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel

On 03/17/11 09:11, Keir Fraser wrote:
> 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.

We are both right :-)

I created /.config with:

$(warning /.config: $(MAKEFILE_LIST))

and got the following with "make tools":

make -C tools install
make[1]: Entering directory `/root/xen-unstable.hg/tools'
make[2]: Entering directory `/root/xen-unstable.hg/tools'
make -C check install
make[3]: Entering directory `/root/xen-unstable.hg/tools/check'
../../.config:1: /.config:  Makefile ../../tools/Rules.mk ../../Config.mk 
../../config/Linux.mk ../../config/StdGNU.mk ../../config/x86_64.mk 
/usr/include/../../.config


So the problem is not changing the working directory, but implicit directory
search. $(XEN_ROOT)/.config expands as ../../.config and this file was not
found, so make searches in /usr/include, as the file path is relative. And
/usr/include/../../.config results as /.config :-(

The problem is still the relative XEN_ROOT specification.
Or the missing .config under XEN_ROOT, so creating this file solves my
problem. :-)


Juergen

-- 
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: xen-unstable: build fails
  2011-03-17  5:52   ` Juergen Gross
@ 2011-03-17  8:11     ` Keir Fraser
  2011-03-17  8:59       ` Juergen Gross
  0 siblings, 1 reply; 14+ messages in thread
From: Keir Fraser @ 2011-03-17  8:11 UTC (permalink / raw)
  To: Juergen Gross; +Cc: xen-devel

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: xen-unstable: build fails
  2011-03-16 16:50 ` Keir Fraser
@ 2011-03-17  5:52   ` Juergen Gross
  2011-03-17  8:11     ` Keir Fraser
  0 siblings, 1 reply; 14+ messages in thread
From: Juergen Gross @ 2011-03-17  5:52 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel

On 03/16/11 17:50, Keir Fraser wrote:
> On 16/03/2011 13:50, "Juergen Gross"<juergen.gross@ts.fujitsu.com>  wrote:
>
>> Hi,
>>
>> I've just set up a machine with OpenSuse 11.4 and tried to build Xen.
>>
>> Under root I did:
>>
>> hg clone http://xenbits.xensource.com/xen-unstable.hg
>> cd xen-unstable.hg
>> make xen
>>
>> The make failed with:
>>
>> make[4]: Entering directory `/root/xen-unstable.hg/xen/arch/x86/boot'
>> RELOC=0x7c000 make -f build32.mk reloc.S
>> make[5]: Entering directory `/root/xen-unstable.hg/xen/arch/x86/boot'
>> make[5]: *** ../../../../.config: Is a directory.  Stop.
>
> Seems to me that /root/xen-unstable.hg/xen/arch/x86/boot/../../../../.config
> resolves to /root/xen-unstable.hg/.config. Which is what is intended. Also I
> tried creating a .config dir just outside my own xen-unstable repo, and
> rebuoilding the hypervisor, and it works okay for me.

Okay, I checked it.
My build environment is under /root/xen-unstable.hg
I have .config directories in / and in /root
I created .config files on another machine without those directories in / and
in /root with a make error statement indicating which file is used:

make[4]: Entering directory `/root/xen-unstable.hg/xen/arch/x86/boot'
RELOC=0x7c000 make -f build32.mk reloc.S
make[5]: Entering directory `/root/xen-unstable.hg/xen/arch/x86/boot'
../../../../.config:1: *** error form /.config.  Stop.
make[5]: Leaving directory `/root/xen-unstable.hg/xen/arch/x86/boot'
make[4]: *** [reloc.S] Error 2
make[4]: Leaving directory `/root/xen-unstable.hg/xen/arch/x86/boot'
make[3]: *** [/root/xen-unstable.hg/xen/arch/x86/boot/built_in.o] Error 2
make[3]: Leaving directory `/root/xen-unstable.hg/xen/arch/x86'
make[2]: *** [/root/xen-unstable.hg/xen/xen] Error 2
make[2]: Leaving directory `/root/xen-unstable.hg/xen'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/root/xen-unstable.hg/xen'
make: *** [install-xen] Error 2


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...

>
>> 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

-- 
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: xen-unstable: build fails
  2011-03-16 13:50 xen-unstable: " Juergen Gross
  2011-03-16 14:45 ` Juergen Gross
@ 2011-03-16 16:50 ` Keir Fraser
  2011-03-17  5:52   ` Juergen Gross
  1 sibling, 1 reply; 14+ messages in thread
From: Keir Fraser @ 2011-03-16 16:50 UTC (permalink / raw)
  To: Juergen Gross, xen-devel

On 16/03/2011 13:50, "Juergen Gross" <juergen.gross@ts.fujitsu.com> wrote:

> Hi,
> 
> I've just set up a machine with OpenSuse 11.4 and tried to build Xen.
> 
> Under root I did:
> 
> hg clone http://xenbits.xensource.com/xen-unstable.hg
> cd xen-unstable.hg
> make xen
> 
> The make failed with:
> 
> make[4]: Entering directory `/root/xen-unstable.hg/xen/arch/x86/boot'
> RELOC=0x7c000 make -f build32.mk reloc.S
> make[5]: Entering directory `/root/xen-unstable.hg/xen/arch/x86/boot'
> make[5]: *** ../../../../.config: Is a directory.  Stop.

Seems to me that /root/xen-unstable.hg/xen/arch/x86/boot/../../../../.config
resolves to /root/xen-unstable.hg/.config. Which is what is intended. Also I
tried creating a .config dir just outside my own xen-unstable repo, and
rebuoilding the hypervisor, and it works okay for me.

> 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.

> 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.

 -- Keir

> I'd suggest to use
> 
> XEN_ROOT ?= $(PWD)/../..
> 
> instead. A patch is easily made, but affects ca. 100 Makefiles. And this
> change could break the possibility to just do a "make" in a subdirectory.
> 
> Opinions?
> 
> 
> Juergen

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: xen-unstable: build fails
  2011-03-16 13:50 xen-unstable: " Juergen Gross
@ 2011-03-16 14:45 ` Juergen Gross
  2011-03-16 16:50 ` Keir Fraser
  1 sibling, 0 replies; 14+ messages in thread
From: Juergen Gross @ 2011-03-16 14:45 UTC (permalink / raw)
  To: xen-devel

On 03/16/11 14:50, Juergen Gross wrote:
> Hi,
>
> I've just set up a machine with OpenSuse 11.4 and tried to build Xen.
>
> Under root I did:
>
> hg clone http://xenbits.xensource.com/xen-unstable.hg
> cd xen-unstable.hg
> make xen
>
> The make failed with:
>
> make[4]: Entering directory `/root/xen-unstable.hg/xen/arch/x86/boot'
> RELOC=0x7c000 make -f build32.mk reloc.S
> make[5]: Entering directory `/root/xen-unstable.hg/xen/arch/x86/boot'
> make[5]: *** ../../../../.config: Is a directory. Stop.
> make[5]: Leaving directory `/root/xen-unstable.hg/xen/arch/x86/boot'
> make[4]: *** [reloc.S] Error 2
> make[4]: Leaving directory `/root/xen-unstable.hg/xen/arch/x86/boot'
> make[3]: *** [/root/xen-unstable.hg/xen/arch/x86/boot/built_in.o] Error 2
> make[3]: Leaving directory `/root/xen-unstable.hg/xen/arch/x86'
> make[2]: *** [/root/xen-unstable.hg/xen/xen] Error 2
> make[2]: Leaving directory `/root/xen-unstable.hg/xen'
> make[1]: *** [install] Error 2
> make[1]: Leaving directory `/root/xen-unstable.hg/xen'
> make: *** [install-xen] Error 2
>
> The reason seems to be a directory /root/.config which isn't present on my
> other machines.

And /.config as well.

>
> make tools
>
> 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.
>
> I'd suggest to use
>
> XEN_ROOT ?= $(PWD)/../..

should be $(CURDIR), of course.

>
> instead. A patch is easily made, but affects ca. 100 Makefiles. And this
> change could break the possibility to just do a "make" in a subdirectory.

The patch isn't really easy, as more seems to go wrong.
I've changed some Makefiles and get now with "make tools":

make[4]: Leaving directory `/root/xen-unstable.hg/tools/include/xen-foreign'
/root/xen-unstable.hg/tools/cross-install -d -m0755 -p 
/root/xen-unstable.hg/dist/install/usr/include/xen/arch-ia64
/root/xen-unstable.hg/tools/cross-install -d -m0755 -p 
/root/xen-unstable.hg/dist/install/usr/include/xen/arch-ia64/hvm
/root/xen-unstable.hg/tools/cross-install -d -m0755 -p 
/root/xen-unstable.hg/dist/install/usr/include/xen/arch-x86
/root/xen-unstable.hg/tools/cross-install -d -m0755 -p 
/root/xen-unstable.hg/dist/install/usr/include/xen/arch-x86/hvm
/root/xen-unstable.hg/tools/cross-install -d -m0755 -p 
/root/xen-unstable.hg/dist/install/usr/include/xen/foreign
/root/xen-unstable.hg/tools/cross-install -d -m0755 -p 
/root/xen-unstable.hg/dist/install/usr/include/xen/hvm
/root/xen-unstable.hg/tools/cross-install -d -m0755 -p 
/root/xen-unstable.hg/dist/install/usr/include/xen/io
/root/xen-unstable.hg/tools/cross-install -d -m0755 -p 
/root/xen-unstable.hg/dist/install/usr/include/xen/sys
/root/xen-unstable.hg/tools/cross-install -d -m0755 -p 
/root/xen-unstable.hg/dist/install/usr/include/xen/xsm
/root/xen-unstable.hg/tools/cross-install -m0644 -p xen/COPYING 
/root/xen-unstable.hg/dist/install/usr/include/xen
install: cannot stat `xen/COPYING': No such file or directory
make[3]: *** [install] Error 1
make[3]: Leaving directory `/root/xen-unstable.hg/tools/include'
make[2]: *** [subdir-install-include] Error 2
make[2]: Leaving directory `/root/xen-unstable.hg/tools'
make[1]: *** [subdirs-install] Error 2
make[1]: Leaving directory `/root/xen-unstable.hg/tools'
make: *** [install-tools] Error 2


Juergen

-- 
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

* xen-unstable: build fails
@ 2011-03-16 13:50 Juergen Gross
  2011-03-16 14:45 ` Juergen Gross
  2011-03-16 16:50 ` Keir Fraser
  0 siblings, 2 replies; 14+ messages in thread
From: Juergen Gross @ 2011-03-16 13:50 UTC (permalink / raw)
  To: xen-devel

Hi,

I've just set up a machine with OpenSuse 11.4 and tried to build Xen.

Under root I did:

hg clone http://xenbits.xensource.com/xen-unstable.hg
cd xen-unstable.hg
make xen

The make failed with:

make[4]: Entering directory `/root/xen-unstable.hg/xen/arch/x86/boot'
RELOC=0x7c000 make -f build32.mk reloc.S
make[5]: Entering directory `/root/xen-unstable.hg/xen/arch/x86/boot'
make[5]: *** ../../../../.config: Is a directory.  Stop.
make[5]: Leaving directory `/root/xen-unstable.hg/xen/arch/x86/boot'
make[4]: *** [reloc.S] Error 2
make[4]: Leaving directory `/root/xen-unstable.hg/xen/arch/x86/boot'
make[3]: *** [/root/xen-unstable.hg/xen/arch/x86/boot/built_in.o] Error 2
make[3]: Leaving directory `/root/xen-unstable.hg/xen/arch/x86'
make[2]: *** [/root/xen-unstable.hg/xen/xen] Error 2
make[2]: Leaving directory `/root/xen-unstable.hg/xen'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/root/xen-unstable.hg/xen'
make: *** [install-xen] Error 2

The reason seems to be a directory /root/.config which isn't present on my
other machines.

make tools

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.

I'd suggest to use

XEN_ROOT ?= $(PWD)/../..

instead. A patch is easily made, but affects ca. 100 Makefiles. And this
change could break the possibility to just do a "make" in a subdirectory.

Opinions?


Juergen

-- 
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@ts.fujitsu.com
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-03-17 10:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-05  5:46 xen-unstable build fails Juergen Gross
2010-05-05  6:31 ` Shriram R
2010-05-05  9:00 ` Keir Fraser
2011-03-16 13:50 xen-unstable: " 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
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.