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:27:44 +0000 Message-ID: <54F6FA40.3060101@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> 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 1YT8PO-0002EP-3N for xen-devel@lists.xenproject.org; Wed, 04 Mar 2015 12:28:14 +0000 Received: by wiwl15 with SMTP id l15so30374779wiw.5 for ; Wed, 04 Mar 2015 04:28:12 -0800 (PST) In-Reply-To: <1425460038.12103.60.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 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 we have a such distribution with the "Fortify bug" the user will get a compilation error while building python source code. A such error would not be obvious. So I think the best solution would be to parse the PYTHON_CFLAGS. Regards, -- Julien Grall