Re: [edk2] Issues building OVMF from Xen with Arch Linux

Subject: Re: [edk2] Issues building OVMF from Xen with Arch Linux

From: Laszlo Ersek <lersek@redhat.com>

To: edk2-devel@lists.sourceforge.net

Date: 2014-09-02 20:58:10

On 08/30/14 02:34, Zir Blazer wrote:
> First of all, I want to say that I'm not developer and know very little
> about programming, so if you need more info that what I'm currently
> providing, please be as detailed as possible to tell me how to get you
> it. I usually achieve some success when I follow guides, check wikis and
> the like, when I have to go more far than that its a break point for me.
> 
> 
> I'm trying to install Xen with Arch Linux as Dom0, using Nested
> Virtualization for testing before moving to native. Xen supports UEFI
> DomUs (VMs) if I use OVMF, which should be enabled when compiling, and I
> decided to give that a try so I can have a cutting edge and full
> featured system. As far that I know, this is done by using --enable-ovmf
> option, which on Arch Linux xen package, I can include in the
> ./configure line in PKGBUILD. So in this file:
> https://aur.archlinux.org/packages/xe/xen/PKGBUILD
> 
> I change this...
> 
> build() {
>     export CFLAGS+='-Wall -Wstrict-prototypes -Wno-unused-local-typedefs -Wno-sizeof-pointer-memaccess'
>     cd $pkgname-$pkgver/
>     ./autogen.sh
>     *./configure PYTHON=/usr/bin/python2 --prefix=/usr --localstatedir=/run*
>     make LANG=C PYTHON=python2 dist-{xen,tools,kernels}
>     unset CFLAGS
>     make LANG=C PYTHON=python2 dist-stubdom
> }
> 
> to this...
> 
>     *./configure PYTHON=/usr/bin/python2 --prefix=/usr --localstatedir=/run --enable-ovmf*
> 
> 
> 
> So far, using makepkg without adding OVMF builds with no issues. When I
> use OVMF, it downloads some 150 MiB or so worth of data (A clone of your
> Source Repository I suppose), and starts to build but fails. The point
> where it fails and error message is IDENTICAL to this guy who posted in
> xen-devel Mailing List:
> http://lists.xen.org/archives/html/xen-devel/2014-07/msg02855.html
> 
> What refuses to build is in this file:
> https://github.com/tianocore/edk2/blob/master/BaseTools/Tests/TestTools.py
> 
> Line 87   print description, '(base64 encoded):'
> 
> It was suggested to him to try building with Python 2 instead of 3, or
> to contact OVMF Mailing List. According to what I researched about Arch
> Linux package management, python2 package is the older version which
> should be compatible, and on the ./configure line it is specifically
> stated to use it (It is also installed as prerequisite for Xen), so it
> is using the correct Python version.
> 
> After googling around for Python print syntaxis, I decided to remove the
> double dot before the '. so now the line reads:
> print description, '(base64 encoded)'
> I tried building Xen again, it seemed to have more progress but also
> failed, this time on this file:
> 
> https://github.com/tianocore/edk2/blob/master/BaseTools/Source/Python/build/build.py
> 
> Line 519   except BaseException, X:
> 
> ...arguing invalid syntaxis if I recall correctly. After googling a bit
> more, I decided to remove the comma and X and leave it just as except
> BaseException: and instead, it failed to compile on...
> 
> Line 1005   except WindowsError, X:
> 
> I repeated the procedure of removing the comma and X in that line, 1099,
> 2048 and 2055, which also had excepts with similar syntaxis. After doing
> all that, now instead it errors out in...
> 
> Line 20   import StringIO
> 
> ...arguing that it can't be found, or something like that. At this point
> I'm totally out of ideas because I don't have the knowledge to debug
> this myself, so I request that someone can check if I'm doing something
> wrong or there is an actual issue there (Which could be, considering
> that the guy from the xen-devel Mailing List also had issues building).
> 
> Also, I'm aware than there are binaries for QEMU, but I don't know if
> they work out of the box or I actually need to compile Xen including
> OVMF to support it. The people I saw asking for using UEFI on VMs with
> Xen, were told to build as I did. Seems that some months ago it was
> possible.

I can "contribute" the following ideas:
- You need to build with python2.
- The steps you've already taken to use python2 instead of python3 are
  insufficient, apparently. You probably need to massage your ArchLinux
  environment so that python2 becomes the default.

You'll have to dig in and see what exactly breaks. I don't use Xen nor
ArchLinux.

Thanks,
Laszlo

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel