All of lore.kernel.org
 help / color / mirror / Atom feed
* Xen commit 9b0bc91b3 possibly removed too much info from README
@ 2019-04-11  8:09 ` Kevin Buckley
  0 siblings, 0 replies; 52+ messages in thread
From: Kevin Buckley @ 2019-04-11  8:09 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Wei Liu

Firstly, want to say how happy I was to see the reliance on Python2 go,
not least, as a Linux From Scratch builder, where Python3 is now part
of the "core OS", one doesn't have to also install Python2, however,

I grabbed your master branch last night (cb70a26) to try things out and
still fell foul of a "need to define PYTHON" at the tools/configure stage.

My issue is resulting from the fact that Python3 has only been installed as
"python3", whereas the configure script in the tools directory appears to
be looking for a bare "python".

Now, the relevant text in the old README used to say

--8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--
Note that the build system expects `python` to be python2.  If your system
has `python` pointing to python3 (as in the case of Arch Linux or Anaconda),
you'll need to specify a path to a python2 binary when running configure:

     PYTHON=/usr/bin/python2 ./configure
--8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--


but it strikes me that some systems may only have an explicitly named
python3, in which case, it might have been better to not have completely
removed the "how to define your local PYTHON" paragraph, but to have
re-worded it to note that if only have python3 (or perhaps don't have a
bare pythin) then you'll need to explicitly define it at the configure stage
and to show how it's done.

Hoping that's useful,
Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [Xen-devel] Xen commit 9b0bc91b3 possibly removed too much info from README
@ 2019-04-11  8:09 ` Kevin Buckley
  0 siblings, 0 replies; 52+ messages in thread
From: Kevin Buckley @ 2019-04-11  8:09 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Wei Liu

Firstly, want to say how happy I was to see the reliance on Python2 go,
not least, as a Linux From Scratch builder, where Python3 is now part
of the "core OS", one doesn't have to also install Python2, however,

I grabbed your master branch last night (cb70a26) to try things out and
still fell foul of a "need to define PYTHON" at the tools/configure stage.

My issue is resulting from the fact that Python3 has only been installed as
"python3", whereas the configure script in the tools directory appears to
be looking for a bare "python".

Now, the relevant text in the old README used to say

--8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--
Note that the build system expects `python` to be python2.  If your system
has `python` pointing to python3 (as in the case of Arch Linux or Anaconda),
you'll need to specify a path to a python2 binary when running configure:

     PYTHON=/usr/bin/python2 ./configure
--8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--


but it strikes me that some systems may only have an explicitly named
python3, in which case, it might have been better to not have completely
removed the "how to define your local PYTHON" paragraph, but to have
re-worded it to note that if only have python3 (or perhaps don't have a
bare pythin) then you'll need to explicitly define it at the configure stage
and to show how it's done.

Hoping that's useful,
Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Xen commit 9b0bc91b3 possibly removed too much info from README
@ 2019-04-11 10:28   ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-11 10:28 UTC (permalink / raw)
  To: Kevin Buckley; +Cc: xen-devel, Wei Liu, Andrew Cooper

On Thu, Apr 11, 2019 at 04:09:42PM +0800, Kevin Buckley wrote:
> Firstly, want to say how happy I was to see the reliance on Python2 go,
> not least, as a Linux From Scratch builder, where Python3 is now part
> of the "core OS", one doesn't have to also install Python2, however,
> 
> I grabbed your master branch last night (cb70a26) to try things out and
> still fell foul of a "need to define PYTHON" at the tools/configure stage.
> 
> My issue is resulting from the fact that Python3 has only been installed as
> "python3", whereas the configure script in the tools directory appears to
> be looking for a bare "python".

Interesting.

Looking only for python was certainly the intent because I expected all
distros have it pointed to either python2 or python3.

But it appears that LFS doesn't do that.

> 
> Now, the relevant text in the old README used to say
> 
> --8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--
> Note that the build system expects `python` to be python2.  If your system
> has `python` pointing to python3 (as in the case of Arch Linux or Anaconda),
> you'll need to specify a path to a python2 binary when running configure:
> 
>      PYTHON=/usr/bin/python2 ./configure
> --8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--
> 
> 
> but it strikes me that some systems may only have an explicitly named
> python3, in which case, it might have been better to not have completely
> removed the "how to define your local PYTHON" paragraph, but to have
> re-worded it to note that if only have python3 (or perhaps don't have a
> bare pythin) then you'll need to explicitly define it at the configure stage
> and to show how it's done.

Sure. I will write a patch.

Wei.

> 
> Hoping that's useful,
> Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Xen commit 9b0bc91b3 possibly removed too much info from README
@ 2019-04-11 10:28   ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-11 10:28 UTC (permalink / raw)
  To: Kevin Buckley; +Cc: xen-devel, Wei Liu, Andrew Cooper

On Thu, Apr 11, 2019 at 04:09:42PM +0800, Kevin Buckley wrote:
> Firstly, want to say how happy I was to see the reliance on Python2 go,
> not least, as a Linux From Scratch builder, where Python3 is now part
> of the "core OS", one doesn't have to also install Python2, however,
> 
> I grabbed your master branch last night (cb70a26) to try things out and
> still fell foul of a "need to define PYTHON" at the tools/configure stage.
> 
> My issue is resulting from the fact that Python3 has only been installed as
> "python3", whereas the configure script in the tools directory appears to
> be looking for a bare "python".

Interesting.

Looking only for python was certainly the intent because I expected all
distros have it pointed to either python2 or python3.

But it appears that LFS doesn't do that.

> 
> Now, the relevant text in the old README used to say
> 
> --8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--
> Note that the build system expects `python` to be python2.  If your system
> has `python` pointing to python3 (as in the case of Arch Linux or Anaconda),
> you'll need to specify a path to a python2 binary when running configure:
> 
>      PYTHON=/usr/bin/python2 ./configure
> --8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<--
> 
> 
> but it strikes me that some systems may only have an explicitly named
> python3, in which case, it might have been better to not have completely
> removed the "how to define your local PYTHON" paragraph, but to have
> re-worded it to note that if only have python3 (or perhaps don't have a
> bare pythin) then you'll need to explicitly define it at the configure stage
> and to show how it's done.

Sure. I will write a patch.

Wei.

> 
> Hoping that's useful,
> Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Xen commit 9b0bc91b3 possibly removed too much info from README
@ 2019-04-13  3:17     ` Kevin Buckley
  0 siblings, 0 replies; 52+ messages in thread
From: Kevin Buckley @ 2019-04-13  3:17 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, Andrew Cooper

On Thu, 11 Apr 2019 at 18:29, Wei Liu <wei.liu2@citrix.com> wrote:
>
> ...
> Sure. I will write a patch.
>
> Wei.

Couple of other things I noticed after posting the original observation,
that might be of use in patching the documentation

1)

The tools/Makefile has a bare PYTHON EnvVar that isn't seemingly
replaced by the PYTHON= value supplied to configure, so I also
needed to specify the

PYTHON=/path/to/interpreter

as an argument to the "make world" as well as to the configure.


2)

In the top-level INSTALL file, we read

----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
SMBIOS_REL_DATE=mm/dd/yyyy
VGABIOS_REL_DATE="dd Mon yyyy"

During tools build external repos will be cloned into the source tree.
This variable can be used to point to a different git binary to be used.
GIT=

During tools build external repos will be cloned into the source tree.
During stubdom build external packages will be downloaded into the
source tree. These variables can be used to point to a different
locations.
XEN_EXTFILES_URL=
OVMF_UPSTREAM_URL=
----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----

Is that second

   During tools build external repos will be cloned into the source tree.

above the

   During stubdom build

required ?

FWIW, I noticed (2)  because I didn't have Git in my LFS system at
point that I was trying to build Xen inside it.

Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Xen commit 9b0bc91b3 possibly removed too much info from README
@ 2019-04-13  3:17     ` Kevin Buckley
  0 siblings, 0 replies; 52+ messages in thread
From: Kevin Buckley @ 2019-04-13  3:17 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, Andrew Cooper

On Thu, 11 Apr 2019 at 18:29, Wei Liu <wei.liu2@citrix.com> wrote:
>
> ...
> Sure. I will write a patch.
>
> Wei.

Couple of other things I noticed after posting the original observation,
that might be of use in patching the documentation

1)

The tools/Makefile has a bare PYTHON EnvVar that isn't seemingly
replaced by the PYTHON= value supplied to configure, so I also
needed to specify the

PYTHON=/path/to/interpreter

as an argument to the "make world" as well as to the configure.


2)

In the top-level INSTALL file, we read

----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
SMBIOS_REL_DATE=mm/dd/yyyy
VGABIOS_REL_DATE="dd Mon yyyy"

During tools build external repos will be cloned into the source tree.
This variable can be used to point to a different git binary to be used.
GIT=

During tools build external repos will be cloned into the source tree.
During stubdom build external packages will be downloaded into the
source tree. These variables can be used to point to a different
locations.
XEN_EXTFILES_URL=
OVMF_UPSTREAM_URL=
----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----

Is that second

   During tools build external repos will be cloned into the source tree.

above the

   During stubdom build

required ?

FWIW, I noticed (2)  because I didn't have Git in my LFS system at
point that I was trying to build Xen inside it.

Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Xen commit 9b0bc91b3 possibly removed too much info from README
@ 2019-04-15  9:23       ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-15  9:23 UTC (permalink / raw)
  To: Kevin Buckley; +Cc: xen-devel, Wei Liu, Andrew Cooper

On Sat, Apr 13, 2019 at 11:17:48AM +0800, Kevin Buckley wrote:
> On Thu, 11 Apr 2019 at 18:29, Wei Liu <wei.liu2@citrix.com> wrote:
> >
> > ...
> > Sure. I will write a patch.
> >
> > Wei.
> 
> Couple of other things I noticed after posting the original observation,
> that might be of use in patching the documentation
> 
> 1)
> 
> The tools/Makefile has a bare PYTHON EnvVar that isn't seemingly
> replaced by the PYTHON= value supplied to configure, so I also
> needed to specify the
> 
> PYTHON=/path/to/interpreter
> 
> as an argument to the "make world" as well as to the configure.

The only appearance of PYTHON in tools/Makefile is in the qemu build.
It already has the right form.

I tested the following:

    $ PYTHON=/usr/bin/python3 ./configure
    $ make -j8 world 2>&1 | tee log # broken atm unfortunately
    $ make -C tools subdir-all-qemu-xen-dir # the rune which has PYTHON in it

And then I looked for the relevant bits in log:

PKG_CONFIG_PATH=/local/work/xen.git/tools/../tools/pkg-config${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}} \
$source/configure --enable-xen --target-list=i386-softmmu \
        ....
        --python=python3 \

Not sure which bare PYTHON EnvVar you referred to. Can you clarify?

> 
> 
> 2)
> 
> In the top-level INSTALL file, we read
> 
> ----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
> SMBIOS_REL_DATE=mm/dd/yyyy
> VGABIOS_REL_DATE="dd Mon yyyy"
> 
> During tools build external repos will be cloned into the source tree.
> This variable can be used to point to a different git binary to be used.
> GIT=
> 
> During tools build external repos will be cloned into the source tree.
> During stubdom build external packages will be downloaded into the
> source tree. These variables can be used to point to a different
> locations.
> XEN_EXTFILES_URL=
> OVMF_UPSTREAM_URL=
> ----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
> 
> Is that second
> 
>    During tools build external repos will be cloned into the source tree.
> 
> above the
> 
>    During stubdom build

This is a bit xen specific -- we consider stubdom and tools two separate
components inside xen.git because they have their own directories.

That sentence can indeed be simplified. I will submit a patch for that.

Wei.


> 
> required ?
> 
> FWIW, I noticed (2)  because I didn't have Git in my LFS system at
> point that I was trying to build Xen inside it.
> 
> Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Xen commit 9b0bc91b3 possibly removed too much info from README
@ 2019-04-15  9:23       ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-15  9:23 UTC (permalink / raw)
  To: Kevin Buckley; +Cc: xen-devel, Wei Liu, Andrew Cooper

On Sat, Apr 13, 2019 at 11:17:48AM +0800, Kevin Buckley wrote:
> On Thu, 11 Apr 2019 at 18:29, Wei Liu <wei.liu2@citrix.com> wrote:
> >
> > ...
> > Sure. I will write a patch.
> >
> > Wei.
> 
> Couple of other things I noticed after posting the original observation,
> that might be of use in patching the documentation
> 
> 1)
> 
> The tools/Makefile has a bare PYTHON EnvVar that isn't seemingly
> replaced by the PYTHON= value supplied to configure, so I also
> needed to specify the
> 
> PYTHON=/path/to/interpreter
> 
> as an argument to the "make world" as well as to the configure.

The only appearance of PYTHON in tools/Makefile is in the qemu build.
It already has the right form.

I tested the following:

    $ PYTHON=/usr/bin/python3 ./configure
    $ make -j8 world 2>&1 | tee log # broken atm unfortunately
    $ make -C tools subdir-all-qemu-xen-dir # the rune which has PYTHON in it

And then I looked for the relevant bits in log:

PKG_CONFIG_PATH=/local/work/xen.git/tools/../tools/pkg-config${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}} \
$source/configure --enable-xen --target-list=i386-softmmu \
        ....
        --python=python3 \

Not sure which bare PYTHON EnvVar you referred to. Can you clarify?

> 
> 
> 2)
> 
> In the top-level INSTALL file, we read
> 
> ----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
> SMBIOS_REL_DATE=mm/dd/yyyy
> VGABIOS_REL_DATE="dd Mon yyyy"
> 
> During tools build external repos will be cloned into the source tree.
> This variable can be used to point to a different git binary to be used.
> GIT=
> 
> During tools build external repos will be cloned into the source tree.
> During stubdom build external packages will be downloaded into the
> source tree. These variables can be used to point to a different
> locations.
> XEN_EXTFILES_URL=
> OVMF_UPSTREAM_URL=
> ----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
> 
> Is that second
> 
>    During tools build external repos will be cloned into the source tree.
> 
> above the
> 
>    During stubdom build

This is a bit xen specific -- we consider stubdom and tools two separate
components inside xen.git because they have their own directories.

That sentence can indeed be simplified. I will submit a patch for that.

Wei.


> 
> required ?
> 
> FWIW, I noticed (2)  because I didn't have Git in my LFS system at
> point that I was trying to build Xen inside it.
> 
> Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Xen commit 9b0bc91b3 possibly removed too much info from README
@ 2019-04-15  9:36         ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-15  9:36 UTC (permalink / raw)
  To: Kevin Buckley; +Cc: xen-devel, Wei Liu, Andrew Cooper

On Mon, Apr 15, 2019 at 10:23:58AM +0100, Wei Liu wrote:
> > 2)
> > 
> > In the top-level INSTALL file, we read
> > 
> > ----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
> > SMBIOS_REL_DATE=mm/dd/yyyy
> > VGABIOS_REL_DATE="dd Mon yyyy"
> > 
> > During tools build external repos will be cloned into the source tree.
> > This variable can be used to point to a different git binary to be used.
> > GIT=
> > 
> > During tools build external repos will be cloned into the source tree.
> > During stubdom build external packages will be downloaded into the
> > source tree. These variables can be used to point to a different
> > locations.
> > XEN_EXTFILES_URL=
> > OVMF_UPSTREAM_URL=
> > ----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
> > 
> > Is that second
> > 
> >    During tools build external repos will be cloned into the source tree.
> > 
> > above the
> > 
> >    During stubdom build
> 
> This is a bit xen specific -- we consider stubdom and tools two separate
> components inside xen.git because they have their own directories.
> 
> That sentence can indeed be simplified. I will submit a patch for that.

Oh wait, I don't think there is anything to fix there. Those sentences
look repetitive but they do say different things: in tools case, it says
"repos will be cloned"; in stubdom case, it says "external packages
will be downloaded. So they do reflect correctly what will happen.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Xen commit 9b0bc91b3 possibly removed too much info from README
@ 2019-04-15  9:36         ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-15  9:36 UTC (permalink / raw)
  To: Kevin Buckley; +Cc: xen-devel, Wei Liu, Andrew Cooper

On Mon, Apr 15, 2019 at 10:23:58AM +0100, Wei Liu wrote:
> > 2)
> > 
> > In the top-level INSTALL file, we read
> > 
> > ----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
> > SMBIOS_REL_DATE=mm/dd/yyyy
> > VGABIOS_REL_DATE="dd Mon yyyy"
> > 
> > During tools build external repos will be cloned into the source tree.
> > This variable can be used to point to a different git binary to be used.
> > GIT=
> > 
> > During tools build external repos will be cloned into the source tree.
> > During stubdom build external packages will be downloaded into the
> > source tree. These variables can be used to point to a different
> > locations.
> > XEN_EXTFILES_URL=
> > OVMF_UPSTREAM_URL=
> > ----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
> > 
> > Is that second
> > 
> >    During tools build external repos will be cloned into the source tree.
> > 
> > above the
> > 
> >    During stubdom build
> 
> This is a bit xen specific -- we consider stubdom and tools two separate
> components inside xen.git because they have their own directories.
> 
> That sentence can indeed be simplified. I will submit a patch for that.

