From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: "./configure: line 7058: python-config: command not found" after commit 0013245 Date: Wed, 04 Mar 2015 12:47:56 +0000 Message-ID: <54F6FEFC.9060806@linaro.org> References: <54F5EDDF.3050600@linaro.org> <20150303173607.GI11855@zion.uk.xensource.com> <54F5F360.4040801@linaro.org> <20150303184843.GA24803@zion.uk.xensource.com> <54F60E86.2040702@linaro.org> <1425460038.12103.60.camel@citrix.com> <54F6FA40.3060101@linaro.org> <1425472533.25940.149.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YT8iy-0005aY-SO for xen-devel@lists.xenproject.org; Wed, 04 Mar 2015 12:48:29 +0000 Received: by wiwl15 with SMTP id l15so30294231wiw.3 for ; Wed, 04 Mar 2015 04:48:24 -0800 (PST) In-Reply-To: <1425472533.25940.149.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Ian Jackson , Wei Liu , xen-devel List-Id: xen-devel@lists.xenproject.org On 04/03/15 12:35, Ian Campbell wrote: > On Wed, 2015-03-04 at 12:27 +0000, Julien Grall wrote: >> Hi Ian, >> >> On 04/03/15 09:07, Ian Campbell wrote: >>> On Tue, 2015-03-03 at 19:41 +0000, Julien Grall wrote: >>>> python-dev is not installed. Although I have libpython-dev installed. >>> >>> And this used to work I suppose? >>> >>> As I said in <1425404173.25940.82.camel@citrix.com>: >>> >>> m4/python_devel.m4 seems to suggest it was made optional on >>> purpose, I don't know why or which versions of Python were the >>> first to include the tool though. >>> >>> So it appears to be deliberate that the Python checks do not require >>> python-config. But the new Python vs. Fortify checks _do_ require it. >>> >>> So the question is: why was it optional in the first place? Then we >>> should know if we can make it a requirement or if we need to fix the >>> Fortify check. >>> >>> Aha, adding --follow to my earlier git log m4/python_devel.m4 leads me >>> to: >>> >>> commit 474a0e59d821bfb49b64c3d722a000bd9b5b7599 >>> Author: Roger Pau Monne >>> Date: Tue Apr 3 14:28:45 2012 +0100 >>> >>> autoconf: fix python-dev detection on old python versions >>> >>> Replaced the use of python-config (that is only present in Python >= 2.5.x) >>> with the distutils python module. >>> >>> Signed-off-by: Roger Pau Monne >>> Cc: Zhang, Yang Z >>> Tested-by: KUWAMURA Shin'ya >>> Cc: Ian Campbell >>> Committed-by: Ian Jackson >>> >>> So it seems like it is necessary to continue to work without >>> python-config present. >>> >>> In my same earlier mail I said: >>>> Perhaps AX_CHECK_PYTHON_FORTIFY_NOOPT should be a nop unless >>>> python-config is available? >>>> >>>> Or perhaps AX_CHECK_PYTHON_DEVEL should export PYTHON_CFLAGS etc which >>>> the fortify test should look at instead of invoking python-cofnig? >>> >>> I think it would be acceptable in the first instance to simply only run >>> the Fortify check if python-config is present and hope that older >>> distros didn't have the incompatibility. If we then find such an older >>> distro then we can look at switching to something more complex. >> >> On some distributions we may have the headers installed but not >> python-config (It's the case on my debian Jessie). > > If python-config is available on that distro then this IMHO is a build > environment bug, i.e. if python-config is part of the Python version you > are using then you should make it available. python-config is part of python-dev package. Although I have only install libpython-dev (which contains the headers). > python-config is (according to the commit log above) optional so that > people using Python <= 2.4 can still build Xen. Would it make sense to require python-config for (python >= 2.4)? Regards, -- Julien Grall