[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



(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:
http://lists.xensource.com/archives/html/xen-devel/2006-04/msg00090.html

A python web page explains the difference between --prefix and --user:
http://docs.python.org/inst/alt-install-windows.html

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.", 
DeprecationWarning)
  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.)

JLG


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.