Oh wait, I don't think there is anything to fix there. Those sentences
look repetitive but they do say different things: in tools case, it says
"repos will be cloned"; in stubdom case, it says "external packages
will be downloaded. So they do reflect correctly what will happen.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Xen commit 9b0bc91b3 possibly removed too much info from README
@ 2019-04-16 13:28         ` Kevin Buckley
  0 siblings, 0 replies; 52+ messages in thread
From: Kevin Buckley @ 2019-04-16 13:28 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, Andrew Cooper

On Mon, 15 Apr 2019 at 17:24, Wei Liu <wei.liu2@citrix.com> wrote:
>
> On Sat, Apr 13, 2019 at 11:17:48AM +0800, Kevin Buckley wrote:
> > On Thu, 11 Apr 2019 at 18:29, Wei Liu <wei.liu2@citrix.com> wrote:
> > >
> > > ...
> > > Sure. I will write a patch.
> > >
> > > Wei.
> >
> > Couple of other things I noticed after posting the original observation,
> > that might be of use in patching the documentation
> >
> > 1)
> >
> > The tools/Makefile has a bare PYTHON EnvVar that isn't seemingly
> > replaced by the PYTHON= value supplied to configure, so I also
> > needed to specify the
> >
> > PYTHON=/path/to/interpreter
> >
> > as an argument to the "make world" as well as to the configure.
>
> The only appearance of PYTHON in tools/Makefile is in the qemu build.
> It already has the right form.
>
> I tested the following:
>
>     $ PYTHON=/usr/bin/python3 ./configure
>     $ make -j8 world 2>&1 | tee log # broken atm unfortunately
>     $ make -C tools subdir-all-qemu-xen-dir # the rune which has PYTHON in it
>
> And then I looked for the relevant bits in log:
>
> PKG_CONFIG_PATH=/local/work/xen.git/tools/../tools/pkg-config${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}} \
> $source/configure --enable-xen --target-list=i386-softmmu \
>         ....
>         --python=python3 \
>
> Not sure which bare PYTHON EnvVar you referred to. Can you clarify?


Here's what i did having pulled the master at commit cb70a26

tar xf /path/to/xen-cb70a26.tar.gz

cd xen-master/

PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
   --disable-seabios   \
   --disable-qemu-traditional  \
   --disable-rombios     \
   --disable-stubdom 2>&1 | tee ../config.log

make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out


...
gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
-D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
-DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
tools/kconfig/zconf.tab.c
gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
tools/kconfig/conf -s --silentoldconfig Kconfig
make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
make -f Rules.mk _install
make[3]: Entering directory '/usr/src/xen/xen-master/xen'
make -C tools
make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
make symbols
make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
-fno-strict-aliasing -Wdeclaration-after-statement -o symbols
symbols.c
make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
make[4]: Entering directory '/usr/src/xen/xen-master/xen'
 Xen 4.13-unstable
/bin/sh: python: command not found
make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
make[2]: *** [Makefile:45: install] Error 2
make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
make[1]: *** [Makefile:123: install-xen] Error 2
make[1]: Leaving directory '/usr/src/xen/xen-master'
make: *** [Makefile:165: world] Error 2


Note the

/bin/sh: python: command not found

whilst, in the tools/Makefile,, I see

        PKG_CONFIG_PATH=$(XEN_ROOT)/tools/pkg-config$${PKG_CONFIG_PATH:+:$${PKG_CONFIG_PATH}}
\
        $$source/configure --enable-xen --target-list=i386-softmmu \
                $(QEMU_XEN_ENABLE_DEBUG) \
                $$enable_trace_backend \
                --prefix=$(LIBEXEC) \
                --libdir=$(LIBEXEC_LIB) \
                --includedir=$(LIBEXEC_INC) \
                --source-path=$$source \
                --extra-cflags="-DXC_WANT_COMPAT_EVTCHN_API=1 \
                -DXC_WANT_COMPAT_GNTTAB_API=1 \
                -DXC_WANT_COMPAT_MAP_FOREIGN_API=1 \
                -DXC_WANT_COMPAT_DEVICEMODEL_API=1 \
                -I$(XEN_ROOT)/tools/include \
                -I$(XEN_ROOT)/tools/libs/toolcore/include \
                -I$(XEN_ROOT)/tools/libs/toollog/include \
                -I$(XEN_ROOT)/tools/libs/evtchn/include \
                -I$(XEN_ROOT)/tools/libs/gnttab/include \
                -I$(XEN_ROOT)/tools/libs/foreignmemory/include \
                -I$(XEN_ROOT)/tools/libs/devicemodel/include \
                -I$(XEN_ROOT)/tools/libxc/include \
                -I$(XEN_ROOT)/tools/xenstore/include \
                -I$(XEN_ROOT)/tools/xenstore/compat/include \
                $(EXTRA_CFLAGS_QEMU_XEN)" \
                --extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
                -L$(XEN_ROOT)/tools/xenstore \
                -L$(XEN_ROOT)/tools/libs/toolcore \
                -L$(XEN_ROOT)/tools/libs/evtchn \
                -L$(XEN_ROOT)/tools/libs/gnttab \
                -L$(XEN_ROOT)/tools/libs/foreignmemory \
                -L$(XEN_ROOT)/tools/libs/devicemodel \
                -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/toolcore \
                -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/toollog \
                -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/evtchn \
                -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/gnttab \
                -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/call \
                -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/foreignmemory \
                -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/devicemodel \
                $(QEMU_UPSTREAM_RPATH)" \
                --bindir=$(LIBEXEC_BIN) \
                --datadir=$(SHAREDIR)/qemu-xen \
                --localstatedir=$(localstatedir) \
                --disable-kvm \
                --disable-docs \
                --disable-guest-agent \
                --python=$(PYTHON) \
                $(CONFIG_QEMUU_EXTRA_ARGS) \
                --cpu=$(IOEMU_CPU_ARCH) \
                $(IOEMU_CONFIGURE_CROSS) \
                $$virtfs; \
        $(MAKE) all


Note the

                --python=$(PYTHON) \


which is the "bare" python I referred to.

Clearly, if it builds for you then I have missed something?

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Xen commit 9b0bc91b3 possibly removed too much info from README
@ 2019-04-16 13:28         ` Kevin Buckley
  0 siblings, 0 replies; 52+ messages in thread
From: Kevin Buckley @ 2019-04-16 13:28 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, Andrew Cooper

On Mon, 15 Apr 2019 at 17:24, Wei Liu <wei.liu2@citrix.com> wrote:
>
> On Sat, Apr 13, 2019 at 11:17:48AM +0800, Kevin Buckley wrote:
> > On Thu, 11 Apr 2019 at 18:29, Wei Liu <wei.liu2@citrix.com> wrote:
> > >
> > > ...
> > > Sure. I will write a patch.
> > >
> > > Wei.
> >
> > Couple of other things I noticed after posting the original observation,
> > that might be of use in patching the documentation
> >
> > 1)
> >
> > The tools/Makefile has a bare PYTHON EnvVar that isn't seemingly
> > replaced by the PYTHON= value supplied to configure, so I also
> > needed to specify the
> >
> > PYTHON=/path/to/interpreter
> >
> > as an argument to the "make world" as well as to the configure.
>
> The only appearance of PYTHON in tools/Makefile is in the qemu build.
> It already has the right form.
>
> I tested the following:
>
>     $ PYTHON=/usr/bin/python3 ./configure
>     $ make -j8 world 2>&1 | tee log # broken atm unfortunately
>     $ make -C tools subdir-all-qemu-xen-dir # the rune which has PYTHON in it
>
> And then I looked for the relevant bits in log:
>
> PKG_CONFIG_PATH=/local/work/xen.git/tools/../tools/pkg-config${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}} \
> $source/configure --enable-xen --target-list=i386-softmmu \
>         ....
>         --python=python3 \
>
> Not sure which bare PYTHON EnvVar you referred to. Can you clarify?


Here's what i did having pulled the master at commit cb70a26

tar xf /path/to/xen-cb70a26.tar.gz

cd xen-master/

PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
   --disable-seabios   \
   --disable-qemu-traditional  \
   --disable-rombios     \
   --disable-stubdom 2>&1 | tee ../config.log

make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out


...
gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
-D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
-DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
tools/kconfig/zconf.tab.c
gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
tools/kconfig/conf -s --silentoldconfig Kconfig
make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
make -f Rules.mk _install
make[3]: Entering directory '/usr/src/xen/xen-master/xen'
make -C tools
make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
make symbols
make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
-fno-strict-aliasing -Wdeclaration-after-statement -o symbols
symbols.c
make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
make[4]: Entering directory '/usr/src/xen/xen-master/xen'
 Xen 4.13-unstable
/bin/sh: python: command not found
make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
make[2]: *** [Makefile:45: install] Error 2
make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
make[1]: *** [Makefile:123: install-xen] Error 2
make[1]: Leaving directory '/usr/src/xen/xen-master'
make: *** [Makefile:165: world] Error 2


Note the

/bin/sh: python: command not found

whilst, in the tools/Makefile,, I see

        PKG_CONFIG_PATH=$(XEN_ROOT)/tools/pkg-config$${PKG_CONFIG_PATH:+:$${PKG_CONFIG_PATH}}
\
        $$source/configure --enable-xen --target-list=i386-softmmu \
                $(QEMU_XEN_ENABLE_DEBUG) \
                $$enable_trace_backend \
                --prefix=$(LIBEXEC) \
                --libdir=$(LIBEXEC_LIB) \
                --includedir=$(LIBEXEC_INC) \
                --source-path=$$source \
                --extra-cflags="-DXC_WANT_COMPAT_EVTCHN_API=1 \
                -DXC_WANT_COMPAT_GNTTAB_API=1 \
                -DXC_WANT_COMPAT_MAP_FOREIGN_API=1 \
                -DXC_WANT_COMPAT_DEVICEMODEL_API=1 \
                -I$(XEN_ROOT)/tools/include \
                -I$(XEN_ROOT)/tools/libs/toolcore/include \
                -I$(XEN_ROOT)/tools/libs/toollog/include \
                -I$(XEN_ROOT)/tools/libs/evtchn/include \
                -I$(XEN_ROOT)/tools/libs/gnttab/include \
                -I$(XEN_ROOT)/tools/libs/foreignmemory/include \
                -I$(XEN_ROOT)/tools/libs/devicemodel/include \
                -I$(XEN_ROOT)/tools/libxc/include \
                -I$(XEN_ROOT)/tools/xenstore/include \
                -I$(XEN_ROOT)/tools/xenstore/compat/include \
                $(EXTRA_CFLAGS_QEMU_XEN)" \
                --extra-ldflags="-L$(XEN_ROOT)/tools/libxc \
                -L$(XEN_ROOT)/tools/xenstore \
                -L$(XEN_ROOT)/tools/libs/toolcore \
                -L$(XEN_ROOT)/tools/libs/evtchn \
                -L$(XEN_ROOT)/tools/libs/gnttab \
                -L$(XEN_ROOT)/tools/libs/foreignmemory \
                -L$(XEN_ROOT)/tools/libs/devicemodel \
                -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/toolcore \
                -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/toollog \
                -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/evtchn \
                -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/gnttab \
                -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/call \
                -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/foreignmemory \
                -Wl,-rpath-link=$(XEN_ROOT)/tools/libs/devicemodel \
                $(QEMU_UPSTREAM_RPATH)" \
                --bindir=$(LIBEXEC_BIN) \
                --datadir=$(SHAREDIR)/qemu-xen \
                --localstatedir=$(localstatedir) \
                --disable-kvm \
                --disable-docs \
                --disable-guest-agent \
                --python=$(PYTHON) \
                $(CONFIG_QEMUU_EXTRA_ARGS) \
                --cpu=$(IOEMU_CPU_ARCH) \
                $(IOEMU_CONFIGURE_CROSS) \
                $$virtfs; \
        $(MAKE) all


Note the

                --python=$(PYTHON) \


which is the "bare" python I referred to.

Clearly, if it builds for you then I have missed something?

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Xen commit 9b0bc91b3 possibly removed too much info from README
@ 2019-04-16 13:31           ` Kevin Buckley
  0 siblings, 0 replies; 52+ messages in thread
From: Kevin Buckley @ 2019-04-16 13:31 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, Andrew Cooper

> Oh wait, I don't think there is anything to fix there. Those sentences
> look repetitive but they do say different things: in tools case, it says
> "repos will be cloned"; in stubdom case, it says "external packages
> will be downloaded. So they do reflect correctly what will happen.
>

Let me narrow things down a bit further to highlight the duplication

----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
During tools build external repos will be cloned into the source tree.    <=== 1
This variable can be used to point to a different git binary to be used.
GIT=

During tools build external repos will be cloned into the source tree.    <=== 2
During stubdom build external packages will be downloaded into the
source tree. These variables can be used to point to a different
locations.
 XEN_EXTFILES_URL=
OVMF_UPSTREAM_URL=
----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----

Hope that's clearer ?

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Xen commit 9b0bc91b3 possibly removed too much info from README
@ 2019-04-16 13:31           ` Kevin Buckley
  0 siblings, 0 replies; 52+ messages in thread
From: Kevin Buckley @ 2019-04-16 13:31 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, Andrew Cooper

> Oh wait, I don't think there is anything to fix there. Those sentences
> look repetitive but they do say different things: in tools case, it says
> "repos will be cloned"; in stubdom case, it says "external packages
> will be downloaded. So they do reflect correctly what will happen.
>

Let me narrow things down a bit further to highlight the duplication

----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
During tools build external repos will be cloned into the source tree.    <=== 1
This variable can be used to point to a different git binary to be used.
GIT=

During tools build external repos will be cloned into the source tree.    <=== 2
During stubdom build external packages will be downloaded into the
source tree. These variables can be used to point to a different
locations.
 XEN_EXTFILES_URL=
OVMF_UPSTREAM_URL=
----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----

Hope that's clearer ?

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Xen commit 9b0bc91b3 possibly removed too much info from README
@ 2019-04-17  9:56           ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-17  9:56 UTC (permalink / raw)
  To: Kevin Buckley; +Cc: xen-devel, Wei Liu, Andrew Cooper

On Tue, Apr 16, 2019 at 09:28:01PM +0800, Kevin Buckley wrote:
> On Mon, 15 Apr 2019 at 17:24, Wei Liu <wei.liu2@citrix.com> wrote:
> >
> > On Sat, Apr 13, 2019 at 11:17:48AM +0800, Kevin Buckley wrote:
> > > On Thu, 11 Apr 2019 at 18:29, Wei Liu <wei.liu2@citrix.com> wrote:
> > > >
> > > > ...
> > > > Sure. I will write a patch.
> > > >
> > > > Wei.
> > >
> > > Couple of other things I noticed after posting the original observation,
> > > that might be of use in patching the documentation
> > >
> > > 1)
> > >
> > > The tools/Makefile has a bare PYTHON EnvVar that isn't seemingly
> > > replaced by the PYTHON= value supplied to configure, so I also
> > > needed to specify the
> > >
> > > PYTHON=/path/to/interpreter
> > >
> > > as an argument to the "make world" as well as to the configure.
> >
> > The only appearance of PYTHON in tools/Makefile is in the qemu build.
> > It already has the right form.
> >
> > I tested the following:
> >
> >     $ PYTHON=/usr/bin/python3 ./configure
> >     $ make -j8 world 2>&1 | tee log # broken atm unfortunately
> >     $ make -C tools subdir-all-qemu-xen-dir # the rune which has PYTHON in it
> >
> > And then I looked for the relevant bits in log:
> >
> > PKG_CONFIG_PATH=/local/work/xen.git/tools/../tools/pkg-config${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}} \
> > $source/configure --enable-xen --target-list=i386-softmmu \
> >         ....
> >         --python=python3 \
> >
> > Not sure which bare PYTHON EnvVar you referred to. Can you clarify?
> 
> 
> Here's what i did having pulled the master at commit cb70a26
> 
> tar xf /path/to/xen-cb70a26.tar.gz
> 
> cd xen-master/
> 
> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
>    --disable-seabios   \
>    --disable-qemu-traditional  \
>    --disable-rombios     \
>    --disable-stubdom 2>&1 | tee ../config.log
> 
> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
> 
> 
> ...
> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
> tools/kconfig/zconf.tab.c
> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
> tools/kconfig/conf -s --silentoldconfig Kconfig
> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> make -f Rules.mk _install
> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
> make -C tools
> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> make symbols
> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
> symbols.c
> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
>  Xen 4.13-unstable
> /bin/sh: python: command not found
> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127

Here. The PYTHON invocation is from the hypervisor build, not the tools
build.

Thanks for the log.  I will have a closer look.

> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> make[2]: *** [Makefile:45: install] Error 2
> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
> make[1]: *** [Makefile:123: install-xen] Error 2
> make[1]: Leaving directory '/usr/src/xen/xen-master'
> make: *** [Makefile:165: world] Error 2
> 
> 
> Note the
> 
> /bin/sh: python: command not found
> 
> whilst, in the tools/Makefile,, I see

I think tools build is fine. It's hypervisor build that is broken.


Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Xen commit 9b0bc91b3 possibly removed too much info from README
@ 2019-04-17  9:56           ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-17  9:56 UTC (permalink / raw)
  To: Kevin Buckley; +Cc: xen-devel, Wei Liu, Andrew Cooper

On Tue, Apr 16, 2019 at 09:28:01PM +0800, Kevin Buckley wrote:
> On Mon, 15 Apr 2019 at 17:24, Wei Liu <wei.liu2@citrix.com> wrote:
> >
> > On Sat, Apr 13, 2019 at 11:17:48AM +0800, Kevin Buckley wrote:
> > > On Thu, 11 Apr 2019 at 18:29, Wei Liu <wei.liu2@citrix.com> wrote:
> > > >
> > > > ...
> > > > Sure. I will write a patch.
> > > >
> > > > Wei.
> > >
> > > Couple of other things I noticed after posting the original observation,
> > > that might be of use in patching the documentation
> > >
> > > 1)
> > >
> > > The tools/Makefile has a bare PYTHON EnvVar that isn't seemingly
> > > replaced by the PYTHON= value supplied to configure, so I also
> > > needed to specify the
> > >
> > > PYTHON=/path/to/interpreter
> > >
> > > as an argument to the "make world" as well as to the configure.
> >
> > The only appearance of PYTHON in tools/Makefile is in the qemu build.
> > It already has the right form.
> >
> > I tested the following:
> >
> >     $ PYTHON=/usr/bin/python3 ./configure
> >     $ make -j8 world 2>&1 | tee log # broken atm unfortunately
> >     $ make -C tools subdir-all-qemu-xen-dir # the rune which has PYTHON in it
> >
> > And then I looked for the relevant bits in log:
> >
> > PKG_CONFIG_PATH=/local/work/xen.git/tools/../tools/pkg-config${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}} \
> > $source/configure --enable-xen --target-list=i386-softmmu \
> >         ....
> >         --python=python3 \
> >
> > Not sure which bare PYTHON EnvVar you referred to. Can you clarify?
> 
> 
> Here's what i did having pulled the master at commit cb70a26
> 
> tar xf /path/to/xen-cb70a26.tar.gz
> 
> cd xen-master/
> 
> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
>    --disable-seabios   \
>    --disable-qemu-traditional  \
>    --disable-rombios     \
>    --disable-stubdom 2>&1 | tee ../config.log
> 
> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
> 
> 
> ...
> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
> tools/kconfig/zconf.tab.c
> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
> tools/kconfig/conf -s --silentoldconfig Kconfig
> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> make -f Rules.mk _install
> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
> make -C tools
> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> make symbols
> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
> symbols.c
> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
>  Xen 4.13-unstable
> /bin/sh: python: command not found
> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127

Here. The PYTHON invocation is from the hypervisor build, not the tools
build.

Thanks for the log.  I will have a closer look.

> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> make[2]: *** [Makefile:45: install] Error 2
> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
> make[1]: *** [Makefile:123: install-xen] Error 2
> make[1]: Leaving directory '/usr/src/xen/xen-master'
> make: *** [Makefile:165: world] Error 2
> 
> 
> Note the
> 
> /bin/sh: python: command not found
> 
> whilst, in the tools/Makefile,, I see

I think tools build is fine. It's hypervisor build that is broken.


Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 10:41             ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-17 10:41 UTC (permalink / raw)
  To: Kevin Buckley
  Cc: Stefano Stabellini, Wei Liu, Andrew Cooper, Julien Grall,
	Jan Beulich, xen-devel

On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
> > 
> > Here's what i did having pulled the master at commit cb70a26
> > 
> > tar xf /path/to/xen-cb70a26.tar.gz
> > 
> > cd xen-master/
> > 
> > PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
> >    --disable-seabios   \
> >    --disable-qemu-traditional  \
> >    --disable-rombios     \
> >    --disable-stubdom 2>&1 | tee ../config.log
> > 
> > make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
> > 
> > 
> > ...
> > gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
> > -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
> > -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
> > tools/kconfig/zconf.tab.c
> > gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
> > tools/kconfig/conf -s --silentoldconfig Kconfig
> > make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> > make -f Rules.mk _install
> > make[3]: Entering directory '/usr/src/xen/xen-master/xen'
> > make -C tools
> > make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> > make symbols
> > make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> > gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
> > -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
> > symbols.c
> > make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> > make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> > make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
> > make[4]: Entering directory '/usr/src/xen/xen-master/xen'
> >  Xen 4.13-unstable
> > /bin/sh: python: command not found
> > make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
> 
> Here. The PYTHON invocation is from the hypervisor build, not the tools
> build.
> 
> Thanks for the log.  I will have a closer look.
> 
> > make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
> > make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
> > make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> > make[2]: *** [Makefile:45: install] Error 2
> > make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
> > make[1]: *** [Makefile:123: install-xen] Error 2
> > make[1]: Leaving directory '/usr/src/xen/xen-master'
> > make: *** [Makefile:165: world] Error 2
> > 
> > 
> > Note the
> > 
> > /bin/sh: python: command not found
> > 

The issue here is on LFS there is no /usr/bin/python. So the hypervisor
build is broken because xen/include/compile.h invokes

 @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new

There are other appearances of PYTHON in hypervisor build, which are
equally broken.

We had / have a policy to avoid making hypervisor build dependent on
configure. I have CC'ed more people on their opinions.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [Xen-devel] Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 10:41             ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-17 10:41 UTC (permalink / raw)
  To: Kevin Buckley
  Cc: Stefano Stabellini, Wei Liu, Andrew Cooper, Julien Grall,
	Jan Beulich, xen-devel

