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

Re: [Xen-users] Failed to build xen-unstable with --disable-pythontools



Adding xen-devel.

On Fri, 2012-08-31 at 09:37 +0100, Dmitry Ivanov wrote:
> Hello,
> 
> After configuring xen-unstable with ./configure --disable-ocamltools
> --disable-pythontools it fails to build:
> 
> make[4]: Entering directory
> `/home/vonami/sources/xen-unstable.hg/tools/include/xen-foreign'
> mkheader.py x86_32 x86_32.h
> /home/vonami/sources/xen-unstable.hg/tools/include/xen-foreign/../../../xen/include/public/arch-x86/xen-x86_32.h
> /home/vonami/sources/xen-unstable.hg/tools/include/xen-foreign/../../../xen/include/public/arch-x86/xen.h
> /home/vonami/sources/xen-unstable.hg/tools/include/xen-foreign/../../../xen/include/public/xen.h
> make[4]: mkheader.py: Command not found
> make[4]: *** [x86_32.h] Error 127
> 
> Turns out PYTHON is empty in the tools/include/xen-foreign/Makefile.
> Looks like PYTHON and PYTHONPATH are not set by tools/configure script
> when --disable-pythontools is on.

So long as Xen uses python as part of the build system (which I think it
will do for the foreseeable future) I don't think it is optional and
therefore the --disable-pythontools is broken as currently implemented.

I think we should just remove this option for 4.2 and revisit being able
to disable the runtime components which use python, but not the build
time usage.

--disable-pythontools is a bit of a big hammer since as well as
disabling xend (which seems reasonable) it also throws out pygrub which
people are more likely to want. In 4.3 we should aim for more fine
grained control of those two options.

In the meantime I think the answer is "don't do that then". That may
well also turn out to be the answer for the 4.2.0 release at this point.

A patch to remove this option follows.

Ian.

8<--------------------------------------------------

# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1346403269 -3600
# Node ID e334eebb59c5b02edeab5dc3ed0174053676b5c6
# Parent  451724678dd474025bd3472ed802d9d01a4fa3d8
tools: remove --disable-pythontools option

This incorrectly removes the $(PYTHON) variable which is used at build
time as well as by the tools.

Remove and revisit for 4.3.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 451724678dd4 -r e334eebb59c5 config/Tools.mk.in
--- a/config/Tools.mk.in        Fri Aug 31 09:32:37 2012 +0100
+++ b/config/Tools.mk.in        Fri Aug 31 09:54:29 2012 +0100
@@ -43,7 +43,6 @@ GIT_HTTP            := @githttp@
 XENSTAT_XENTOP      := @monitors@
 VTPM_TOOLS          := @vtpm@
 LIBXENAPI_BINDINGS  := @xenapi@
-PYTHON_TOOLS        := @pythontools@
 OCAML_TOOLS         := @ocamltools@
 CONFIG_MINITERM     := @miniterm@
 CONFIG_LOMOUNT      := @lomount@
diff -r 451724678dd4 -r e334eebb59c5 tools/Makefile
--- a/tools/Makefile    Fri Aug 31 09:32:37 2012 +0100
+++ b/tools/Makefile    Fri Aug 31 09:54:29 2012 +0100
@@ -48,8 +48,8 @@ SUBDIRS-$(CONFIG_TESTS) += tests
 
 # These don't cross-compile
 ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
-SUBDIRS-$(PYTHON_TOOLS) += python
-SUBDIRS-$(PYTHON_TOOLS) += pygrub
+SUBDIRS-y += python
+SUBDIRS-y += pygrub
 SUBDIRS-$(OCAML_TOOLS) += ocaml
 endif
 
diff -r 451724678dd4 -r e334eebb59c5 tools/configure
--- a/tools/configure   Fri Aug 31 09:32:37 2012 +0100
+++ b/tools/configure   Fri Aug 31 09:54:29 2012 +0100
@@ -665,7 +665,6 @@ ovmf
 lomount
 miniterm
 ocamltools
-pythontools
 xenapi
 vtpm
 monitors
@@ -723,7 +722,6 @@ enable_githttp
 enable_monitors
 enable_vtpm
 enable_xenapi
-enable_pythontools
 enable_ocamltools
 enable_miniterm
 enable_lomount
@@ -1384,7 +1382,6 @@ Optional Features:
   --enable-vtpm           Enable Virtual Trusted Platform Module (default is
                           DISABLED)
   --enable-xenapi         Enable Xen API Bindings (default is DISABLED)
-  --disable-pythontools   Disable Python tools (default is ENABLED)
   --disable-ocamltools    Disable Ocaml tools (default is ENABLED)
   --enable-miniterm       Enable miniterm (default is DISABLED)
   --enable-lomount        Enable lomount (default is DISABLED)
@@ -2489,29 +2486,6 @@ xenapi=$ax_cv_xenapi
 
 
 
-# Check whether --enable-pythontools was given.
-if test "${enable_pythontools+set}" = set; then :
-  enableval=$enable_pythontools;
-fi
-
-
-if test "x$enable_pythontools" = "xno"; then :
-
-    ax_cv_pythontools="n"
-
-elif test "x$enable_pythontools" = "xyes"; then :
-
-    ax_cv_pythontools="y"
-
-elif test -z $ax_cv_pythontools; then :
-
-    ax_cv_pythontools="y"
-
-fi
-pythontools=$ax_cv_pythontools
-
-
-
 # Check whether --enable-ocamltools was given.
 if test "${enable_ocamltools+set}" = set; then :
   enableval=$enable_ocamltools;
@@ -4900,6 +4874,74 @@ if test x"${BASH}" == x"no"
 then
     as_fn_error $? "Unable to find bash, please install bash" "$LINENO" 5
 fi
+if echo "$PYTHON" | grep -q "^/"; then :
+
+    PYTHONPATH=$PYTHON
+    PYTHON=`basename $PYTHONPATH`
+
+elif test -z "$PYTHON"; then :
+  PYTHON="python"
+else
+  as_fn_error $? "PYTHON specified, but is not an absolute path" "$LINENO" 5
+fi
+# Extract the first word of "$PYTHON", so it can be a program name with args.
+set dummy $PYTHON; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PYTHONPATH+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PYTHONPATH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PYTHONPATH="$PYTHONPATH" # Let the user override the test with a 
path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PYTHONPATH="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_PYTHONPATH" && ac_cv_path_PYTHONPATH="no"
+  ;;
+esac
+fi
+PYTHONPATH=$ac_cv_path_PYTHONPATH
+if test -n "$PYTHONPATH"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHONPATH" >&5
+$as_echo "$PYTHONPATH" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test x"${PYTHONPATH}" == x"no"
+then
+    as_fn_error $? "Unable to find $PYTHON, please install $PYTHON" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python version >= 2.3 " 
>&5
+$as_echo_n "checking for python version >= 2.3 ... " >&6; }
+`$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < (2, 3)"))'`
+if test "$?" != "0"
+then
+    python_version=`$PYTHON -V 2>&1`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    as_fn_error $? "$python_version is too old, minimum required version is 
2.3" "$LINENO" 5
+else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -5298,76 +5340,6 @@ fi
 done
 
 
