This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] Temporary fix for xen-tools build problem with python 2.4

To: xen-devel@xxxxxxxxxxxxxxxxxxx, aosthof@xxxxxxx
Subject: [Xen-devel] Temporary fix for xen-tools build problem with python 2.4
From: John L Griffin <jlg@xxxxxxxxxx>
Date: Sun, 16 Apr 2006 15:09:35 -0400
Delivery-date: Sun, 16 Apr 2006 12:09:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
(Short version:)

Here is a temporary fix for a Xen build problem when using Python 2.4:

  cd xen-unstable/
  sed -i 's/--home/--prefix="" --home/' tools/python/Makefile
  sed -i 's/--home/--prefix="" --home/' tools/pygrub/Makefile
  sed -i 's/--home/--prefix="" --home/' tools/security/Makefile

(Long version:)

While attempting to build Xen (-3.0.2 or -unstable) on a system with GCC 
4.1 and Python 2.4.2, an error occurs while building the tools:

  make[2]: Entering directory `/home/jlg/xen-3.0.2/tools/python'
  CFLAGS="-O2 -fomit-frame-pointer -DNDEBUG -m32 -march=i686 -Wall 
-Wstrict-prototypes -Wdeclaration-after-statement 
-D__XEN_INTERFACE_VERSION__=0x00030101" python setup.py build
  running build
  running build_py
  running build_ext
  CFLAGS="-O2 -fomit-frame-pointer -DNDEBUG -m32 -march=i686 -Wall 
-Wstrict-prototypes -Wdeclaration-after-statement 
-D__XEN_INTERFACE_VERSION__=0x00030101" python setup.py install 
--home="/home/jlg/xen-3.0.2/dist/install/usr" --force
  running install
  error: must supply either home or prefix/exec-prefix -- not both
  make[2]: *** [install] Error 1
  make[2]: Leaving directory `/home/jlg/xen-3.0.2/tools/python'

This error happens in the directories tools/python, tools/pygrub.  (It 
might also affect tools/security, so I include that directory in my fix.)

This problem was also reported a week ago on xen-devel:

A python web page explains the difference between --prefix and --user:

So I can understand why --prefix and --home are mutually exclusive, but I 
can't figure out what step in the Xen build process is causing --prefix to 
be set.  (Is it something changed in the Python 2.4 release?  Is there an 
errant environment variable being set by the Xen makefiles?)

Anyway, my "temporary fix" above circumvents the problem.  If we can't 
figure out the root problem (i.e., what's causing --prefix to be set), we 
may consider making this a permanent fix?

(Extra note: After reboot, I now get this warning when I run "xm list":

  [3:06pm] root@localhost{~}% xm list
  /usr/lib/python2.4/xmllib.py:9: DeprecationWarning: The xmllib module is 
obsolete.  Use xml.sax instead.
    warnings.warn("The xmllib module is obsolete.  Use xml.sax instead.", 
  Name                              ID Mem(MiB) VCPUs State  Time(s)
  Domain-0                           0     3801     4 r-----    32.3

That'll need to be fixed too, but that's for another time.)


Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>