On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
> > 
> > Here's what i did having pulled the master at commit cb70a26
> > 
> > tar xf /path/to/xen-cb70a26.tar.gz
> > 
> > cd xen-master/
> > 
> > PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
> >    --disable-seabios   \
> >    --disable-qemu-traditional  \
> >    --disable-rombios     \
> >    --disable-stubdom 2>&1 | tee ../config.log
> > 
> > make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
> > 
> > 
> > ...
> > gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
> > -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
> > -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
> > tools/kconfig/zconf.tab.c
> > gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
> > tools/kconfig/conf -s --silentoldconfig Kconfig
> > make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> > make -f Rules.mk _install
> > make[3]: Entering directory '/usr/src/xen/xen-master/xen'
> > make -C tools
> > make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> > make symbols
> > make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> > gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
> > -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
> > symbols.c
> > make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> > make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> > make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
> > make[4]: Entering directory '/usr/src/xen/xen-master/xen'
> >  Xen 4.13-unstable
> > /bin/sh: python: command not found
> > make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
> 
> Here. The PYTHON invocation is from the hypervisor build, not the tools
> build.
> 
> Thanks for the log.  I will have a closer look.
> 
> > make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
> > make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
> > make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> > make[2]: *** [Makefile:45: install] Error 2
> > make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
> > make[1]: *** [Makefile:123: install-xen] Error 2
> > make[1]: Leaving directory '/usr/src/xen/xen-master'
> > make: *** [Makefile:165: world] Error 2
> > 
> > 
> > Note the
> > 
> > /bin/sh: python: command not found
> > 

The issue here is on LFS there is no /usr/bin/python. So the hypervisor
build is broken because xen/include/compile.h invokes

 @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new

There are other appearances of PYTHON in hypervisor build, which are
equally broken.

We had / have a policy to avoid making hypervisor build dependent on
configure. I have CC'ed more people on their opinions.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 10:44               ` Andrew Cooper
  0 siblings, 0 replies; 52+ messages in thread
From: Andrew Cooper @ 2019-04-17 10:44 UTC (permalink / raw)
  To: Wei Liu, Kevin Buckley
  Cc: xen-devel, Julien Grall, Stefano Stabellini, Jan Beulich

On 17/04/2019 11:41, Wei Liu wrote:
> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
>>> Here's what i did having pulled the master at commit cb70a26
>>>
>>> tar xf /path/to/xen-cb70a26.tar.gz
>>>
>>> cd xen-master/
>>>
>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
>>>    --disable-seabios   \
>>>    --disable-qemu-traditional  \
>>>    --disable-rombios     \
>>>    --disable-stubdom 2>&1 | tee ../config.log
>>>
>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
>>>
>>>
>>> ...
>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
>>> tools/kconfig/zconf.tab.c
>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
>>> tools/kconfig/conf -s --silentoldconfig Kconfig
>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>> make -f Rules.mk _install
>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
>>> make -C tools
>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>> make symbols
>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
>>> symbols.c
>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
>>>  Xen 4.13-unstable
>>> /bin/sh: python: command not found
>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
>> Here. The PYTHON invocation is from the hypervisor build, not the tools
>> build.
>>
>> Thanks for the log.  I will have a closer look.
>>
>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>> make[2]: *** [Makefile:45: install] Error 2
>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
>>> make[1]: *** [Makefile:123: install-xen] Error 2
>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
>>> make: *** [Makefile:165: world] Error 2
>>>
>>>
>>> Note the
>>>
>>> /bin/sh: python: command not found
>>>
> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
> build is broken because xen/include/compile.h invokes
>
>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
>
> There are other appearances of PYTHON in hypervisor build, which are
> equally broken.
>
> We had / have a policy to avoid making hypervisor build dependent on
> configure. I have CC'ed more people on their opinions.

Where has $(PYTHON) got lost?  It was specified correctly to begin with.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 10:44               ` Andrew Cooper
  0 siblings, 0 replies; 52+ messages in thread
From: Andrew Cooper @ 2019-04-17 10:44 UTC (permalink / raw)
  To: Wei Liu, Kevin Buckley
  Cc: xen-devel, Julien Grall, Stefano Stabellini, Jan Beulich

On 17/04/2019 11:41, Wei Liu wrote:
> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
>>> Here's what i did having pulled the master at commit cb70a26
>>>
>>> tar xf /path/to/xen-cb70a26.tar.gz
>>>
>>> cd xen-master/
>>>
>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
>>>    --disable-seabios   \
>>>    --disable-qemu-traditional  \
>>>    --disable-rombios     \
>>>    --disable-stubdom 2>&1 | tee ../config.log
>>>
>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
>>>
>>>
>>> ...
>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
>>> tools/kconfig/zconf.tab.c
>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
>>> tools/kconfig/conf -s --silentoldconfig Kconfig
>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>> make -f Rules.mk _install
>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
>>> make -C tools
>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>> make symbols
>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
>>> symbols.c
>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
>>>  Xen 4.13-unstable
>>> /bin/sh: python: command not found
>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
>> Here. The PYTHON invocation is from the hypervisor build, not the tools
>> build.
>>
>> Thanks for the log.  I will have a closer look.
>>
>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>> make[2]: *** [Makefile:45: install] Error 2
>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
>>> make[1]: *** [Makefile:123: install-xen] Error 2
>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
>>> make: *** [Makefile:165: world] Error 2
>>>
>>>
>>> Note the
>>>
>>> /bin/sh: python: command not found
>>>
> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
> build is broken because xen/include/compile.h invokes
>
>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
>
> There are other appearances of PYTHON in hypervisor build, which are
> equally broken.
>
> We had / have a policy to avoid making hypervisor build dependent on
> configure. I have CC'ed more people on their opinions.

Where has $(PYTHON) got lost?  It was specified correctly to begin with.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 10:57                 ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-17 10:57 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Stefano Stabellini, Wei Liu, Kevin Buckley, Julien Grall,
	Jan Beulich, xen-devel

On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
> On 17/04/2019 11:41, Wei Liu wrote:
> > On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
> >>> Here's what i did having pulled the master at commit cb70a26
> >>>
> >>> tar xf /path/to/xen-cb70a26.tar.gz
> >>>
> >>> cd xen-master/
> >>>
> >>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
> >>>    --disable-seabios   \
> >>>    --disable-qemu-traditional  \
> >>>    --disable-rombios     \
> >>>    --disable-stubdom 2>&1 | tee ../config.log
> >>>
> >>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
> >>>
> >>>
> >>> ...
> >>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
> >>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
> >>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
> >>> tools/kconfig/zconf.tab.c
> >>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
> >>> tools/kconfig/conf -s --silentoldconfig Kconfig
> >>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>> make -f Rules.mk _install
> >>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
> >>> make -C tools
> >>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>> make symbols
> >>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
> >>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
> >>> symbols.c
> >>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
> >>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
> >>>  Xen 4.13-unstable
> >>> /bin/sh: python: command not found
> >>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
> >> Here. The PYTHON invocation is from the hypervisor build, not the tools
> >> build.
> >>
> >> Thanks for the log.  I will have a closer look.
> >>
> >>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
> >>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>> make[2]: *** [Makefile:45: install] Error 2
> >>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>> make[1]: *** [Makefile:123: install-xen] Error 2
> >>> make[1]: Leaving directory '/usr/src/xen/xen-master'
> >>> make: *** [Makefile:165: world] Error 2
> >>>
> >>>
> >>> Note the
> >>>
> >>> /bin/sh: python: command not found
> >>>
> > The issue here is on LFS there is no /usr/bin/python. So the hypervisor
> > build is broken because xen/include/compile.h invokes
> >
> >  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
> >
> > There are other appearances of PYTHON in hypervisor build, which are
> > equally broken.
> >
> > We had / have a policy to avoid making hypervisor build dependent on
> > configure. I have CC'ed more people on their opinions.
> 
> Where has $(PYTHON) got lost?  It was specified correctly to begin with.

Where is it specified?

Wei.

> 
> ~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 10:57                 ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-17 10:57 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Stefano Stabellini, Wei Liu, Kevin Buckley, Julien Grall,
	Jan Beulich, xen-devel

On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
> On 17/04/2019 11:41, Wei Liu wrote:
> > On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
> >>> Here's what i did having pulled the master at commit cb70a26
> >>>
> >>> tar xf /path/to/xen-cb70a26.tar.gz
> >>>
> >>> cd xen-master/
> >>>
> >>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
> >>>    --disable-seabios   \
> >>>    --disable-qemu-traditional  \
> >>>    --disable-rombios     \
> >>>    --disable-stubdom 2>&1 | tee ../config.log
> >>>
> >>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
> >>>
> >>>
> >>> ...
> >>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
> >>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
> >>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
> >>> tools/kconfig/zconf.tab.c
> >>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
> >>> tools/kconfig/conf -s --silentoldconfig Kconfig
> >>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>> make -f Rules.mk _install
> >>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
> >>> make -C tools
> >>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>> make symbols
> >>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
> >>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
> >>> symbols.c
> >>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
> >>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
> >>>  Xen 4.13-unstable
> >>> /bin/sh: python: command not found
> >>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
> >> Here. The PYTHON invocation is from the hypervisor build, not the tools
> >> build.
> >>
> >> Thanks for the log.  I will have a closer look.
> >>
> >>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
> >>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>> make[2]: *** [Makefile:45: install] Error 2
> >>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>> make[1]: *** [Makefile:123: install-xen] Error 2
> >>> make[1]: Leaving directory '/usr/src/xen/xen-master'
> >>> make: *** [Makefile:165: world] Error 2
> >>>
> >>>
> >>> Note the
> >>>
> >>> /bin/sh: python: command not found
> >>>
> > The issue here is on LFS there is no /usr/bin/python. So the hypervisor
> > build is broken because xen/include/compile.h invokes
> >
> >  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
> >
> > There are other appearances of PYTHON in hypervisor build, which are
> > equally broken.
> >
> > We had / have a policy to avoid making hypervisor build dependent on
> > configure. I have CC'ed more people on their opinions.
> 
> Where has $(PYTHON) got lost?  It was specified correctly to begin with.

Where is it specified?

Wei.

> 
> ~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 10:58                   ` Andrew Cooper
  0 siblings, 0 replies; 52+ messages in thread
From: Andrew Cooper @ 2019-04-17 10:58 UTC (permalink / raw)
  To: Wei Liu
  Cc: xen-devel, Julien Grall, Kevin Buckley, Stefano Stabellini, Jan Beulich

On 17/04/2019 11:57, Wei Liu wrote:
> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
>> On 17/04/2019 11:41, Wei Liu wrote:
>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
>>>>> Here's what i did having pulled the master at commit cb70a26
>>>>>
>>>>> tar xf /path/to/xen-cb70a26.tar.gz
>>>>>
>>>>> cd xen-master/
>>>>>
>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
>>>>>    --disable-seabios   \
>>>>>    --disable-qemu-traditional  \
>>>>>    --disable-rombios     \
>>>>>    --disable-stubdom 2>&1 | tee ../config.log
>>>>>
>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
>>>>>
>>>>>
>>>>> ...
>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
>>>>> tools/kconfig/zconf.tab.c
>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>> make -f Rules.mk _install
>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>> make -C tools
>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>> make symbols
>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
>>>>> symbols.c
>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>  Xen 4.13-unstable
>>>>> /bin/sh: python: command not found
>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
>>>> build.
>>>>
>>>> Thanks for the log.  I will have a closer look.
>>>>
>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>> make[2]: *** [Makefile:45: install] Error 2
>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
>>>>> make: *** [Makefile:165: world] Error 2
>>>>>
>>>>>
>>>>> Note the
>>>>>
>>>>> /bin/sh: python: command not found
>>>>>
>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
>>> build is broken because xen/include/compile.h invokes
>>>
>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
>>>
>>> There are other appearances of PYTHON in hypervisor build, which are
>>> equally broken.
>>>
>>> We had / have a policy to avoid making hypervisor build dependent on
>>> configure. I have CC'ed more people on their opinions.
>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
> Where is it specified?

Oh - I see now.

It is specified for ./configure, but not for make.

How has this ever worked?

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 10:58                   ` Andrew Cooper
  0 siblings, 0 replies; 52+ messages in thread
From: Andrew Cooper @ 2019-04-17 10:58 UTC (permalink / raw)
  To: Wei Liu
  Cc: xen-devel, Julien Grall, Kevin Buckley, Stefano Stabellini, Jan Beulich

On 17/04/2019 11:57, Wei Liu wrote:
> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
>> On 17/04/2019 11:41, Wei Liu wrote:
>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
>>>>> Here's what i did having pulled the master at commit cb70a26
>>>>>
>>>>> tar xf /path/to/xen-cb70a26.tar.gz
>>>>>
>>>>> cd xen-master/
>>>>>
>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
>>>>>    --disable-seabios   \
>>>>>    --disable-qemu-traditional  \
>>>>>    --disable-rombios     \
>>>>>    --disable-stubdom 2>&1 | tee ../config.log
>>>>>
>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
>>>>>
>>>>>
>>>>> ...
>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
>>>>> tools/kconfig/zconf.tab.c
>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>> make -f Rules.mk _install
>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>> make -C tools
>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>> make symbols
>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
>>>>> symbols.c
>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>  Xen 4.13-unstable
>>>>> /bin/sh: python: command not found
>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
>>>> build.
>>>>
>>>> Thanks for the log.  I will have a closer look.
>>>>
>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>> make[2]: *** [Makefile:45: install] Error 2
>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
>>>>> make: *** [Makefile:165: world] Error 2
>>>>>
>>>>>
>>>>> Note the
>>>>>
>>>>> /bin/sh: python: command not found
>>>>>
>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
>>> build is broken because xen/include/compile.h invokes
>>>
>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
>>>
>>> There are other appearances of PYTHON in hypervisor build, which are
>>> equally broken.
>>>
>>> We had / have a policy to avoid making hypervisor build dependent on
>>> configure. I have CC'ed more people on their opinions.
>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
> Where is it specified?

Oh - I see now.

It is specified for ./configure, but not for make.

How has this ever worked?

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 11:01                     ` Juergen Gross
  0 siblings, 0 replies; 52+ messages in thread
From: Juergen Gross @ 2019-04-17 11:01 UTC (permalink / raw)
  To: Andrew Cooper, Wei Liu
  Cc: xen-devel, Julien Grall, Kevin Buckley, Stefano Stabellini, Jan Beulich

On 17/04/2019 12:58, Andrew Cooper wrote:
> On 17/04/2019 11:57, Wei Liu wrote:
>> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
>>> On 17/04/2019 11:41, Wei Liu wrote:
>>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
>>>>>> Here's what i did having pulled the master at commit cb70a26
>>>>>>
>>>>>> tar xf /path/to/xen-cb70a26.tar.gz
>>>>>>
>>>>>> cd xen-master/
>>>>>>
>>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
>>>>>>    --disable-seabios   \
>>>>>>    --disable-qemu-traditional  \
>>>>>>    --disable-rombios     \
>>>>>>    --disable-stubdom 2>&1 | tee ../config.log
>>>>>>
>>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
>>>>>>
>>>>>>
>>>>>> ...
>>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
>>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
>>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
>>>>>> tools/kconfig/zconf.tab.c
>>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
>>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>> make -f Rules.mk _install
>>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>> make -C tools
>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>> make symbols
>>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
>>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
>>>>>> symbols.c
>>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>  Xen 4.13-unstable
>>>>>> /bin/sh: python: command not found
>>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
>>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
>>>>> build.
>>>>>
>>>>> Thanks for the log.  I will have a closer look.
>>>>>
>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>> make[2]: *** [Makefile:45: install] Error 2
>>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
>>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
>>>>>> make: *** [Makefile:165: world] Error 2
>>>>>>
>>>>>>
>>>>>> Note the
>>>>>>
>>>>>> /bin/sh: python: command not found
>>>>>>
>>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
>>>> build is broken because xen/include/compile.h invokes
>>>>
>>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
>>>>
>>>> There are other appearances of PYTHON in hypervisor build, which are
>>>> equally broken.
>>>>
>>>> We had / have a policy to avoid making hypervisor build dependent on
>>>> configure. I have CC'ed more people on their opinions.
>>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
>> Where is it specified?
> 
> Oh - I see now.
> 
> It is specified for ./configure, but not for make.
> 
> How has this ever worked?

Config.mk contains:

PYTHON      ?= python
PYTHON_PREFIX_ARG ?= --prefix="$(prefix)"


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 11:01                     ` Juergen Gross
  0 siblings, 0 replies; 52+ messages in thread
From: Juergen Gross @ 2019-04-17 11:01 UTC (permalink / raw)
  To: Andrew Cooper, Wei Liu
  Cc: xen-devel, Julien Grall, Kevin Buckley, Stefano Stabellini, Jan Beulich

On 17/04/2019 12:58, Andrew Cooper wrote:
> On 17/04/2019 11:57, Wei Liu wrote:
>> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
>>> On 17/04/2019 11:41, Wei Liu wrote:
>>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
>>>>>> Here's what i did having pulled the master at commit cb70a26
>>>>>>
>>>>>> tar xf /path/to/xen-cb70a26.tar.gz
>>>>>>
>>>>>> cd xen-master/
>>>>>>
>>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
>>>>>>    --disable-seabios   \
>>>>>>    --disable-qemu-traditional  \
>>>>>>    --disable-rombios     \
>>>>>>    --disable-stubdom 2>&1 | tee ../config.log
>>>>>>
>>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
>>>>>>
>>>>>>
>>>>>> ...
>>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
>>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
>>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
>>>>>> tools/kconfig/zconf.tab.c
>>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
>>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>> make -f Rules.mk _install
>>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>> make -C tools
>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>> make symbols
>>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
>>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
>>>>>> symbols.c
>>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>  Xen 4.13-unstable
>>>>>> /bin/sh: python: command not found
>>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
>>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
>>>>> build.
>>>>>
>>>>> Thanks for the log.  I will have a closer look.
>>>>>
>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>> make[2]: *** [Makefile:45: install] Error 2
>>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
>>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
>>>>>> make: *** [Makefile:165: world] Error 2
>>>>>>
>>>>>>
>>>>>> Note the
>>>>>>
>>>>>> /bin/sh: python: command not found
>>>>>>
>>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
>>>> build is broken because xen/include/compile.h invokes
>>>>
>>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
>>>>
>>>> There are other appearances of PYTHON in hypervisor build, which are
>>>> equally broken.
>>>>
>>>> We had / have a policy to avoid making hypervisor build dependent on
>>>> configure. I have CC'ed more people on their opinions.
>>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
>> Where is it specified?
> 
> Oh - I see now.
> 
> It is specified for ./configure, but not for make.
> 
> How has this ever worked?

Config.mk contains:

PYTHON      ?= python
PYTHON_PREFIX_ARG ?= --prefix="$(prefix)"


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 11:03                     ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-17 11:03 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Stefano Stabellini, Wei Liu, Kevin Buckley, Julien Grall,
	Jan Beulich, xen-devel

On Wed, Apr 17, 2019 at 11:58:49AM +0100, Andrew Cooper wrote:
> On 17/04/2019 11:57, Wei Liu wrote:
> > On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
> >> On 17/04/2019 11:41, Wei Liu wrote:
> >>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
> >>>>> Here's what i did having pulled the master at commit cb70a26
> >>>>>
> >>>>> tar xf /path/to/xen-cb70a26.tar.gz
> >>>>>
> >>>>> cd xen-master/
> >>>>>
> >>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
> >>>>>    --disable-seabios   \
> >>>>>    --disable-qemu-traditional  \
> >>>>>    --disable-rombios     \
> >>>>>    --disable-stubdom 2>&1 | tee ../config.log
> >>>>>
> >>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
> >>>>>
> >>>>>
> >>>>> ...
> >>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
> >>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
> >>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
> >>>>> tools/kconfig/zconf.tab.c
> >>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
> >>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
> >>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>> make -f Rules.mk _install
> >>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
> >>>>> make -C tools
> >>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>>>> make symbols
> >>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
> >>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
> >>>>> symbols.c
> >>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
> >>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
> >>>>>  Xen 4.13-unstable
> >>>>> /bin/sh: python: command not found
> >>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
> >>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
> >>>> build.
> >>>>
> >>>> Thanks for the log.  I will have a closer look.
> >>>>
> >>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
> >>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>> make[2]: *** [Makefile:45: install] Error 2
> >>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>> make[1]: *** [Makefile:123: install-xen] Error 2
> >>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
> >>>>> make: *** [Makefile:165: world] Error 2
> >>>>>
> >>>>>
> >>>>> Note the
> >>>>>
> >>>>> /bin/sh: python: command not found
> >>>>>
> >>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
> >>> build is broken because xen/include/compile.h invokes
> >>>
> >>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
> >>>
> >>> There are other appearances of PYTHON in hypervisor build, which are
> >>> equally broken.
> >>>
> >>> We had / have a policy to avoid making hypervisor build dependent on
> >>> configure. I have CC'ed more people on their opinions.
> >> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
> > Where is it specified?
> 
> Oh - I see now.
> 
> It is specified for ./configure, but not for make.

Right.

It works for tools because tools build includes config/Tools.mk which
contains the correct python path. Tools.mk is generated by configure.
 
Obviously hypervisor build shouldn't include Tools.mk. Furthermore, the
policy of "hv shouldn't depend on configure" makes this route a no-go.

Either we change the policy, or we document the deficiency, or we come
up with some clever trick to probe.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 11:03                     ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-17 11:03 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Stefano Stabellini, Wei Liu, Kevin Buckley, Julien Grall,
	Jan Beulich, xen-devel

On Wed, Apr 17, 2019 at 11:58:49AM +0100, Andrew Cooper wrote:
> On 17/04/2019 11:57, Wei Liu wrote:
> > On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
> >> On 17/04/2019 11:41, Wei Liu wrote:
> >>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
> >>>>> Here's what i did having pulled the master at commit cb70a26
> >>>>>
> >>>>> tar xf /path/to/xen-cb70a26.tar.gz
> >>>>>
> >>>>> cd xen-master/
> >>>>>
> >>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
> >>>>>    --disable-seabios   \
> >>>>>    --disable-qemu-traditional  \
> >>>>>    --disable-rombios     \
> >>>>>    --disable-stubdom 2>&1 | tee ../config.log
> >>>>>
> >>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
> >>>>>
> >>>>>
> >>>>> ...
> >>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
> >>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
> >>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
> >>>>> tools/kconfig/zconf.tab.c
> >>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
> >>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
> >>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>> make -f Rules.mk _install
> >>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
> >>>>> make -C tools
> >>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>>>> make symbols
> >>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
> >>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
> >>>>> symbols.c
> >>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
> >>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
> >>>>>  Xen 4.13-unstable
> >>>>> /bin/sh: python: command not found
> >>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
> >>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
> >>>> build.
> >>>>
> >>>> Thanks for the log.  I will have a closer look.
> >>>>
> >>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
> >>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>> make[2]: *** [Makefile:45: install] Error 2
> >>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>> make[1]: *** [Makefile:123: install-xen] Error 2
> >>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
> >>>>> make: *** [Makefile:165: world] Error 2
> >>>>>
> >>>>>
> >>>>> Note the
> >>>>>
> >>>>> /bin/sh: python: command not found
> >>>>>
> >>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
> >>> build is broken because xen/include/compile.h invokes
> >>>
> >>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
> >>>
> >>> There are other appearances of PYTHON in hypervisor build, which are
> >>> equally broken.
> >>>
> >>> We had / have a policy to avoid making hypervisor build dependent on
> >>> configure. I have CC'ed more people on their opinions.
> >> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
> > Where is it specified?
> 
> Oh - I see now.
> 
> It is specified for ./configure, but not for make.

Right.

It works for tools because tools build includes config/Tools.mk which
contains the correct python path. Tools.mk is generated by configure.
 
Obviously hypervisor build shouldn't include Tools.mk. Furthermore, the
policy of "hv shouldn't depend on configure" makes this route a no-go.

Either we change the policy, or we document the deficiency, or we come
up with some clever trick to probe.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 11:15                       ` Andrew Cooper
  0 siblings, 0 replies; 52+ messages in thread