-if test "x$pythontools" = "xy"; then :
-
-    if echo "$PYTHON" | grep -q "^/"; then :
-
-        PYTHONPATH=$PYTHON
-        PYTHON=`basename $PYTHONPATH`
-
-elif test -z "$PYTHON"; then :
-  PYTHON="python"
-else
-  as_fn_error $? "PYTHON specified, but is not an absolute path" "$LINENO" 5
-fi
-    # Extract the first word of "$PYTHON", so it can be a program name with 
args.
-set dummy $PYTHON; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PYTHONPATH+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $PYTHONPATH in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PYTHONPATH="$PYTHONPATH" # Let the user override the test with a 
path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_path_PYTHONPATH="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_path_PYTHONPATH" && ac_cv_path_PYTHONPATH="no"
-  ;;
-esac
-fi
-PYTHONPATH=$ac_cv_path_PYTHONPATH
-if test -n "$PYTHONPATH"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHONPATH" >&5
-$as_echo "$PYTHONPATH" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-if test x"${PYTHONPATH}" == x"no"
-then
-    as_fn_error $? "Unable to find $PYTHON, please install $PYTHON" "$LINENO" 5
-fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python version >= 
2.3 " >&5
-$as_echo_n "checking for python version >= 2.3 ... " >&6; }
-`$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < (2, 3)"))'`
-if test "$?" != "0"
-then
-    python_version=`$PYTHON -V 2>&1`
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-    as_fn_error $? "$python_version is too old, minimum required version is 
2.3" "$LINENO" 5
-else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
 
 ac_previous_cppflags=$CPPFLAGS
 ac_previous_ldflags=$LDFLAGS