From: Andrew Cooper @ 2019-04-17 11:15 UTC (permalink / raw)
  To: Wei Liu
  Cc: xen-devel, Julien Grall, Kevin Buckley, Stefano Stabellini, Jan Beulich

On 17/04/2019 12:03, Wei Liu wrote:
> On Wed, Apr 17, 2019 at 11:58:49AM +0100, Andrew Cooper wrote:
>> On 17/04/2019 11:57, Wei Liu wrote:
>>> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
>>>> On 17/04/2019 11:41, Wei Liu wrote:
>>>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
>>>>>>> Here's what i did having pulled the master at commit cb70a26
>>>>>>>
>>>>>>> tar xf /path/to/xen-cb70a26.tar.gz
>>>>>>>
>>>>>>> cd xen-master/
>>>>>>>
>>>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
>>>>>>>    --disable-seabios   \
>>>>>>>    --disable-qemu-traditional  \
>>>>>>>    --disable-rombios     \
>>>>>>>    --disable-stubdom 2>&1 | tee ../config.log
>>>>>>>
>>>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
>>>>>>>
>>>>>>>
>>>>>>> ...
>>>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
>>>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
>>>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
>>>>>>> tools/kconfig/zconf.tab.c
>>>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
>>>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>> make -f Rules.mk _install
>>>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>> make -C tools
>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>> make symbols
>>>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
>>>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
>>>>>>> symbols.c
>>>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>>  Xen 4.13-unstable
>>>>>>> /bin/sh: python: command not found
>>>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
>>>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
>>>>>> build.
>>>>>>
>>>>>> Thanks for the log.  I will have a closer look.
>>>>>>
>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>> make[2]: *** [Makefile:45: install] Error 2
>>>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
>>>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
>>>>>>> make: *** [Makefile:165: world] Error 2
>>>>>>>
>>>>>>>
>>>>>>> Note the
>>>>>>>
>>>>>>> /bin/sh: python: command not found
>>>>>>>
>>>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
>>>>> build is broken because xen/include/compile.h invokes
>>>>>
>>>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
>>>>>
>>>>> There are other appearances of PYTHON in hypervisor build, which are
>>>>> equally broken.
>>>>>
>>>>> We had / have a policy to avoid making hypervisor build dependent on
>>>>> configure. I have CC'ed more people on their opinions.
>>>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
>>> Where is it specified?
>> Oh - I see now.
>>
>> It is specified for ./configure, but not for make.
> Right.
>
> It works for tools because tools build includes config/Tools.mk which
> contains the correct python path. Tools.mk is generated by configure.
>  
> Obviously hypervisor build shouldn't include Tools.mk. Furthermore, the
> policy of "hv shouldn't depend on configure" makes this route a no-go.
>
> Either we change the policy, or we document the deficiency, or we come
> up with some clever trick to probe.

Given the shebang in all of our scripts, would `env python` be
sufficiently clever trickery, or is that a can of worms we'd prefer not
to open?

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 11:15                       ` Andrew Cooper
  0 siblings, 0 replies; 52+ messages in thread
From: Andrew Cooper @ 2019-04-17 11:15 UTC (permalink / raw)
  To: Wei Liu
  Cc: xen-devel, Julien Grall, Kevin Buckley, Stefano Stabellini, Jan Beulich

On 17/04/2019 12:03, Wei Liu wrote:
> On Wed, Apr 17, 2019 at 11:58:49AM +0100, Andrew Cooper wrote:
>> On 17/04/2019 11:57, Wei Liu wrote:
>>> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
>>>> On 17/04/2019 11:41, Wei Liu wrote:
>>>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
>>>>>>> Here's what i did having pulled the master at commit cb70a26
>>>>>>>
>>>>>>> tar xf /path/to/xen-cb70a26.tar.gz
>>>>>>>
>>>>>>> cd xen-master/
>>>>>>>
>>>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
>>>>>>>    --disable-seabios   \
>>>>>>>    --disable-qemu-traditional  \
>>>>>>>    --disable-rombios     \
>>>>>>>    --disable-stubdom 2>&1 | tee ../config.log
>>>>>>>
>>>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
>>>>>>>
>>>>>>>
>>>>>>> ...
>>>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
>>>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
>>>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
>>>>>>> tools/kconfig/zconf.tab.c
>>>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
>>>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>> make -f Rules.mk _install
>>>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>> make -C tools
>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>> make symbols
>>>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
>>>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
>>>>>>> symbols.c
>>>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>>  Xen 4.13-unstable
>>>>>>> /bin/sh: python: command not found
>>>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
>>>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
>>>>>> build.
>>>>>>
>>>>>> Thanks for the log.  I will have a closer look.
>>>>>>
>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>> make[2]: *** [Makefile:45: install] Error 2
>>>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
>>>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
>>>>>>> make: *** [Makefile:165: world] Error 2
>>>>>>>
>>>>>>>
>>>>>>> Note the
>>>>>>>
>>>>>>> /bin/sh: python: command not found
>>>>>>>
>>>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
>>>>> build is broken because xen/include/compile.h invokes
>>>>>
>>>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
>>>>>
>>>>> There are other appearances of PYTHON in hypervisor build, which are
>>>>> equally broken.
>>>>>
>>>>> We had / have a policy to avoid making hypervisor build dependent on
>>>>> configure. I have CC'ed more people on their opinions.
>>>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
>>> Where is it specified?
>> Oh - I see now.
>>
>> It is specified for ./configure, but not for make.
> Right.
>
> It works for tools because tools build includes config/Tools.mk which
> contains the correct python path. Tools.mk is generated by configure.
>  
> Obviously hypervisor build shouldn't include Tools.mk. Furthermore, the
> policy of "hv shouldn't depend on configure" makes this route a no-go.
>
> Either we change the policy, or we document the deficiency, or we come
> up with some clever trick to probe.

Given the shebang in all of our scripts, would `env python` be
sufficiently clever trickery, or is that a can of worms we'd prefer not
to open?

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 11:16                         ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-17 11:16 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Stefano Stabellini, Wei Liu, Kevin Buckley, Julien Grall,
	Jan Beulich, xen-devel

On Wed, Apr 17, 2019 at 12:15:04PM +0100, Andrew Cooper wrote:
> On 17/04/2019 12:03, Wei Liu wrote:
> > On Wed, Apr 17, 2019 at 11:58:49AM +0100, Andrew Cooper wrote:
> >> On 17/04/2019 11:57, Wei Liu wrote:
> >>> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
> >>>> On 17/04/2019 11:41, Wei Liu wrote:
> >>>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
> >>>>>>> Here's what i did having pulled the master at commit cb70a26
> >>>>>>>
> >>>>>>> tar xf /path/to/xen-cb70a26.tar.gz
> >>>>>>>
> >>>>>>> cd xen-master/
> >>>>>>>
> >>>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
> >>>>>>>    --disable-seabios   \
> >>>>>>>    --disable-qemu-traditional  \
> >>>>>>>    --disable-rombios     \
> >>>>>>>    --disable-stubdom 2>&1 | tee ../config.log
> >>>>>>>
> >>>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
> >>>>>>>
> >>>>>>>
> >>>>>>> ...
> >>>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
> >>>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
> >>>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
> >>>>>>> tools/kconfig/zconf.tab.c
> >>>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
> >>>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
> >>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>> make -f Rules.mk _install
> >>>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
> >>>>>>> make -C tools
> >>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>> make symbols
> >>>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
> >>>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
> >>>>>>> symbols.c
> >>>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
> >>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
> >>>>>>>  Xen 4.13-unstable
> >>>>>>> /bin/sh: python: command not found
> >>>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
> >>>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
> >>>>>> build.
> >>>>>>
> >>>>>> Thanks for the log.  I will have a closer look.
> >>>>>>
> >>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
> >>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>> make[2]: *** [Makefile:45: install] Error 2
> >>>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
> >>>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
> >>>>>>> make: *** [Makefile:165: world] Error 2
> >>>>>>>
> >>>>>>>
> >>>>>>> Note the
> >>>>>>>
> >>>>>>> /bin/sh: python: command not found
> >>>>>>>
> >>>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
> >>>>> build is broken because xen/include/compile.h invokes
> >>>>>
> >>>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
> >>>>>
> >>>>> There are other appearances of PYTHON in hypervisor build, which are
> >>>>> equally broken.
> >>>>>
> >>>>> We had / have a policy to avoid making hypervisor build dependent on
> >>>>> configure. I have CC'ed more people on their opinions.
> >>>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
> >>> Where is it specified?
> >> Oh - I see now.
> >>
> >> It is specified for ./configure, but not for make.
> > Right.
> >
> > It works for tools because tools build includes config/Tools.mk which
> > contains the correct python path. Tools.mk is generated by configure.
> >  
> > Obviously hypervisor build shouldn't include Tools.mk. Furthermore, the
> > policy of "hv shouldn't depend on configure" makes this route a no-go.
> >
> > Either we change the policy, or we document the deficiency, or we come
> > up with some clever trick to probe.
> 
> Given the shebang in all of our scripts, would `env python` be
> sufficiently clever trickery, or is that a can of worms we'd prefer not
> to open?

I already tried env python -- it didn't work. I think it searches PATHS
just like a shell would.

Wei.

> 
> ~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 11:16                         ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-17 11:16 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Stefano Stabellini, Wei Liu, Kevin Buckley, Julien Grall,
	Jan Beulich, xen-devel

On Wed, Apr 17, 2019 at 12:15:04PM +0100, Andrew Cooper wrote:
> On 17/04/2019 12:03, Wei Liu wrote:
> > On Wed, Apr 17, 2019 at 11:58:49AM +0100, Andrew Cooper wrote:
> >> On 17/04/2019 11:57, Wei Liu wrote:
> >>> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
> >>>> On 17/04/2019 11:41, Wei Liu wrote:
> >>>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
> >>>>>>> Here's what i did having pulled the master at commit cb70a26
> >>>>>>>
> >>>>>>> tar xf /path/to/xen-cb70a26.tar.gz
> >>>>>>>
> >>>>>>> cd xen-master/
> >>>>>>>
> >>>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
> >>>>>>>    --disable-seabios   \
> >>>>>>>    --disable-qemu-traditional  \
> >>>>>>>    --disable-rombios     \
> >>>>>>>    --disable-stubdom 2>&1 | tee ../config.log
> >>>>>>>
> >>>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
> >>>>>>>
> >>>>>>>
> >>>>>>> ...
> >>>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
> >>>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
> >>>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
> >>>>>>> tools/kconfig/zconf.tab.c
> >>>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
> >>>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
> >>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>> make -f Rules.mk _install
> >>>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
> >>>>>>> make -C tools
> >>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>> make symbols
> >>>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
> >>>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
> >>>>>>> symbols.c
> >>>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
> >>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
> >>>>>>>  Xen 4.13-unstable
> >>>>>>> /bin/sh: python: command not found
> >>>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
> >>>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
> >>>>>> build.
> >>>>>>
> >>>>>> Thanks for the log.  I will have a closer look.
> >>>>>>
> >>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
> >>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>> make[2]: *** [Makefile:45: install] Error 2
> >>>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
> >>>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
> >>>>>>> make: *** [Makefile:165: world] Error 2
> >>>>>>>
> >>>>>>>
> >>>>>>> Note the
> >>>>>>>
> >>>>>>> /bin/sh: python: command not found
> >>>>>>>
> >>>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
> >>>>> build is broken because xen/include/compile.h invokes
> >>>>>
> >>>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
> >>>>>
> >>>>> There are other appearances of PYTHON in hypervisor build, which are
> >>>>> equally broken.
> >>>>>
> >>>>> We had / have a policy to avoid making hypervisor build dependent on
> >>>>> configure. I have CC'ed more people on their opinions.
> >>>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
> >>> Where is it specified?
> >> Oh - I see now.
> >>
> >> It is specified for ./configure, but not for make.
> > Right.
> >
> > It works for tools because tools build includes config/Tools.mk which
> > contains the correct python path. Tools.mk is generated by configure.
> >  
> > Obviously hypervisor build shouldn't include Tools.mk. Furthermore, the
> > policy of "hv shouldn't depend on configure" makes this route a no-go.
> >
> > Either we change the policy, or we document the deficiency, or we come
> > up with some clever trick to probe.
> 
> Given the shebang in all of our scripts, would `env python` be
> sufficiently clever trickery, or is that a can of worms we'd prefer not
> to open?

I already tried env python -- it didn't work. I think it searches PATHS
just like a shell would.

Wei.

> 
> ~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 11:23                           ` Andrew Cooper
  0 siblings, 0 replies; 52+ messages in thread
From: Andrew Cooper @ 2019-04-17 11:23 UTC (permalink / raw)
  To: Wei Liu
  Cc: xen-devel, Julien Grall, Kevin Buckley, Stefano Stabellini, Jan Beulich

On 17/04/2019 12:16, Wei Liu wrote:
> On Wed, Apr 17, 2019 at 12:15:04PM +0100, Andrew Cooper wrote:
>> On 17/04/2019 12:03, Wei Liu wrote:
>>> On Wed, Apr 17, 2019 at 11:58:49AM +0100, Andrew Cooper wrote:
>>>> On 17/04/2019 11:57, Wei Liu wrote:
>>>>> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
>>>>>> On 17/04/2019 11:41, Wei Liu wrote:
>>>>>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
>>>>>>>>> Here's what i did having pulled the master at commit cb70a26
>>>>>>>>>
>>>>>>>>> tar xf /path/to/xen-cb70a26.tar.gz
>>>>>>>>>
>>>>>>>>> cd xen-master/
>>>>>>>>>
>>>>>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
>>>>>>>>>    --disable-seabios   \
>>>>>>>>>    --disable-qemu-traditional  \
>>>>>>>>>    --disable-rombios     \
>>>>>>>>>    --disable-stubdom 2>&1 | tee ../config.log
>>>>>>>>>
>>>>>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ...
>>>>>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
>>>>>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
>>>>>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
>>>>>>>>> tools/kconfig/zconf.tab.c
>>>>>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
>>>>>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>> make -f Rules.mk _install
>>>>>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>>>> make -C tools
>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>> make symbols
>>>>>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
>>>>>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
>>>>>>>>> symbols.c
>>>>>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>  Xen 4.13-unstable
>>>>>>>>> /bin/sh: python: command not found
>>>>>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
>>>>>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
>>>>>>>> build.
>>>>>>>>
>>>>>>>> Thanks for the log.  I will have a closer look.
>>>>>>>>
>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>> make[2]: *** [Makefile:45: install] Error 2
>>>>>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
>>>>>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
>>>>>>>>> make: *** [Makefile:165: world] Error 2
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Note the
>>>>>>>>>
>>>>>>>>> /bin/sh: python: command not found
>>>>>>>>>
>>>>>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
>>>>>>> build is broken because xen/include/compile.h invokes
>>>>>>>
>>>>>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
>>>>>>>
>>>>>>> There are other appearances of PYTHON in hypervisor build, which are
>>>>>>> equally broken.
>>>>>>>
>>>>>>> We had / have a policy to avoid making hypervisor build dependent on
>>>>>>> configure. I have CC'ed more people on their opinions.
>>>>>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
>>>>> Where is it specified?
>>>> Oh - I see now.
>>>>
>>>> It is specified for ./configure, but not for make.
>>> Right.
>>>
>>> It works for tools because tools build includes config/Tools.mk which
>>> contains the correct python path. Tools.mk is generated by configure.
>>>  
>>> Obviously hypervisor build shouldn't include Tools.mk. Furthermore, the
>>> policy of "hv shouldn't depend on configure" makes this route a no-go.
>>>
>>> Either we change the policy, or we document the deficiency, or we come
>>> up with some clever trick to probe.
>> Given the shebang in all of our scripts, would `env python` be
>> sufficiently clever trickery, or is that a can of worms we'd prefer not
>> to open?
> I already tried env python -- it didn't work. I think it searches PATHS
> just like a shell would.

So this particular use of python is completely trivial.  It is an octal
conversion on the banner string, to feed into a string for XEN_BANNER

It exists because I removed a fork of figlet[1] from Xen's source tree
with this script, but its probably just as easy to do with awk or
something similar.

~Andrew

[1] Yes - Xen did use to carry a fork of figlet which differed solely by
being able to output an octal-escaped string.  No - I have no words
which can possibly be used to defend this...

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 11:23                           ` Andrew Cooper
  0 siblings, 0 replies; 52+ messages in thread
From: Andrew Cooper @ 2019-04-17 11:23 UTC (permalink / raw)
  To: Wei Liu
  Cc: xen-devel, Julien Grall, Kevin Buckley, Stefano Stabellini, Jan Beulich

On 17/04/2019 12:16, Wei Liu wrote:
> On Wed, Apr 17, 2019 at 12:15:04PM +0100, Andrew Cooper wrote:
>> On 17/04/2019 12:03, Wei Liu wrote:
>>> On Wed, Apr 17, 2019 at 11:58:49AM +0100, Andrew Cooper wrote:
>>>> On 17/04/2019 11:57, Wei Liu wrote:
>>>>> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
>>>>>> On 17/04/2019 11:41, Wei Liu wrote:
>>>>>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
>>>>>>>>> Here's what i did having pulled the master at commit cb70a26
>>>>>>>>>
>>>>>>>>> tar xf /path/to/xen-cb70a26.tar.gz
>>>>>>>>>
>>>>>>>>> cd xen-master/
>>>>>>>>>
>>>>>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
>>>>>>>>>    --disable-seabios   \
>>>>>>>>>    --disable-qemu-traditional  \
>>>>>>>>>    --disable-rombios     \
>>>>>>>>>    --disable-stubdom 2>&1 | tee ../config.log
>>>>>>>>>
>>>>>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ...
>>>>>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
>>>>>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
>>>>>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
>>>>>>>>> tools/kconfig/zconf.tab.c
>>>>>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
>>>>>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>> make -f Rules.mk _install
>>>>>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>>>> make -C tools
>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>> make symbols
>>>>>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
>>>>>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
>>>>>>>>> symbols.c
>>>>>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>  Xen 4.13-unstable
>>>>>>>>> /bin/sh: python: command not found
>>>>>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
>>>>>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
>>>>>>>> build.
>>>>>>>>
>>>>>>>> Thanks for the log.  I will have a closer look.
>>>>>>>>
>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>> make[2]: *** [Makefile:45: install] Error 2
>>>>>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
>>>>>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
>>>>>>>>> make: *** [Makefile:165: world] Error 2
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Note the
>>>>>>>>>
>>>>>>>>> /bin/sh: python: command not found
>>>>>>>>>
>>>>>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
>>>>>>> build is broken because xen/include/compile.h invokes
>>>>>>>
>>>>>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
>>>>>>>
>>>>>>> There are other appearances of PYTHON in hypervisor build, which are
>>>>>>> equally broken.
>>>>>>>
>>>>>>> We had / have a policy to avoid making hypervisor build dependent on
>>>>>>> configure. I have CC'ed more people on their opinions.
>>>>>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
>>>>> Where is it specified?
>>>> Oh - I see now.
>>>>
>>>> It is specified for ./configure, but not for make.
>>> Right.
>>>
>>> It works for tools because tools build includes config/Tools.mk which
>>> contains the correct python path. Tools.mk is generated by configure.
>>>  
>>> Obviously hypervisor build shouldn't include Tools.mk. Furthermore, the
>>> policy of "hv shouldn't depend on configure" makes this route a no-go.
>>>
>>> Either we change the policy, or we document the deficiency, or we come
>>> up with some clever trick to probe.
>> Given the shebang in all of our scripts, would `env python` be
>> sufficiently clever trickery, or is that a can of worms we'd prefer not
>> to open?
> I already tried env python -- it didn't work. I think it searches PATHS
> just like a shell would.

So this particular use of python is completely trivial.  It is an octal
conversion on the banner string, to feed into a string for XEN_BANNER

It exists because I removed a fork of figlet[1] from Xen's source tree
with this script, but its probably just as easy to do with awk or
something similar.

~Andrew

[1] Yes - Xen did use to carry a fork of figlet which differed solely by
being able to output an octal-escaped string.  No - I have no words
which can possibly be used to defend this...

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 11:26                             ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-17 11:26 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Stefano Stabellini, Wei Liu, Kevin Buckley, Julien Grall,
	Jan Beulich, xen-devel

On Wed, Apr 17, 2019 at 12:23:29PM +0100, Andrew Cooper wrote:
> On 17/04/2019 12:16, Wei Liu wrote:
> > On Wed, Apr 17, 2019 at 12:15:04PM +0100, Andrew Cooper wrote:
> >> On 17/04/2019 12:03, Wei Liu wrote:
> >>> On Wed, Apr 17, 2019 at 11:58:49AM +0100, Andrew Cooper wrote:
> >>>> On 17/04/2019 11:57, Wei Liu wrote:
> >>>>> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
> >>>>>> On 17/04/2019 11:41, Wei Liu wrote:
> >>>>>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
> >>>>>>>>> Here's what i did having pulled the master at commit cb70a26
> >>>>>>>>>
> >>>>>>>>> tar xf /path/to/xen-cb70a26.tar.gz
> >>>>>>>>>
> >>>>>>>>> cd xen-master/
> >>>>>>>>>
> >>>>>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
> >>>>>>>>>    --disable-seabios   \
> >>>>>>>>>    --disable-qemu-traditional  \
> >>>>>>>>>    --disable-rombios     \
> >>>>>>>>>    --disable-stubdom 2>&1 | tee ../config.log
> >>>>>>>>>
> >>>>>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> ...
> >>>>>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
> >>>>>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
> >>>>>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
> >>>>>>>>> tools/kconfig/zconf.tab.c
> >>>>>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
> >>>>>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
> >>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>> make -f Rules.mk _install
> >>>>>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>> make -C tools
> >>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>>>> make symbols
> >>>>>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
> >>>>>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
> >>>>>>>>> symbols.c
> >>>>>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
> >>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>>  Xen 4.13-unstable
> >>>>>>>>> /bin/sh: python: command not found
> >>>>>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
> >>>>>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
> >>>>>>>> build.
> >>>>>>>>
> >>>>>>>> Thanks for the log.  I will have a closer look.
> >>>>>>>>
> >>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
> >>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>> make[2]: *** [Makefile:45: install] Error 2
> >>>>>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
> >>>>>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
> >>>>>>>>> make: *** [Makefile:165: world] Error 2
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Note the
> >>>>>>>>>
> >>>>>>>>> /bin/sh: python: command not found
> >>>>>>>>>
> >>>>>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
> >>>>>>> build is broken because xen/include/compile.h invokes
> >>>>>>>
> >>>>>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
> >>>>>>>
> >>>>>>> There are other appearances of PYTHON in hypervisor build, which are
> >>>>>>> equally broken.
> >>>>>>>
> >>>>>>> We had / have a policy to avoid making hypervisor build dependent on
> >>>>>>> configure. I have CC'ed more people on their opinions.
> >>>>>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
> >>>>> Where is it specified?
> >>>> Oh - I see now.
> >>>>
> >>>> It is specified for ./configure, but not for make.
> >>> Right.
> >>>
> >>> It works for tools because tools build includes config/Tools.mk which
> >>> contains the correct python path. Tools.mk is generated by configure.
> >>>  
> >>> Obviously hypervisor build shouldn't include Tools.mk. Furthermore, the
> >>> policy of "hv shouldn't depend on configure" makes this route a no-go.
> >>>
> >>> Either we change the policy, or we document the deficiency, or we come
> >>> up with some clever trick to probe.
> >> Given the shebang in all of our scripts, would `env python` be
> >> sufficiently clever trickery, or is that a can of worms we'd prefer not
> >> to open?
> > I already tried env python -- it didn't work. I think it searches PATHS
> > just like a shell would.
> 
> So this particular use of python is completely trivial.  It is an octal
> conversion on the banner string, to feed into a string for XEN_BANNER
> 
> It exists because I removed a fork of figlet[1] from Xen's source tree
> with this script, but its probably just as easy to do with awk or
> something similar.
> 
> ~Andrew
> 
> [1] Yes - Xen did use to carry a fork of figlet which differed solely by
> being able to output an octal-escaped string.  No - I have no words
> which can possibly be used to defend this...


But there are other less trivial ones. See xen/include/Makefile. XSM
also relies on it to generate policy. What do you want to do with those?

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 11:26                             ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-17 11:26 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: Stefano Stabellini, Wei Liu, Kevin Buckley, Julien Grall,
	Jan Beulich, xen-devel

On Wed, Apr 17, 2019 at 12:23:29PM +0100, Andrew Cooper wrote:
> On 17/04/2019 12:16, Wei Liu wrote:
> > On Wed, Apr 17, 2019 at 12:15:04PM +0100, Andrew Cooper wrote:
> >> On 17/04/2019 12:03, Wei Liu wrote:
> >>> On Wed, Apr 17, 2019 at 11:58:49AM +0100, Andrew Cooper wrote:
> >>>> On 17/04/2019 11:57, Wei Liu wrote:
> >>>>> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
> >>>>>> On 17/04/2019 11:41, Wei Liu wrote:
> >>>>>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
> >>>>>>>>> Here's what i did having pulled the master at commit cb70a26
> >>>>>>>>>
> >>>>>>>>> tar xf /path/to/xen-cb70a26.tar.gz
> >>>>>>>>>
> >>>>>>>>> cd xen-master/
> >>>>>>>>>
> >>>>>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
> >>>>>>>>>    --disable-seabios   \
> >>>>>>>>>    --disable-qemu-traditional  \
> >>>>>>>>>    --disable-rombios     \
> >>>>>>>>>    --disable-stubdom 2>&1 | tee ../config.log
> >>>>>>>>>
> >>>>>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> ...
> >>>>>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
> >>>>>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
> >>>>>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
> >>>>>>>>> tools/kconfig/zconf.tab.c
> >>>>>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
> >>>>>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
> >>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>> make -f Rules.mk _install
> >>>>>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>> make -C tools
> >>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>>>> make symbols
> >>>>>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
> >>>>>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
> >>>>>>>>> symbols.c
> >>>>>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
> >>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>>  Xen 4.13-unstable
> >>>>>>>>> /bin/sh: python: command not found
> >>>>>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
> >>>>>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
> >>>>>>>> build.
> >>>>>>>>
> >>>>>>>> Thanks for the log.  I will have a closer look.
> >>>>>>>>
> >>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
> >>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>> make[2]: *** [Makefile:45: install] Error 2
> >>>>>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
> >>>>>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
> >>>>>>>>> make: *** [Makefile:165: world] Error 2
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> Note the
> >>>>>>>>>
> >>>>>>>>> /bin/sh: python: command not found
> >>>>>>>>>
> >>>>>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
> >>>>>>> build is broken because xen/include/compile.h invokes
> >>>>>>>
> >>>>>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
> >>>>>>>
> >>>>>>> There are other appearances of PYTHON in hypervisor build, which are
> >>>>>>> equally broken.
> >>>>>>>
> >>>>>>> We had / have a policy to avoid making hypervisor build dependent on
> >>>>>>> configure. I have CC'ed more people on their opinions.
> >>>>>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
> >>>>> Where is it specified?
> >>>> Oh - I see now.
> >>>>
> >>>> It is specified for ./configure, but not for make.
> >>> Right.
> >>>
> >>> It works for tools because tools build includes config/Tools.mk which
> >>> contains the correct python path. Tools.mk is generated by configure.
> >>>  
> >>> Obviously hypervisor build shouldn't include Tools.mk. Furthermore, the
> >>> policy of "hv shouldn't depend on configure" makes this route a no-go.
> >>>
> >>> Either we change the policy, or we document the deficiency, or we come
> >>> up with some clever trick to probe.
> >> Given the shebang in all of our scripts, would `env python` be
> >> sufficiently clever trickery, or is that a can of worms we'd prefer not
> >> to open?
> > I already tried env python -- it didn't work. I think it searches PATHS
> > just like a shell would.
> 
> So this particular use of python is completely trivial.  It is an octal
> conversion on the banner string, to feed into a string for XEN_BANNER
> 
> It exists because I removed a fork of figlet[1] from Xen's source tree
> with this script, but its probably just as easy to do with awk or
> something similar.
> 
> ~Andrew
> 
> [1] Yes - Xen did use to carry a fork of figlet which differed solely by
> being able to output an octal-escaped string.  No - I have no words
> which can possibly be used to defend this...


But there are other less trivial ones. See xen/include/Makefile. XSM
also relies on it to generate policy. What do you want to do with those?

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 11:43                               ` Juergen Gross
  0 siblings, 0 replies; 52+ messages in thread
From: Juergen Gross @ 2019-04-17 11:43 UTC (permalink / raw)
  To: Wei Liu, Andrew Cooper
  Cc: xen-devel, Julien Grall, Stefano Stabellini, Jan Beulich, Kevin Buckley

On 17/04/2019 13:26, Wei Liu wrote:
> On Wed, Apr 17, 2019 at 12:23:29PM +0100, Andrew Cooper wrote:
>> On 17/04/2019 12:16, Wei Liu wrote:
>>> On Wed, Apr 17, 2019 at 12:15:04PM +0100, Andrew Cooper wrote:
>>>> On 17/04/2019 12:03, Wei Liu wrote:
>>>>> On Wed, Apr 17, 2019 at 11:58:49AM +0100, Andrew Cooper wrote:
>>>>>> On 17/04/2019 11:57, Wei Liu wrote:
>>>>>>> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
>>>>>>>> On 17/04/2019 11:41, Wei Liu wrote:
>>>>>>>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
>>>>>>>>>>> Here's what i did having pulled the master at commit cb70a26
>>>>>>>>>>>
>>>>>>>>>>> tar xf /path/to/xen-cb70a26.tar.gz
>>>>>>>>>>>
>>>>>>>>>>> cd xen-master/
>>>>>>>>>>>
>>>>>>>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
>>>>>>>>>>>    --disable-seabios   \
>>>>>>>>>>>    --disable-qemu-traditional  \
>>>>>>>>>>>    --disable-rombios     \
>>>>>>>>>>>    --disable-stubdom 2>&1 | tee ../config.log
>>>>>>>>>>>
>>>>>>>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> ...
>>>>>>>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
>>>>>>>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
>>>>>>>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
>>>>>>>>>>> tools/kconfig/zconf.tab.c
>>>>>>>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
>>>>>>>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
>>>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>> make -f Rules.mk _install
>>>>>>>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>> make -C tools
>>>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>> make symbols
>>>>>>>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
>>>>>>>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
>>>>>>>>>>> symbols.c
>>>>>>>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
>>>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>  Xen 4.13-unstable
>>>>>>>>>>> /bin/sh: python: command not found
>>>>>>>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
>>>>>>>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
>>>>>>>>>> build.
>>>>>>>>>>
>>>>>>>>>> Thanks for the log.  I will have a closer look.
>>>>>>>>>>
>>>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
>>>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>> make[2]: *** [Makefile:45: install] Error 2
>>>>>>>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
>>>>>>>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
>>>>>>>>>>> make: *** [Makefile:165: world] Error 2
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Note the
>>>>>>>>>>>
>>>>>>>>>>> /bin/sh: python: command not found
>>>>>>>>>>>
>>>>>>>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
>>>>>>>>> build is broken because xen/include/compile.h invokes
>>>>>>>>>
>>>>>>>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
>>>>>>>>>
>>>>>>>>> There are other appearances of PYTHON in hypervisor build, which are
>>>>>>>>> equally broken.
>>>>>>>>>
>>>>>>>>> We had / have a policy to avoid making hypervisor build dependent on
>>>>>>>>> configure. I have CC'ed more people on their opinions.
>>>>>>>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
>>>>>>> Where is it specified?
>>>>>> Oh - I see now.
>>>>>>
>>>>>> It is specified for ./configure, but not for make.
>>>>> Right.
>>>>>
>>>>> It works for tools because tools build includes config/Tools.mk which
>>>>> contains the correct python path. Tools.mk is generated by configure.
>>>>>  
>>>>> Obviously hypervisor build shouldn't include Tools.mk. Furthermore, the
>>>>> policy of "hv shouldn't depend on configure" makes this route a no-go.
>>>>>
>>>>> Either we change the policy, or we document the deficiency, or we come
>>>>> up with some clever trick to probe.
>>>> Given the shebang in all of our scripts, would `env python` be
>>>> sufficiently clever trickery, or is that a can of worms we'd prefer not
>>>> to open?
>>> I already tried env python -- it didn't work. I think it searches PATHS
>>> just like a shell would.
>>
>> So this particular use of python is completely trivial.  It is an octal
>> conversion on the banner string, to feed into a string for XEN_BANNER
>>
>> It exists because I removed a fork of figlet[1] from Xen's source tree
>> with this script, but its probably just as easy to do with awk or
>> something similar.
>>
>> ~Andrew
>>
>> [1] Yes - Xen did use to carry a fork of figlet which differed solely by
>> being able to output an octal-escaped string.  No - I have no words
>> which can possibly be used to defend this...
> 
> 
> But there are other less trivial ones. See xen/include/Makefile. XSM
> also relies on it to generate policy. What do you want to do with those?

Shouldn't _some_ settings of configure end up in the hypervisor build,
too? Like CC, AWK, SHELL, HOSTCC?

Maybe we need a rather small basic_tools.mk containing those settings
(with a sane default, of course)?


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 11:43                               ` Juergen Gross
  0 siblings, 0 replies; 52+ messages in thread
From: Juergen Gross @ 2019-04-17 11:43 UTC (permalink / raw)
  To: Wei Liu, Andrew Cooper
  Cc: xen-devel, Julien Grall, Stefano Stabellini, Jan Beulich, Kevin Buckley

On 17/04/2019 13:26, Wei Liu wrote:
> On Wed, Apr 17, 2019 at 12:23:29PM +0100, Andrew Cooper wrote:
>> On 17/04/2019 12:16, Wei Liu wrote:
>>> On Wed, Apr 17, 2019 at 12:15:04PM +0100, Andrew Cooper wrote:
>>>> On 17/04/2019 12:03, Wei Liu wrote:
>>>>> On Wed, Apr 17, 2019 at 11:58:49AM +0100, Andrew Cooper wrote:
>>>>>> On 17/04/2019 11:57, Wei Liu wrote:
>>>>>>> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
>>>>>>>> On 17/04/2019 11:41, Wei Liu wrote:
>>>>>>>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
>>>>>>>>>>> Here's what i did having pulled the master at commit cb70a26
>>>>>>>>>>>
>>>>>>>>>>> tar xf /path/to/xen-cb70a26.tar.gz
>>>>>>>>>>>
>>>>>>>>>>> cd xen-master/
>>>>>>>>>>>
>>>>>>>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
>>>>>>>>>>>    --disable-seabios   \
>>>>>>>>>>>    --disable-qemu-traditional  \
>>>>>>>>>>>    --disable-rombios     \
>>>>>>>>>>>    --disable-stubdom 2>&1 | tee ../config.log
>>>>>>>>>>>
>>>>>>>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> ...
>>>>>>>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
>>>>>>>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
>>>>>>>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
>>>>>>>>>>> tools/kconfig/zconf.tab.c
>>>>>>>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
>>>>>>>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
>>>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>> make -f Rules.mk _install
>>>>>>>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>> make -C tools
>>>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>> make symbols
>>>>>>>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
>>>>>>>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
>>>>>>>>>>> symbols.c
>>>>>>>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
>>>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>  Xen 4.13-unstable
>>>>>>>>>>> /bin/sh: python: command not found
>>>>>>>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
>>>>>>>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
>>>>>>>>>> build.
>>>>>>>>>>
>>>>>>>>>> Thanks for the log.  I will have a closer look.
>>>>>>>>>>
>>>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
>>>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>> make[2]: *** [Makefile:45: install] Error 2
>>>>>>>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
>>>>>>>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
>>>>>>>>>>> make: *** [Makefile:165: world] Error 2
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Note the
>>>>>>>>>>>
>>>>>>>>>>> /bin/sh: python: command not found
>>>>>>>>>>>
>>>>>>>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
>>>>>>>>> build is broken because xen/include/compile.h invokes
>>>>>>>>>
>>>>>>>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
>>>>>>>>>
>>>>>>>>> There are other appearances of PYTHON in hypervisor build, which are
>>>>>>>>> equally broken.
>>>>>>>>>
>>>>>>>>> We had / have a policy to avoid making hypervisor build dependent on
>>>>>>>>> configure. I have CC'ed more people on their opinions.
>>>>>>>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
>>>>>>> Where is it specified?
>>>>>> Oh - I see now.
>>>>>>
>>>>>> It is specified for ./configure, but not for make.
>>>>> Right.
>>>>>
>>>>> It works for tools because tools build includes config/Tools.mk which
>>>>> contains the correct python path. Tools.mk is generated by configure.
>>>>>  
>>>>> Obviously hypervisor build shouldn't include Tools.mk. Furthermore, the
>>>>> policy of "hv shouldn't depend on configure" makes this route a no-go.
>>>>>
>>>>> Either we change the policy, or we document the deficiency, or we come
>>>>> up with some clever trick to probe.
>>>> Given the shebang in all of our scripts, would `env python` be
>>>> sufficiently clever trickery, or is that a can of worms we'd prefer not
>>>> to open?
>>> I already tried env python -- it didn't work. I think it searches PATHS
>>> just like a shell would.
>>
>> So this particular use of python is completely trivial.  It is an octal
>> conversion on the banner string, to feed into a string for XEN_BANNER
>>
>> It exists because I removed a fork of figlet[1] from Xen's source tree
>> with this script, but its probably just as easy to do with awk or
>> something similar.
>>
>> ~Andrew
>>
>> [1] Yes - Xen did use to carry a fork of figlet which differed solely by
>> being able to output an octal-escaped string.  No - I have no words
>> which can possibly be used to defend this...
> 
> 
> But there are other less trivial ones. See xen/include/Makefile. XSM
> also relies on it to generate policy. What do you want to do with those?

Shouldn't _some_ settings of configure end up in the hypervisor build,
too? Like CC, AWK, SHELL, HOSTCC?

Maybe we need a rather small basic_tools.mk containing those settings
(with a sane default, of course)?


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 11:53                                 ` Andrew Cooper
  0 siblings, 0 replies; 52+ messages in thread