@@ -5499,9 +5471,7 @@ fi
 CPPFLAGS=$ac_previous_cppflags
 LDLFAGS=$ac_previous_ldflags
 
-
-fi
- # Extract the first word of "xgettext", so it can be a program name with args.
+# Extract the first word of "xgettext", so it can be a program name with args.
 set dummy xgettext; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
diff -r 451724678dd4 -r e334eebb59c5 tools/configure.ac
--- a/tools/configure.ac        Fri Aug 31 09:32:37 2012 +0100
+++ b/tools/configure.ac        Fri Aug 31 09:54:29 2012 +0100
@@ -41,7 +41,6 @@ AX_ARG_DEFAULT_DISABLE([githttp], [Downl
 AX_ARG_DEFAULT_ENABLE([monitors], [Disable xenstat and xentop monitoring 
tools])
 AX_ARG_DEFAULT_DISABLE([vtpm], [Enable Virtual Trusted Platform Module])
 AX_ARG_DEFAULT_DISABLE([xenapi], [Enable Xen API Bindings])
-AX_ARG_DEFAULT_ENABLE([pythontools], [Disable Python tools])
 AX_ARG_DEFAULT_ENABLE([ocamltools], [Disable Ocaml tools])
 AX_ARG_DEFAULT_DISABLE([miniterm], [Enable miniterm])
 AX_ARG_DEFAULT_DISABLE([lomount], [Enable lomount])
@@ -94,17 +93,15 @@ AS_IF([test "x$ocamltools" = "xy"], [
     ])
 ])
 AX_PATH_PROG_OR_FAIL([BASH], [bash])
-AS_IF([test "x$pythontools" = "xy"], [
-    AS_IF([echo "$PYTHON" | grep -q "^/"], [
-        PYTHONPATH=$PYTHON
-        PYTHON=`basename $PYTHONPATH`
-    ],[test -z "$PYTHON"], [PYTHON="python"],
-    [AC_MSG_ERROR([PYTHON specified, but is not an absolute path])])
-    AX_PATH_PROG_OR_FAIL([PYTHONPATH], [$PYTHON])
-    AX_CHECK_PYTHON_VERSION([2], [3])
-     AX_CHECK_PYTHON_DEVEL()
- ])
- AX_PATH_PROG_OR_FAIL([XGETTEXT], [xgettext])
+AS_IF([echo "$PYTHON" | grep -q "^/"], [
+    PYTHONPATH=$PYTHON
+    PYTHON=`basename $PYTHONPATH`
+],[test -z "$PYTHON"], [PYTHON="python"],
+[AC_MSG_ERROR([PYTHON specified, but is not an absolute path])])
+AX_PATH_PROG_OR_FAIL([PYTHONPATH], [$PYTHON])
+AX_CHECK_PYTHON_VERSION([2], [3])
+ AX_CHECK_PYTHON_DEVEL()
+AX_PATH_PROG_OR_FAIL([XGETTEXT], [xgettext])
 dnl as86, ld86, bcc and iasl are only required when the host system is x86*.
 dnl "host" here means the platform on which the hypervisor and tools is
 dnl going to run, not the platform on which we are building (known as



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

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