From: Andrew Cooper @ 2019-04-17 11:53 UTC (permalink / raw)
  To: Juergen Gross, Wei Liu
  Cc: xen-devel, Julien Grall, Stefano Stabellini, Jan Beulich, Kevin Buckley

On 17/04/2019 12:43, Juergen Gross wrote:
> On 17/04/2019 13:26, Wei Liu wrote:
>> On Wed, Apr 17, 2019 at 12:23:29PM +0100, Andrew Cooper wrote:
>>> On 17/04/2019 12:16, Wei Liu wrote:
>>>> On Wed, Apr 17, 2019 at 12:15:04PM +0100, Andrew Cooper wrote:
>>>>> On 17/04/2019 12:03, Wei Liu wrote:
>>>>>> On Wed, Apr 17, 2019 at 11:58:49AM +0100, Andrew Cooper wrote:
>>>>>>> On 17/04/2019 11:57, Wei Liu wrote:
>>>>>>>> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
>>>>>>>>> On 17/04/2019 11:41, Wei Liu wrote:
>>>>>>>>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
>>>>>>>>>>>> Here's what i did having pulled the master at commit cb70a26
>>>>>>>>>>>>
>>>>>>>>>>>> tar xf /path/to/xen-cb70a26.tar.gz
>>>>>>>>>>>>
>>>>>>>>>>>> cd xen-master/
>>>>>>>>>>>>
>>>>>>>>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
>>>>>>>>>>>>    --disable-seabios   \
>>>>>>>>>>>>    --disable-qemu-traditional  \
>>>>>>>>>>>>    --disable-rombios     \
>>>>>>>>>>>>    --disable-stubdom 2>&1 | tee ../config.log
>>>>>>>>>>>>
>>>>>>>>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ...
>>>>>>>>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
>>>>>>>>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
>>>>>>>>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
>>>>>>>>>>>> tools/kconfig/zconf.tab.c
>>>>>>>>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
>>>>>>>>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
>>>>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>> make -f Rules.mk _install
>>>>>>>>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>> make -C tools
>>>>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>>> make symbols
>>>>>>>>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
>>>>>>>>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
>>>>>>>>>>>> symbols.c
>>>>>>>>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
>>>>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>>  Xen 4.13-unstable
>>>>>>>>>>>> /bin/sh: python: command not found
>>>>>>>>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
>>>>>>>>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
>>>>>>>>>>> build.
>>>>>>>>>>>
>>>>>>>>>>> Thanks for the log.  I will have a closer look.
>>>>>>>>>>>
>>>>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
>>>>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>> make[2]: *** [Makefile:45: install] Error 2
>>>>>>>>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
>>>>>>>>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
>>>>>>>>>>>> make: *** [Makefile:165: world] Error 2
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Note the
>>>>>>>>>>>>
>>>>>>>>>>>> /bin/sh: python: command not found
>>>>>>>>>>>>
>>>>>>>>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
>>>>>>>>>> build is broken because xen/include/compile.h invokes
>>>>>>>>>>
>>>>>>>>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
>>>>>>>>>>
>>>>>>>>>> There are other appearances of PYTHON in hypervisor build, which are
>>>>>>>>>> equally broken.
>>>>>>>>>>
>>>>>>>>>> We had / have a policy to avoid making hypervisor build dependent on
>>>>>>>>>> configure. I have CC'ed more people on their opinions.
>>>>>>>>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
>>>>>>>> Where is it specified?
>>>>>>> Oh - I see now.
>>>>>>>
>>>>>>> It is specified for ./configure, but not for make.
>>>>>> Right.
>>>>>>
>>>>>> It works for tools because tools build includes config/Tools.mk which
>>>>>> contains the correct python path. Tools.mk is generated by configure.
>>>>>>  
>>>>>> Obviously hypervisor build shouldn't include Tools.mk. Furthermore, the
>>>>>> policy of "hv shouldn't depend on configure" makes this route a no-go.
>>>>>>
>>>>>> Either we change the policy, or we document the deficiency, or we come
>>>>>> up with some clever trick to probe.
>>>>> Given the shebang in all of our scripts, would `env python` be
>>>>> sufficiently clever trickery, or is that a can of worms we'd prefer not
>>>>> to open?
>>>> I already tried env python -- it didn't work. I think it searches PATHS
>>>> just like a shell would.
>>> So this particular use of python is completely trivial.  It is an octal
>>> conversion on the banner string, to feed into a string for XEN_BANNER
>>>
>>> It exists because I removed a fork of figlet[1] from Xen's source tree
>>> with this script, but its probably just as easy to do with awk or
>>> something similar.
>>>
>>> ~Andrew
>>>
>>> [1] Yes - Xen did use to carry a fork of figlet which differed solely by
>>> being able to output an octal-escaped string.  No - I have no words
>>> which can possibly be used to defend this...
>>
>> But there are other less trivial ones. See xen/include/Makefile. XSM
>> also relies on it to generate policy. What do you want to do with those?
> Shouldn't _some_ settings of configure end up in the hypervisor build,
> too? Like CC, AWK, SHELL, HOSTCC?
>
> Maybe we need a rather small basic_tools.mk containing those settings
> (with a sane default, of course)?

In the past, there has been a vehement objection to requiring
./configure before building Xen, and I still agree with this point of
view.  Noone should need to run ./configure to be able to build a
freestanding item with no userspace connection.

The problem Xen has is that we've got two vastly different projects in
the same source repo, and `make` runes which encompass both.

Could we go with some compromise where the results of configure are used
if they are available, but for people not wanting to run configure, if
they've got non-standard standard tools, they need to pass them to make
as well?  This is consistent with how cross compiling works.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 11:53                                 ` Andrew Cooper
  0 siblings, 0 replies; 52+ messages in thread
From: Andrew Cooper @ 2019-04-17 11:53 UTC (permalink / raw)
  To: Juergen Gross, Wei Liu
  Cc: xen-devel, Julien Grall, Stefano Stabellini, Jan Beulich, Kevin Buckley

On 17/04/2019 12:43, Juergen Gross wrote:
> On 17/04/2019 13:26, Wei Liu wrote:
>> On Wed, Apr 17, 2019 at 12:23:29PM +0100, Andrew Cooper wrote:
>>> On 17/04/2019 12:16, Wei Liu wrote:
>>>> On Wed, Apr 17, 2019 at 12:15:04PM +0100, Andrew Cooper wrote:
>>>>> On 17/04/2019 12:03, Wei Liu wrote:
>>>>>> On Wed, Apr 17, 2019 at 11:58:49AM +0100, Andrew Cooper wrote:
>>>>>>> On 17/04/2019 11:57, Wei Liu wrote:
>>>>>>>> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
>>>>>>>>> On 17/04/2019 11:41, Wei Liu wrote:
>>>>>>>>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
>>>>>>>>>>>> Here's what i did having pulled the master at commit cb70a26
>>>>>>>>>>>>
>>>>>>>>>>>> tar xf /path/to/xen-cb70a26.tar.gz
>>>>>>>>>>>>
>>>>>>>>>>>> cd xen-master/
>>>>>>>>>>>>
>>>>>>>>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
>>>>>>>>>>>>    --disable-seabios   \
>>>>>>>>>>>>    --disable-qemu-traditional  \
>>>>>>>>>>>>    --disable-rombios     \
>>>>>>>>>>>>    --disable-stubdom 2>&1 | tee ../config.log
>>>>>>>>>>>>
>>>>>>>>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> ...
>>>>>>>>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
>>>>>>>>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
>>>>>>>>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
>>>>>>>>>>>> tools/kconfig/zconf.tab.c
>>>>>>>>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
>>>>>>>>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
>>>>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>> make -f Rules.mk _install
>>>>>>>>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>> make -C tools
>>>>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>>> make symbols
>>>>>>>>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
>>>>>>>>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
>>>>>>>>>>>> symbols.c
>>>>>>>>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
>>>>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>>  Xen 4.13-unstable
>>>>>>>>>>>> /bin/sh: python: command not found
>>>>>>>>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
>>>>>>>>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
>>>>>>>>>>> build.
>>>>>>>>>>>
>>>>>>>>>>> Thanks for the log.  I will have a closer look.
>>>>>>>>>>>
>>>>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
>>>>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>> make[2]: *** [Makefile:45: install] Error 2
>>>>>>>>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
>>>>>>>>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
>>>>>>>>>>>> make: *** [Makefile:165: world] Error 2
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Note the
>>>>>>>>>>>>
>>>>>>>>>>>> /bin/sh: python: command not found
>>>>>>>>>>>>
>>>>>>>>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
>>>>>>>>>> build is broken because xen/include/compile.h invokes
>>>>>>>>>>
>>>>>>>>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
>>>>>>>>>>
>>>>>>>>>> There are other appearances of PYTHON in hypervisor build, which are
>>>>>>>>>> equally broken.
>>>>>>>>>>
>>>>>>>>>> We had / have a policy to avoid making hypervisor build dependent on
>>>>>>>>>> configure. I have CC'ed more people on their opinions.
>>>>>>>>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
>>>>>>>> Where is it specified?
>>>>>>> Oh - I see now.
>>>>>>>
>>>>>>> It is specified for ./configure, but not for make.
>>>>>> Right.
>>>>>>
>>>>>> It works for tools because tools build includes config/Tools.mk which
>>>>>> contains the correct python path. Tools.mk is generated by configure.
>>>>>>  
>>>>>> Obviously hypervisor build shouldn't include Tools.mk. Furthermore, the
>>>>>> policy of "hv shouldn't depend on configure" makes this route a no-go.
>>>>>>
>>>>>> Either we change the policy, or we document the deficiency, or we come
>>>>>> up with some clever trick to probe.
>>>>> Given the shebang in all of our scripts, would `env python` be
>>>>> sufficiently clever trickery, or is that a can of worms we'd prefer not
>>>>> to open?
>>>> I already tried env python -- it didn't work. I think it searches PATHS
>>>> just like a shell would.
>>> So this particular use of python is completely trivial.  It is an octal
>>> conversion on the banner string, to feed into a string for XEN_BANNER
>>>
>>> It exists because I removed a fork of figlet[1] from Xen's source tree
>>> with this script, but its probably just as easy to do with awk or
>>> something similar.
>>>
>>> ~Andrew
>>>
>>> [1] Yes - Xen did use to carry a fork of figlet which differed solely by
>>> being able to output an octal-escaped string.  No - I have no words
>>> which can possibly be used to defend this...
>>
>> But there are other less trivial ones. See xen/include/Makefile. XSM
>> also relies on it to generate policy. What do you want to do with those?
> Shouldn't _some_ settings of configure end up in the hypervisor build,
> too? Like CC, AWK, SHELL, HOSTCC?
>
> Maybe we need a rather small basic_tools.mk containing those settings
> (with a sane default, of course)?

In the past, there has been a vehement objection to requiring
./configure before building Xen, and I still agree with this point of
view.  Noone should need to run ./configure to be able to build a
freestanding item with no userspace connection.

The problem Xen has is that we've got two vastly different projects in
the same source repo, and `make` runes which encompass both.

Could we go with some compromise where the results of configure are used
if they are available, but for people not wanting to run configure, if
they've got non-standard standard tools, they need to pass them to make
as well?  This is consistent with how cross compiling works.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 12:44                                   ` Juergen Gross
  0 siblings, 0 replies; 52+ messages in thread
From: Juergen Gross @ 2019-04-17 12:44 UTC (permalink / raw)
  To: Andrew Cooper, Wei Liu
  Cc: Kevin Buckley, xen-devel, Julien Grall, Stefano Stabellini, Jan Beulich

On 17/04/2019 13:53, Andrew Cooper wrote:
> On 17/04/2019 12:43, Juergen Gross wrote:
>> On 17/04/2019 13:26, Wei Liu wrote:
>>> On Wed, Apr 17, 2019 at 12:23:29PM +0100, Andrew Cooper wrote:
>>>> On 17/04/2019 12:16, Wei Liu wrote:
>>>>> On Wed, Apr 17, 2019 at 12:15:04PM +0100, Andrew Cooper wrote:
>>>>>> On 17/04/2019 12:03, Wei Liu wrote:
>>>>>>> On Wed, Apr 17, 2019 at 11:58:49AM +0100, Andrew Cooper wrote:
>>>>>>>> On 17/04/2019 11:57, Wei Liu wrote:
>>>>>>>>> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
>>>>>>>>>> On 17/04/2019 11:41, Wei Liu wrote:
>>>>>>>>>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
>>>>>>>>>>>>> Here's what i did having pulled the master at commit cb70a26
>>>>>>>>>>>>>
>>>>>>>>>>>>> tar xf /path/to/xen-cb70a26.tar.gz
>>>>>>>>>>>>>
>>>>>>>>>>>>> cd xen-master/
>>>>>>>>>>>>>
>>>>>>>>>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
>>>>>>>>>>>>>    --disable-seabios   \
>>>>>>>>>>>>>    --disable-qemu-traditional  \
>>>>>>>>>>>>>    --disable-rombios     \
>>>>>>>>>>>>>    --disable-stubdom 2>&1 | tee ../config.log
>>>>>>>>>>>>>
>>>>>>>>>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> ...
>>>>>>>>>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
>>>>>>>>>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
>>>>>>>>>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
>>>>>>>>>>>>> tools/kconfig/zconf.tab.c
>>>>>>>>>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
>>>>>>>>>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
>>>>>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>>> make -f Rules.mk _install
>>>>>>>>>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>>> make -C tools
>>>>>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>>>> make symbols
>>>>>>>>>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
>>>>>>>>>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
>>>>>>>>>>>>> symbols.c
>>>>>>>>>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
>>>>>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>>>  Xen 4.13-unstable
>>>>>>>>>>>>> /bin/sh: python: command not found
>>>>>>>>>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
>>>>>>>>>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
>>>>>>>>>>>> build.
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks for the log.  I will have a closer look.
>>>>>>>>>>>>
>>>>>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
>>>>>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>>> make[2]: *** [Makefile:45: install] Error 2
>>>>>>>>>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
>>>>>>>>>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
>>>>>>>>>>>>> make: *** [Makefile:165: world] Error 2
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Note the
>>>>>>>>>>>>>
>>>>>>>>>>>>> /bin/sh: python: command not found
>>>>>>>>>>>>>
>>>>>>>>>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
>>>>>>>>>>> build is broken because xen/include/compile.h invokes
>>>>>>>>>>>
>>>>>>>>>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
>>>>>>>>>>>
>>>>>>>>>>> There are other appearances of PYTHON in hypervisor build, which are
>>>>>>>>>>> equally broken.
>>>>>>>>>>>
>>>>>>>>>>> We had / have a policy to avoid making hypervisor build dependent on
>>>>>>>>>>> configure. I have CC'ed more people on their opinions.
>>>>>>>>>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
>>>>>>>>> Where is it specified?
>>>>>>>> Oh - I see now.
>>>>>>>>
>>>>>>>> It is specified for ./configure, but not for make.
>>>>>>> Right.
>>>>>>>
>>>>>>> It works for tools because tools build includes config/Tools.mk which
>>>>>>> contains the correct python path. Tools.mk is generated by configure.
>>>>>>>  
>>>>>>> Obviously hypervisor build shouldn't include Tools.mk. Furthermore, the
>>>>>>> policy of "hv shouldn't depend on configure" makes this route a no-go.
>>>>>>>
>>>>>>> Either we change the policy, or we document the deficiency, or we come
>>>>>>> up with some clever trick to probe.
>>>>>> Given the shebang in all of our scripts, would `env python` be
>>>>>> sufficiently clever trickery, or is that a can of worms we'd prefer not
>>>>>> to open?
>>>>> I already tried env python -- it didn't work. I think it searches PATHS
>>>>> just like a shell would.
>>>> So this particular use of python is completely trivial.  It is an octal
>>>> conversion on the banner string, to feed into a string for XEN_BANNER
>>>>
>>>> It exists because I removed a fork of figlet[1] from Xen's source tree
>>>> with this script, but its probably just as easy to do with awk or
>>>> something similar.
>>>>
>>>> ~Andrew
>>>>
>>>> [1] Yes - Xen did use to carry a fork of figlet which differed solely by
>>>> being able to output an octal-escaped string.  No - I have no words
>>>> which can possibly be used to defend this...
>>>
>>> But there are other less trivial ones. See xen/include/Makefile. XSM
>>> also relies on it to generate policy. What do you want to do with those?
>> Shouldn't _some_ settings of configure end up in the hypervisor build,
>> too? Like CC, AWK, SHELL, HOSTCC?
>>
>> Maybe we need a rather small basic_tools.mk containing those settings
>> (with a sane default, of course)?
> 
> In the past, there has been a vehement objection to requiring
> ./configure before building Xen, and I still agree with this point of
> view.  Noone should need to run ./configure to be able to build a
> freestanding item with no userspace connection.
> 
> The problem Xen has is that we've got two vastly different projects in
> the same source repo, and `make` runes which encompass both.
> 
> Could we go with some compromise where the results of configure are used
> if they are available, but for people not wanting to run configure, if
> they've got non-standard standard tools, they need to pass them to make
> as well?  This is consistent with how cross compiling works.

That should be fairly easy.

Let Config.mk have:

-include config/basic_tools.mk

at the very beginning, with config/basic_tools.mk being created via
configure and containing the basic tool variables:

CC := gcc
AWK := awk
PYTHON := python3
...

As Config.mk will set those variables with defualt values in case they
are empty all is fine then.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 12:44                                   ` Juergen Gross
  0 siblings, 0 replies; 52+ messages in thread
From: Juergen Gross @ 2019-04-17 12:44 UTC (permalink / raw)
  To: Andrew Cooper, Wei Liu
  Cc: Kevin Buckley, xen-devel, Julien Grall, Stefano Stabellini, Jan Beulich

On 17/04/2019 13:53, Andrew Cooper wrote:
> On 17/04/2019 12:43, Juergen Gross wrote:
>> On 17/04/2019 13:26, Wei Liu wrote:
>>> On Wed, Apr 17, 2019 at 12:23:29PM +0100, Andrew Cooper wrote:
>>>> On 17/04/2019 12:16, Wei Liu wrote:
>>>>> On Wed, Apr 17, 2019 at 12:15:04PM +0100, Andrew Cooper wrote:
>>>>>> On 17/04/2019 12:03, Wei Liu wrote:
>>>>>>> On Wed, Apr 17, 2019 at 11:58:49AM +0100, Andrew Cooper wrote:
>>>>>>>> On 17/04/2019 11:57, Wei Liu wrote:
>>>>>>>>> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
>>>>>>>>>> On 17/04/2019 11:41, Wei Liu wrote:
>>>>>>>>>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
>>>>>>>>>>>>> Here's what i did having pulled the master at commit cb70a26
>>>>>>>>>>>>>
>>>>>>>>>>>>> tar xf /path/to/xen-cb70a26.tar.gz
>>>>>>>>>>>>>
>>>>>>>>>>>>> cd xen-master/
>>>>>>>>>>>>>
>>>>>>>>>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
>>>>>>>>>>>>>    --disable-seabios   \
>>>>>>>>>>>>>    --disable-qemu-traditional  \
>>>>>>>>>>>>>    --disable-rombios     \
>>>>>>>>>>>>>    --disable-stubdom 2>&1 | tee ../config.log
>>>>>>>>>>>>>
>>>>>>>>>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> ...
>>>>>>>>>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
>>>>>>>>>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
>>>>>>>>>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
>>>>>>>>>>>>> tools/kconfig/zconf.tab.c
>>>>>>>>>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
>>>>>>>>>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
>>>>>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>>> make -f Rules.mk _install
>>>>>>>>>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>>> make -C tools
>>>>>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>>>> make symbols
>>>>>>>>>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
>>>>>>>>>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
>>>>>>>>>>>>> symbols.c
>>>>>>>>>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
>>>>>>>>>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
>>>>>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>>>  Xen 4.13-unstable
>>>>>>>>>>>>> /bin/sh: python: command not found
>>>>>>>>>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
>>>>>>>>>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
>>>>>>>>>>>> build.
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks for the log.  I will have a closer look.
>>>>>>>>>>>>
>>>>>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
>>>>>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>>> make[2]: *** [Makefile:45: install] Error 2
>>>>>>>>>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
>>>>>>>>>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
>>>>>>>>>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
>>>>>>>>>>>>> make: *** [Makefile:165: world] Error 2
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Note the
>>>>>>>>>>>>>
>>>>>>>>>>>>> /bin/sh: python: command not found
>>>>>>>>>>>>>
>>>>>>>>>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
>>>>>>>>>>> build is broken because xen/include/compile.h invokes
>>>>>>>>>>>
>>>>>>>>>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
>>>>>>>>>>>
>>>>>>>>>>> There are other appearances of PYTHON in hypervisor build, which are
>>>>>>>>>>> equally broken.
>>>>>>>>>>>
>>>>>>>>>>> We had / have a policy to avoid making hypervisor build dependent on
>>>>>>>>>>> configure. I have CC'ed more people on their opinions.
>>>>>>>>>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
>>>>>>>>> Where is it specified?
>>>>>>>> Oh - I see now.
>>>>>>>>
>>>>>>>> It is specified for ./configure, but not for make.
>>>>>>> Right.
>>>>>>>
>>>>>>> It works for tools because tools build includes config/Tools.mk which
>>>>>>> contains the correct python path. Tools.mk is generated by configure.
>>>>>>>  
>>>>>>> Obviously hypervisor build shouldn't include Tools.mk. Furthermore, the
>>>>>>> policy of "hv shouldn't depend on configure" makes this route a no-go.
>>>>>>>
>>>>>>> Either we change the policy, or we document the deficiency, or we come
>>>>>>> up with some clever trick to probe.
>>>>>> Given the shebang in all of our scripts, would `env python` be
>>>>>> sufficiently clever trickery, or is that a can of worms we'd prefer not
>>>>>> to open?
>>>>> I already tried env python -- it didn't work. I think it searches PATHS
>>>>> just like a shell would.
>>>> So this particular use of python is completely trivial.  It is an octal
>>>> conversion on the banner string, to feed into a string for XEN_BANNER
>>>>
>>>> It exists because I removed a fork of figlet[1] from Xen's source tree
>>>> with this script, but its probably just as easy to do with awk or
>>>> something similar.
>>>>
>>>> ~Andrew
>>>>
>>>> [1] Yes - Xen did use to carry a fork of figlet which differed solely by
>>>> being able to output an octal-escaped string.  No - I have no words
>>>> which can possibly be used to defend this...
>>>
>>> But there are other less trivial ones. See xen/include/Makefile. XSM
>>> also relies on it to generate policy. What do you want to do with those?
>> Shouldn't _some_ settings of configure end up in the hypervisor build,
>> too? Like CC, AWK, SHELL, HOSTCC?
>>
>> Maybe we need a rather small basic_tools.mk containing those settings
>> (with a sane default, of course)?
> 
> In the past, there has been a vehement objection to requiring
> ./configure before building Xen, and I still agree with this point of
> view.  Noone should need to run ./configure to be able to build a
> freestanding item with no userspace connection.
> 
> The problem Xen has is that we've got two vastly different projects in
> the same source repo, and `make` runes which encompass both.
> 
> Could we go with some compromise where the results of configure are used
> if they are available, but for people not wanting to run configure, if
> they've got non-standard standard tools, they need to pass them to make
> as well?  This is consistent with how cross compiling works.

That should be fairly easy.

Let Config.mk have:

-include config/basic_tools.mk

at the very beginning, with config/basic_tools.mk being created via
configure and containing the basic tool variables:

CC := gcc
AWK := awk
PYTHON := python3
...

As Config.mk will set those variables with defualt values in case they
are empty all is fine then.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 14:51                                     ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-17 14:51 UTC (permalink / raw)
  To: Juergen Gross
  Cc: Stefano Stabellini, Wei Liu, Andrew Cooper, Kevin Buckley,
	Julien Grall, Jan Beulich, xen-devel

On Wed, Apr 17, 2019 at 02:44:21PM +0200, Juergen Gross wrote:
> On 17/04/2019 13:53, Andrew Cooper wrote:
> > On 17/04/2019 12:43, Juergen Gross wrote:
> >> On 17/04/2019 13:26, Wei Liu wrote:
> >>> On Wed, Apr 17, 2019 at 12:23:29PM +0100, Andrew Cooper wrote:
> >>>> On 17/04/2019 12:16, Wei Liu wrote:
> >>>>> On Wed, Apr 17, 2019 at 12:15:04PM +0100, Andrew Cooper wrote:
> >>>>>> On 17/04/2019 12:03, Wei Liu wrote:
> >>>>>>> On Wed, Apr 17, 2019 at 11:58:49AM +0100, Andrew Cooper wrote:
> >>>>>>>> On 17/04/2019 11:57, Wei Liu wrote:
> >>>>>>>>> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
> >>>>>>>>>> On 17/04/2019 11:41, Wei Liu wrote:
> >>>>>>>>>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
> >>>>>>>>>>>>> Here's what i did having pulled the master at commit cb70a26
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> tar xf /path/to/xen-cb70a26.tar.gz
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> cd xen-master/
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
> >>>>>>>>>>>>>    --disable-seabios   \
> >>>>>>>>>>>>>    --disable-qemu-traditional  \
> >>>>>>>>>>>>>    --disable-rombios     \
> >>>>>>>>>>>>>    --disable-stubdom 2>&1 | tee ../config.log
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> ...
> >>>>>>>>>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
> >>>>>>>>>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
> >>>>>>>>>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
> >>>>>>>>>>>>> tools/kconfig/zconf.tab.c
> >>>>>>>>>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
> >>>>>>>>>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
> >>>>>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>>>>>> make -f Rules.mk _install
> >>>>>>>>>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>>>>>> make -C tools
> >>>>>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>>>>>>>> make symbols
> >>>>>>>>>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>>>>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
> >>>>>>>>>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
> >>>>>>>>>>>>> symbols.c
> >>>>>>>>>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>>>>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
> >>>>>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>>>>>>  Xen 4.13-unstable
> >>>>>>>>>>>>> /bin/sh: python: command not found
> >>>>>>>>>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
> >>>>>>>>>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
> >>>>>>>>>>>> build.
> >>>>>>>>>>>>
> >>>>>>>>>>>> Thanks for the log.  I will have a closer look.
> >>>>>>>>>>>>
> >>>>>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
> >>>>>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>>>>>> make[2]: *** [Makefile:45: install] Error 2
> >>>>>>>>>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
> >>>>>>>>>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
> >>>>>>>>>>>>> make: *** [Makefile:165: world] Error 2
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> Note the
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> /bin/sh: python: command not found
> >>>>>>>>>>>>>
> >>>>>>>>>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
> >>>>>>>>>>> build is broken because xen/include/compile.h invokes
> >>>>>>>>>>>
> >>>>>>>>>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
> >>>>>>>>>>>
> >>>>>>>>>>> There are other appearances of PYTHON in hypervisor build, which are
> >>>>>>>>>>> equally broken.
> >>>>>>>>>>>
> >>>>>>>>>>> We had / have a policy to avoid making hypervisor build dependent on
> >>>>>>>>>>> configure. I have CC'ed more people on their opinions.
> >>>>>>>>>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
> >>>>>>>>> Where is it specified?
> >>>>>>>> Oh - I see now.
> >>>>>>>>
> >>>>>>>> It is specified for ./configure, but not for make.
> >>>>>>> Right.
> >>>>>>>
> >>>>>>> It works for tools because tools build includes config/Tools.mk which
> >>>>>>> contains the correct python path. Tools.mk is generated by configure.
> >>>>>>>  
> >>>>>>> Obviously hypervisor build shouldn't include Tools.mk. Furthermore, the
> >>>>>>> policy of "hv shouldn't depend on configure" makes this route a no-go.
> >>>>>>>
> >>>>>>> Either we change the policy, or we document the deficiency, or we come
> >>>>>>> up with some clever trick to probe.
> >>>>>> Given the shebang in all of our scripts, would `env python` be
> >>>>>> sufficiently clever trickery, or is that a can of worms we'd prefer not
> >>>>>> to open?
> >>>>> I already tried env python -- it didn't work. I think it searches PATHS
> >>>>> just like a shell would.
> >>>> So this particular use of python is completely trivial.  It is an octal
> >>>> conversion on the banner string, to feed into a string for XEN_BANNER
> >>>>
> >>>> It exists because I removed a fork of figlet[1] from Xen's source tree
> >>>> with this script, but its probably just as easy to do with awk or
> >>>> something similar.
> >>>>
> >>>> ~Andrew
> >>>>
> >>>> [1] Yes - Xen did use to carry a fork of figlet which differed solely by
> >>>> being able to output an octal-escaped string.  No - I have no words
> >>>> which can possibly be used to defend this...
> >>>
> >>> But there are other less trivial ones. See xen/include/Makefile. XSM
> >>> also relies on it to generate policy. What do you want to do with those?
> >> Shouldn't _some_ settings of configure end up in the hypervisor build,
> >> too? Like CC, AWK, SHELL, HOSTCC?
> >>
> >> Maybe we need a rather small basic_tools.mk containing those settings
> >> (with a sane default, of course)?
> > 
> > In the past, there has been a vehement objection to requiring
> > ./configure before building Xen, and I still agree with this point of
> > view.  Noone should need to run ./configure to be able to build a
> > freestanding item with no userspace connection.
> > 
> > The problem Xen has is that we've got two vastly different projects in
> > the same source repo, and `make` runes which encompass both.
> > 
> > Could we go with some compromise where the results of configure are used
> > if they are available, but for people not wanting to run configure, if
> > they've got non-standard standard tools, they need to pass them to make
> > as well?  This is consistent with how cross compiling works.
> 
> That should be fairly easy.
> 
> Let Config.mk have:
> 
> -include config/basic_tools.mk
> 
> at the very beginning, with config/basic_tools.mk being created via
> configure and containing the basic tool variables:
> 
> CC := gcc
> AWK := awk
> PYTHON := python3
> ...
> 
> As Config.mk will set those variables with defualt values in case they
> are empty all is fine then.

Frankly I'm not a big fan of this approach -- you can potentially get
different toolchain depending on how you build stuff. I would rather
just document that for hypervisor build either python is available or
you should specify PYTHON= when invoking make.

Wei.

> 
> 
> Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-17 14:51                                     ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-04-17 14:51 UTC (permalink / raw)
  To: Juergen Gross
  Cc: Stefano Stabellini, Wei Liu, Andrew Cooper, Kevin Buckley,
	Julien Grall, Jan Beulich, xen-devel

On Wed, Apr 17, 2019 at 02:44:21PM +0200, Juergen Gross wrote:
> On 17/04/2019 13:53, Andrew Cooper wrote:
> > On 17/04/2019 12:43, Juergen Gross wrote:
> >> On 17/04/2019 13:26, Wei Liu wrote:
> >>> On Wed, Apr 17, 2019 at 12:23:29PM +0100, Andrew Cooper wrote:
> >>>> On 17/04/2019 12:16, Wei Liu wrote:
> >>>>> On Wed, Apr 17, 2019 at 12:15:04PM +0100, Andrew Cooper wrote:
> >>>>>> On 17/04/2019 12:03, Wei Liu wrote:
> >>>>>>> On Wed, Apr 17, 2019 at 11:58:49AM +0100, Andrew Cooper wrote:
> >>>>>>>> On 17/04/2019 11:57, Wei Liu wrote:
> >>>>>>>>> On Wed, Apr 17, 2019 at 11:44:36AM +0100, Andrew Cooper wrote:
> >>>>>>>>>> On 17/04/2019 11:41, Wei Liu wrote:
> >>>>>>>>>>> On Wed, Apr 17, 2019 at 10:56:57AM +0100, Wei Liu wrote:
> >>>>>>>>>>>>> Here's what i did having pulled the master at commit cb70a26
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> tar xf /path/to/xen-cb70a26.tar.gz
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> cd xen-master/
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
> >>>>>>>>>>>>>    --disable-seabios   \
> >>>>>>>>>>>>>    --disable-qemu-traditional  \
> >>>>>>>>>>>>>    --disable-rombios     \
> >>>>>>>>>>>>>    --disable-stubdom 2>&1 | tee ../config.log
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> make EFI_DIR=/usr/lib/efi world 2>&1 | tee ../make_world_3.out
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> ...
> >>>>>>>>>>>>> gcc -Wp,-MD,tools/kconfig/.zconf.tab.o.d    -D_GNU_SOURCE
> >>>>>>>>>>>>> -D_DEFAULT_SOURCE -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1
> >>>>>>>>>>>>> -DLOCALE  -Itools/kconfig -c -o tools/kconfig/zconf.tab.o
> >>>>>>>>>>>>> tools/kconfig/zconf.tab.c
> >>>>>>>>>>>>> gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/zconf.tab.o
> >>>>>>>>>>>>> tools/kconfig/conf -s --silentoldconfig Kconfig
> >>>>>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>>>>>> make -f Rules.mk _install
> >>>>>>>>>>>>> make[3]: Entering directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>>>>>> make -C tools
> >>>>>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>>>>>>>> make symbols
> >>>>>>>>>>>>> make[5]: Entering directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>>>>>>>> gcc -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
> >>>>>>>>>>>>> -fno-strict-aliasing -Wdeclaration-after-statement -o symbols
> >>>>>>>>>>>>> symbols.c
> >>>>>>>>>>>>> make[5]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen/tools'
> >>>>>>>>>>>>> make -f /usr/src/xen/xen-master/xen/Rules.mk include/xen/compile.h
> >>>>>>>>>>>>> make[4]: Entering directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>>>>>>  Xen 4.13-unstable
> >>>>>>>>>>>>> /bin/sh: python: command not found
> >>>>>>>>>>>>> make[4]: *** [Makefile:169: include/xen/compile.h] Error 127
> >>>>>>>>>>>> Here. The PYTHON invocation is from the hypervisor build, not the tools
> >>>>>>>>>>>> build.
> >>>>>>>>>>>>
> >>>>>>>>>>>> Thanks for the log.  I will have a closer look.
> >>>>>>>>>>>>
> >>>>>>>>>>>>> make[4]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>>>>>> make[3]: *** [Makefile:137: /usr/src/xen/xen-master/xen/xen] Error 2
> >>>>>>>>>>>>> make[3]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>>>>>> make[2]: *** [Makefile:45: install] Error 2
> >>>>>>>>>>>>> make[2]: Leaving directory '/usr/src/xen/xen-master/xen'
> >>>>>>>>>>>>> make[1]: *** [Makefile:123: install-xen] Error 2
> >>>>>>>>>>>>> make[1]: Leaving directory '/usr/src/xen/xen-master'
> >>>>>>>>>>>>> make: *** [Makefile:165: world] Error 2
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> Note the
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> /bin/sh: python: command not found
> >>>>>>>>>>>>>
> >>>>>>>>>>> The issue here is on LFS there is no /usr/bin/python. So the hypervisor
> >>>>>>>>>>> build is broken because xen/include/compile.h invokes
> >>>>>>>>>>>
> >>>>>>>>>>>  @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
> >>>>>>>>>>>
> >>>>>>>>>>> There are other appearances of PYTHON in hypervisor build, which are
> >>>>>>>>>>> equally broken.
> >>>>>>>>>>>
> >>>>>>>>>>> We had / have a policy to avoid making hypervisor build dependent on
> >>>>>>>>>>> configure. I have CC'ed more people on their opinions.
> >>>>>>>>>> Where has $(PYTHON) got lost?  It was specified correctly to begin with.
> >>>>>>>>> Where is it specified?
> >>>>>>>> Oh - I see now.
> >>>>>>>>
> >>>>>>>> It is specified for ./configure, but not for make.
> >>>>>>> Right.
> >>>>>>>
> >>>>>>> It works for tools because tools build includes config/Tools.mk which
> >>>>>>> contains the correct python path. Tools.mk is generated by configure.
> >>>>>>>  
> >>>>>>> Obviously hypervisor build shouldn't include Tools.mk. Furthermore, the
> >>>>>>> policy of "hv shouldn't depend on configure" makes this route a no-go.
> >>>>>>>
> >>>>>>> Either we change the policy, or we document the deficiency, or we come
> >>>>>>> up with some clever trick to probe.
> >>>>>> Given the shebang in all of our scripts, would `env python` be
> >>>>>> sufficiently clever trickery, or is that a can of worms we'd prefer not
> >>>>>> to open?
> >>>>> I already tried env python -- it didn't work. I think it searches PATHS
> >>>>> just like a shell would.
> >>>> So this particular use of python is completely trivial.  It is an octal
> >>>> conversion on the banner string, to feed into a string for XEN_BANNER
> >>>>
> >>>> It exists because I removed a fork of figlet[1] from Xen's source tree
> >>>> with this script, but its probably just as easy to do with awk or
> >>>> something similar.
> >>>>
> >>>> ~Andrew
> >>>>
> >>>> [1] Yes - Xen did use to carry a fork of figlet which differed solely by
> >>>> being able to output an octal-escaped string.  No - I have no words
> >>>> which can possibly be used to defend this...
> >>>
> >>> But there are other less trivial ones. See xen/include/Makefile. XSM
> >>> also relies on it to generate policy. What do you want to do with those?
> >> Shouldn't _some_ settings of configure end up in the hypervisor build,
> >> too? Like CC, AWK, SHELL, HOSTCC?
> >>
> >> Maybe we need a rather small basic_tools.mk containing those settings
> >> (with a sane default, of course)?
> > 
> > In the past, there has been a vehement objection to requiring
> > ./configure before building Xen, and I still agree with this point of
> > view.  Noone should need to run ./configure to be able to build a
> > freestanding item with no userspace connection.
> > 
> > The problem Xen has is that we've got two vastly different projects in
> > the same source repo, and `make` runes which encompass both.
> > 
> > Could we go with some compromise where the results of configure are used
> > if they are available, but for people not wanting to run configure, if
> > they've got non-standard standard tools, they need to pass them to make
> > as well?  This is consistent with how cross compiling works.
> 
> That should be fairly easy.
> 
> Let Config.mk have:
> 
> -include config/basic_tools.mk
> 
> at the very beginning, with config/basic_tools.mk being created via
> configure and containing the basic tool variables:
> 
> CC := gcc
> AWK := awk
> PYTHON := python3
> ...
> 
> As Config.mk will set those variables with defualt values in case they
> are empty all is fine then.

Frankly I'm not a big fan of this approach -- you can potentially get
different toolchain depending on how you build stuff. I would rather
just document that for hypervisor build either python is available or
you should specify PYTHON= when invoking make.

Wei.

> 
> 
> Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-19  6:07                                       ` Kevin Buckley
  0 siblings, 0 replies; 52+ messages in thread
From: Kevin Buckley @ 2019-04-19  6:07 UTC (permalink / raw)
  To: Wei Liu
  Cc: Juergen Gross, Stefano Stabellini, Andrew Cooper, Julien Grall,
	Jan Beulich, xen-devel

On Wed, 17 Apr 2019 at 22:51, Wei Liu <wei.liu2@citrix.com> wrote:
>
>
> Frankly I'm not a big fan of this approach -- you can potentially get
> different toolchain depending on how you build stuff. I would rather
> just document that for hypervisor build either python is available or
> you should specify PYTHON= when invoking make.
>
> Wei.

As I started all this off, I thought I'd add in a little bit more, as I
think there may be more ot this than meets the eye, well, certainly
my eye anyway.

Clearly, many of the scripts in the tools part use python scripts that
have a /usr/bin/env python approach to finding a "python"

I therefore tried making a link from

/usr/bin/python3

to

/usr/bin/python

and then ran the configure, WITHOUT defining a PYTHON

./configure --prefix=/usr   \
   --disable-seabios   \
   --disable-qemu-traditional  \
   --disable-rombios     \
   --disable-stubdom 2>&1 | tee ../config.log


This failed whilst looking for Python.h

So, even though I have the link, I have still been running the
configure WITH a PYTHON being defined

PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
   --disable-seabios   \
   --disable-qemu-traditional  \
   --disable-rombios     \
   --disable-stubdom 2>&1 | tee ../config.log

and that does appear to configure things.

My "make world" is still failing

I am actually thinking of installing a Python 2 and making the link to
the bare /usr/bin/python point to that, just to see if I can get things
to build.

Hope that's useful,
Kevin

PS

I have another question about the /tools/Makefile but I'll ask that
in another thread.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-19  6:07                                       ` Kevin Buckley
  0 siblings, 0 replies; 52+ messages in thread
From: Kevin Buckley @ 2019-04-19  6:07 UTC (permalink / raw)
  To: Wei Liu
  Cc: Juergen Gross, Stefano Stabellini, Andrew Cooper, Julien Grall,
	Jan Beulich, xen-devel

On Wed, 17 Apr 2019 at 22:51, Wei Liu <wei.liu2@citrix.com> wrote:
>
>
> Frankly I'm not a big fan of this approach -- you can potentially get
> different toolchain depending on how you build stuff. I would rather
> just document that for hypervisor build either python is available or
> you should specify PYTHON= when invoking make.
>
> Wei.

As I started all this off, I thought I'd add in a little bit more, as I
think there may be more ot this than meets the eye, well, certainly
my eye anyway.

Clearly, many of the scripts in the tools part use python scripts that
have a /usr/bin/env python approach to finding a "python"

I therefore tried making a link from

/usr/bin/python3

to

/usr/bin/python

and then ran the configure, WITHOUT defining a PYTHON

./configure --prefix=/usr   \
   --disable-seabios   \
   --disable-qemu-traditional  \
   --disable-rombios     \
   --disable-stubdom 2>&1 | tee ../config.log


This failed whilst looking for Python.h

So, even though I have the link, I have still been running the
configure WITH a PYTHON being defined

PYTHON=/usr/bin/python3 ./configure --prefix=/usr   \
   --disable-seabios   \
   --disable-qemu-traditional  \
   --disable-rombios     \
   --disable-stubdom 2>&1 | tee ../config.log

and that does appear to configure things.

My "make world" is still failing

I am actually thinking of installing a Python 2 and making the link to
the bare /usr/bin/python point to that, just to see if I can get things
to build.

Hope that's useful,
Kevin

PS

I have another question about the /tools/Makefile but I'll ask that
in another thread.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-20  4:59                                         ` Kevin Buckley
  0 siblings, 0 replies; 52+ messages in thread
From: Kevin Buckley @ 2019-04-20  4:59 UTC (permalink / raw)
  To: Wei Liu, Juergen Gross, Andrew Cooper, xen-devel, Julien Grall,
	Stefano Stabellini, Jan Beulich

On Fri, 19 Apr 2019 at 14:07, Kevin Buckley
<kevin.buckley.ecs.vuw.ac.nz@gmail.com> wrote:
>
> I am actually thinking of installing a Python 2 and making the link to
> the bare /usr/bin/python point to that, just to see if I can get things
> to build.

So I did that and the hypervisor, tools and docs were all built
and installed as expected.

I have since gone back, removed all traces of Pythin 2 and
performed the same build but against Python 3, as follows
though recall that I am building this in a fairly basic LFS
system and so don't have Git, nor connectivty to the
QEMU Git repository.


Mimic the cloning of the QEMU Git repo external to the
LFS system and create a tar-ball for use inside LFS using
the script from the Xen tar-ball.


GIT=git scripts/git-checkout.sh git://xenbits.xen.org/qemu-xen.git
master qemu-xen-dir
cd qemu-xen-dir-remote/

git submodule init

git submodule update dtc
git submodule update capstone/
git submodule update ui/keycodemapdb

cd ..

tar cf qemu-xen-dir-de5b678ca-sub.tar qemu-xen-dir-remote
bzip2 -9 qemu-xen-dir-de5b678ca-sub.tar


Once inside the LFS system


tar xf $XTRASRC/xen-cb70a26.tar.bz2
tar xf $XTRASRC/qemu-xen-dir-de5b678ca-sub.tar.bz2
cd xen-master

As well as providing a bare "python" so that scripts within
the sources that have such a hash-bang, I found that I also
had to override things for the configure to complete:

ln -s python3 /usr/bin/python

PYTHON=/usr/bin/python3 \
  ./configure --prefix=/usr    \
  --disable-seabios          \
  --disable-qemu-traditional \
  --disable-rombios          \
  --disable-stubdom 2>&1 | tee ../config.log


Issuing a "make world" here clobbers four directories

 doc/man[1,5,7,8}

in the "make clean" that don't appear to be re-created
during the "make dist", so those two makes" were done
sperately so as to provide an opportunity to re-create
those directories

Note also that on an LFS system, which is 64-bit by default,
there is no /usr/lib64, a subdir of which would be the default
target for Xen's EFI_DIR variable.


make clean

mkdir docs/man1 docs/man5 docs/man7 docs/man8

make \
  PYTHON=/usr/bin/python3 \
  EFI_DIR=/usr/lib/efi \
  QEMU_UPSTREAM_LOC=/usr/src/xen/qemu-xen-dir-remote \
    dist    2>&1 | tee ../make-dist.log

make \
  PYTHON=/usr/bin/python3 \
  EFI_DIR=/usr/lib/efi \
  QEMU_UPSTREAM_LOC=/usr/src/xen/qemu-xen-dir-remote \
    install 2>&1 | tee ../make-install.log


This appears to build and install the Xen hypervisor and
the tools and docs as expected.

I have noticed that installed files such as pygrub do have
a hash-bang line that explcitly specifies /usr/bin/python3,
so it would appear to have done the right thing as regards
what it does with the user's overriding of "PYTHON".

Hope that's of some (more) use,
Kevin

PS

I'll flag up the internal doc directory clobbering in a seperate
thread.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-20  4:59                                         ` Kevin Buckley
  0 siblings, 0 replies; 52+ messages in thread
From: Kevin Buckley @ 2019-04-20  4:59 UTC (permalink / raw)
  To: Wei Liu, Juergen Gross, Andrew Cooper, xen-devel, Julien Grall,
	Stefano Stabellini, Jan Beulich

On Fri, 19 Apr 2019 at 14:07, Kevin Buckley
<kevin.buckley.ecs.vuw.ac.nz@gmail.com> wrote:
>
> I am actually thinking of installing a Python 2 and making the link to
> the bare /usr/bin/python point to that, just to see if I can get things
> to build.

So I did that and the hypervisor, tools and docs were all built
and installed as expected.

I have since gone back, removed all traces of Pythin 2 and
performed the same build but against Python 3, as follows
though recall that I am building this in a fairly basic LFS
system and so don't have Git, nor connectivty to the
QEMU Git repository.


Mimic the cloning of the QEMU Git repo external to the
LFS system and create a tar-ball for use inside LFS using
the script from the Xen tar-ball.


GIT=git scripts/git-checkout.sh git://xenbits.xen.org/qemu-xen.git
master qemu-xen-dir
cd qemu-xen-dir-remote/

git submodule init

git submodule update dtc
git submodule update capstone/
git submodule update ui/keycodemapdb

cd ..

tar cf qemu-xen-dir-de5b678ca-sub.tar qemu-xen-dir-remote
bzip2 -9 qemu-xen-dir-de5b678ca-sub.tar


Once inside the LFS system


tar xf $XTRASRC/xen-cb70a26.tar.bz2
tar xf $XTRASRC/qemu-xen-dir-de5b678ca-sub.tar.bz2
cd xen-master

As well as providing a bare "python" so that scripts within
the sources that have such a hash-bang, I found that I also
had to override things for the configure to complete:

ln -s python3 /usr/bin/python

PYTHON=/usr/bin/python3 \
  ./configure --prefix=/usr    \
  --disable-seabios          \
  --disable-qemu-traditional \
  --disable-rombios          \
  --disable-stubdom 2>&1 | tee ../config.log


Issuing a "make world" here clobbers four directories

 doc/man[1,5,7,8}

in the "make clean" that don't appear to be re-created
during the "make dist", so those two makes" were done
sperately so as to provide an opportunity to re-create
those directories

Note also that on an LFS system, which is 64-bit by default,
there is no /usr/lib64, a subdir of which would be the default
target for Xen's EFI_DIR variable.


make clean

mkdir docs/man1 docs/man5 docs/man7 docs/man8

make \
  PYTHON=/usr/bin/python3 \
  EFI_DIR=/usr/lib/efi \
  QEMU_UPSTREAM_LOC=/usr/src/xen/qemu-xen-dir-remote \
    dist    2>&1 | tee ../make-dist.log

make \
  PYTHON=/usr/bin/python3 \
  EFI_DIR=/usr/lib/efi \
  QEMU_UPSTREAM_LOC=/usr/src/xen/qemu-xen-dir-remote \
    install 2>&1 | tee ../make-install.log


This appears to build and install the Xen hypervisor and
the tools and docs as expected.

I have noticed that installed files such as pygrub do have
a hash-bang line that explcitly specifies /usr/bin/python3,
so it would appear to have done the right thing as regards
what it does with the user's overriding of "PYTHON".

Hope that's of some (more) use,
Kevin

PS

I'll flag up the internal doc directory clobbering in a seperate
thread.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-25 11:32                                                       ` Jan Beulich
  0 siblings, 0 replies; 52+ messages in thread
From: Jan Beulich @ 2019-04-25 11:32 UTC (permalink / raw)
  To: Wei Liu, xen-devel
  Cc: Juergen Gross, Andrew Cooper, Julien Grall, Kevin Buckley,
	Stefano Stabellini

>>> On 17.04.19 at 16:51, <wei.liu2@citrix.com> wrote:
> On Wed, Apr 17, 2019 at 02:44:21PM +0200, Juergen Gross wrote:
>> Let Config.mk have:
>> 
>> -include config/basic_tools.mk
>> 
>> at the very beginning, with config/basic_tools.mk being created via
>> configure and containing the basic tool variables:
>> 
>> CC := gcc
>> AWK := awk
>> PYTHON := python3
>> ...
>> 
>> As Config.mk will set those variables with defualt values in case they
>> are empty all is fine then.
> 
> Frankly I'm not a big fan of this approach -- you can potentially get
> different toolchain depending on how you build stuff. I would rather
> just document that for hypervisor build either python is available or
> you should specify PYTHON= when invoking make.

+1

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README)
@ 2019-04-25 11:32                                                       ` Jan Beulich
  0 siblings, 0 replies; 52+ messages in thread
From: Jan Beulich @ 2019-04-25 11:32 UTC (permalink / raw)
  To: Wei Liu, xen-devel
  Cc: Juergen Gross, Andrew Cooper, Julien Grall, Kevin Buckley,
	Stefano Stabellini

>>> On 17.04.19 at 16:51, <wei.liu2@citrix.com> wrote:
> On Wed, Apr 17, 2019 at 02:44:21PM +0200, Juergen Gross wrote:
>> Let Config.mk have:
>> 
>> -include config/basic_tools.mk
>> 
>> at the very beginning, with config/basic_tools.mk being created via
>> configure and containing the basic tool variables:
>> 
>> CC := gcc
>> AWK := awk
>> PYTHON := python3
>> ...
>> 
>> As Config.mk will set those variables with defualt values in case they
>> are empty all is fine then.
> 
> Frankly I'm not a big fan of this approach -- you can potentially get
> different toolchain depending on how you build stuff. I would rather
> just document that for hypervisor build either python is available or
> you should specify PYTHON= when invoking make.

+1

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: Xen commit 9b0bc91b3 possibly removed too much info from README
@ 2019-05-13 13:40             ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-05-13 13:40 UTC (permalink / raw)
  To: Kevin Buckley; +Cc: xen-devel, Wei Liu, Andrew Cooper

On Tue, Apr 16, 2019 at 09:31:41PM +0800, Kevin Buckley wrote:
> > Oh wait, I don't think there is anything to fix there. Those sentences
> > look repetitive but they do say different things: in tools case, it says
> > "repos will be cloned"; in stubdom case, it says "external packages
> > will be downloaded. So they do reflect correctly what will happen.
> >
> 
> Let me narrow things down a bit further to highlight the duplication
> 
> ----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
> During tools build external repos will be cloned into the source tree.    <=== 1
> This variable can be used to point to a different git binary to be used.
> GIT=
> 
> During tools build external repos will be cloned into the source tree.    <=== 2
> During stubdom build external packages will be downloaded into the
> source tree. These variables can be used to point to a different
> locations.
>  XEN_EXTFILES_URL=
> OVMF_UPSTREAM_URL=
> ----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
> 
> Hope that's clearer ?

Yes it is clearer. Thanks.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] Xen commit 9b0bc91b3 possibly removed too much info from README
@ 2019-05-13 13:40             ` Wei Liu
  0 siblings, 0 replies; 52+ messages in thread
From: Wei Liu @ 2019-05-13 13:40 UTC (permalink / raw)
  To: Kevin Buckley; +Cc: xen-devel, Wei Liu, Andrew Cooper

On Tue, Apr 16, 2019 at 09:31:41PM +0800, Kevin Buckley wrote:
> > Oh wait, I don't think there is anything to fix there. Those sentences
> > look repetitive but they do say different things: in tools case, it says
> > "repos will be cloned"; in stubdom case, it says "external packages
> > will be downloaded. So they do reflect correctly what will happen.
> >
> 
> Let me narrow things down a bit further to highlight the duplication
> 
> ----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
> During tools build external repos will be cloned into the source tree.    <=== 1
> This variable can be used to point to a different git binary to be used.
> GIT=
> 
> During tools build external repos will be cloned into the source tree.    <=== 2
> During stubdom build external packages will be downloaded into the
> source tree. These variables can be used to point to a different
> locations.
>  XEN_EXTFILES_URL=
> OVMF_UPSTREAM_URL=
> ----8<--------8<--------8<--------8<--------8<--------8<--------8<--------8<----
> 
> Hope that's clearer ?

Yes it is clearer. Thanks.

Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2019-05-13 13:40 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-11  8:09 Xen commit 9b0bc91b3 possibly removed too much info from README Kevin Buckley
2019-04-11  8:09 ` [Xen-devel] " Kevin Buckley
2019-04-11 10:28 ` Wei Liu
2019-04-11 10:28   ` [Xen-devel] " Wei Liu
2019-04-13  3:17   ` Kevin Buckley
2019-04-13  3:17     ` [Xen-devel] " Kevin Buckley
2019-04-15  9:23     ` Wei Liu
2019-04-15  9:23       ` [Xen-devel] " Wei Liu
2019-04-15  9:36       ` Wei Liu
2019-04-15  9:36         ` [Xen-devel] " Wei Liu
2019-04-16 13:31         ` Kevin Buckley
2019-04-16 13:31           ` [Xen-devel] " Kevin Buckley
2019-05-13 13:40           ` Wei Liu
2019-05-13 13:40             ` [Xen-devel] " Wei Liu
2019-04-16 13:28       ` Kevin Buckley
2019-04-16 13:28         ` [Xen-devel] " Kevin Buckley
2019-04-17  9:56         ` Wei Liu
2019-04-17  9:56           ` [Xen-devel] " Wei Liu
2019-04-17 10:41           ` Hypervisor build can't work without `python` (Was: Re: Xen commit 9b0bc91b3 possibly removed too much info from README) Wei Liu
2019-04-17 10:41             ` [Xen-devel] " Wei Liu
2019-04-17 10:44             ` Andrew Cooper
2019-04-17 10:44               ` [Xen-devel] " Andrew Cooper
2019-04-17 10:57               ` Wei Liu
2019-04-17 10:57                 ` [Xen-devel] " Wei Liu
2019-04-17 10:58                 ` Andrew Cooper
2019-04-17 10:58                   ` [Xen-devel] " Andrew Cooper
2019-04-17 11:01                   ` Juergen Gross
2019-04-17 11:01                     ` [Xen-devel] " Juergen Gross
2019-04-17 11:03                   ` Wei Liu
2019-04-17 11:03                     ` [Xen-devel] " Wei Liu
2019-04-17 11:15                     ` Andrew Cooper
2019-04-17 11:15                       ` [Xen-devel] " Andrew Cooper
2019-04-17 11:16                       ` Wei Liu
2019-04-17 11:16                         ` [Xen-devel] " Wei Liu
2019-04-17 11:23                         ` Andrew Cooper
2019-04-17 11:23                           ` [Xen-devel] " Andrew Cooper
2019-04-17 11:26                           ` Wei Liu
2019-04-17 11:26                             ` [Xen-devel] " Wei Liu
2019-04-17 11:43                             ` Juergen Gross
2019-04-17 11:43                               ` [Xen-devel] " Juergen Gross
2019-04-17 11:53                               ` Andrew Cooper
2019-04-17 11:53                                 ` [Xen-devel] " Andrew Cooper
2019-04-17 12:44                                 ` Juergen Gross
2019-04-17 12:44                                   ` [Xen-devel] " Juergen Gross
2019-04-17 14:51                                   ` Wei Liu
2019-04-17 14:51                                     ` [Xen-devel] " Wei Liu
2019-04-19  6:07                                     ` Kevin Buckley
2019-04-19  6:07                                       ` [Xen-devel] " Kevin Buckley
2019-04-20  4:59                                       ` Kevin Buckley
2019-04-20  4:59                                         ` [Xen-devel] " Kevin Buckley
     [not found]                                     ` <584ACCED020000078E2C01CD@prv1-mh.provo.novell.com>
     [not found]                                       ` <D1DA3F7202000045A293CED3@prv1-mh.provo.novell.com>
     [not found]                                         ` <960CB533020000B48E2C01CD@prv1-mh.provo.novell.com>
     [not found]                                           ` <D1E23F7802000079A293CED3@prv1-mh.provo.novell.com>
     [not found]                                             ` <48D5F043020000E137554D14@prv1-mh.provo.novell.com>
     [not found]                                               ` <14AB34BE020000728E2C01CD@prv1-mh.provo.novell.com>
     [not found]                                                 ` <9A8B94880200008537554D14@prv1-mh.provo.novell.com>
     [not found]                                                   ` <A9FA5B7C02000009A293CED3@prv1-mh.provo.novell.com>
2019-04-25 11:32                                                     ` Jan Beulich
2019-04-25 11:32                                                       ` [Xen-devel] " Jan Beulich

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.