All of lore.kernel.org
 help / color / mirror / Atom feed
* "./configure: line 7058: python-config: command not found" after commit 0013245
@ 2015-03-03 17:22 Julien Grall
  2015-03-03 17:36 ` Wei Liu
  2015-03-03 17:36 ` Ian Campbell
  0 siblings, 2 replies; 17+ messages in thread
From: Julien Grall @ 2015-03-03 17:22 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel, Wei Liu, Ian Campbell

Hi,

I've tried to use ./configure on the latest master and got the below error:

checking for python-config... no
checking Python.h usability... yes
checking Python.h presence... yes
checking for Python.h... yes
checking for PyArg_ParseTuple in -lpython2.7... yes
checking whether Python setup.py brokenly enables -D_FORTIFY_SOURCE...
./configure: line 7058: python-config: command not found
no
checking for xgettext... /usr/bin/xgettext

Shall we require python-config installed on the build-platform?

Regards,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: "./configure: line 7058: python-config: command not found" after commit 0013245
  2015-03-03 17:22 "./configure: line 7058: python-config: command not found" after commit 0013245 Julien Grall
@ 2015-03-03 17:36 ` Wei Liu
  2015-03-03 17:46   ` Julien Grall
  2015-03-03 17:36 ` Ian Campbell
  1 sibling, 1 reply; 17+ messages in thread
From: Wei Liu @ 2015-03-03 17:36 UTC (permalink / raw)
  To: Julien Grall; +Cc: Wei Liu, Ian Jackson, Ian Campbell, xen-devel

On Tue, Mar 03, 2015 at 05:22:39PM +0000, Julien Grall wrote:
> Hi,
> 
> I've tried to use ./configure on the latest master and got the below error:
> 
> checking for python-config... no
> checking Python.h usability... yes
> checking Python.h presence... yes
> checking for Python.h... yes
> checking for PyArg_ParseTuple in -lpython2.7... yes
> checking whether Python setup.py brokenly enables -D_FORTIFY_SOURCE...
> ./configure: line 7058: python-config: command not found
> no
> checking for xgettext... /usr/bin/xgettext
> 
> Shall we require python-config installed on the build-platform?
> 

Isn't it part of the python-dev package? I'm using Debian, but I would
expect it should come with whatever python development package you
distro has?

Wei.

> Regards,
> 
> -- 
> Julien Grall

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: "./configure: line 7058: python-config: command not found" after commit 0013245
  2015-03-03 17:22 "./configure: line 7058: python-config: command not found" after commit 0013245 Julien Grall
  2015-03-03 17:36 ` Wei Liu
@ 2015-03-03 17:36 ` Ian Campbell
  1 sibling, 0 replies; 17+ messages in thread
From: Ian Campbell @ 2015-03-03 17:36 UTC (permalink / raw)
  To: Julien Grall; +Cc: xen-devel, Ian Jackson, Wei Liu

On Tue, 2015-03-03 at 17:22 +0000, Julien Grall wrote:
> Hi,
> 
> I've tried to use ./configure on the latest master and got the below error:
> 
> checking for python-config... no
> checking Python.h usability... yes
> checking Python.h presence... yes
> checking for Python.h... yes
> checking for PyArg_ParseTuple in -lpython2.7... yes
> checking whether Python setup.py brokenly enables -D_FORTIFY_SOURCE...
> ./configure: line 7058: python-config: command not found
> no
> checking for xgettext... /usr/bin/xgettext
> 
> Shall we require python-config installed on the build-platform?

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.

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?

Ian.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: "./configure: line 7058: python-config: command not found" after commit 0013245
  2015-03-03 17:36 ` Wei Liu
@ 2015-03-03 17:46   ` Julien Grall
  2015-03-03 18:48     ` Wei Liu
  0 siblings, 1 reply; 17+ messages in thread
From: Julien Grall @ 2015-03-03 17:46 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, Ian Jackson, Ian Campbell

On 03/03/15 17:36, Wei Liu wrote:
> On Tue, Mar 03, 2015 at 05:22:39PM +0000, Julien Grall wrote:
>> Hi,
>>
>> I've tried to use ./configure on the latest master and got the below error:
>>
>> checking for python-config... no
>> checking Python.h usability... yes
>> checking Python.h presence... yes
>> checking for Python.h... yes
>> checking for PyArg_ParseTuple in -lpython2.7... yes
>> checking whether Python setup.py brokenly enables -D_FORTIFY_SOURCE...
>> ./configure: line 7058: python-config: command not found
>> no
>> checking for xgettext... /usr/bin/xgettext
>>
>> Shall we require python-config installed on the build-platform?
>>
> 
> Isn't it part of the python-dev package? I'm using Debian, but I would
> expect it should come with whatever python development package you
> distro has?

My point wasn't about the missing package but the odd error of the
configure when python-config doesn't exist.

Regards,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: "./configure: line 7058: python-config: command not found" after commit 0013245
  2015-03-03 17:46   ` Julien Grall
@ 2015-03-03 18:48     ` Wei Liu
  2015-03-03 19:41       ` Julien Grall
  0 siblings, 1 reply; 17+ messages in thread
From: Wei Liu @ 2015-03-03 18:48 UTC (permalink / raw)
  To: Julien Grall; +Cc: Ian Jackson, Wei Liu, Ian Campbell, xen-devel

On Tue, Mar 03, 2015 at 05:46:08PM +0000, Julien Grall wrote:
> On 03/03/15 17:36, Wei Liu wrote:
> > On Tue, Mar 03, 2015 at 05:22:39PM +0000, Julien Grall wrote:
> >> Hi,
> >>
> >> I've tried to use ./configure on the latest master and got the below error:
> >>
> >> checking for python-config... no
> >> checking Python.h usability... yes
> >> checking Python.h presence... yes
> >> checking for Python.h... yes
> >> checking for PyArg_ParseTuple in -lpython2.7... yes
> >> checking whether Python setup.py brokenly enables -D_FORTIFY_SOURCE...
> >> ./configure: line 7058: python-config: command not found
> >> no
> >> checking for xgettext... /usr/bin/xgettext
> >>
> >> Shall we require python-config installed on the build-platform?
> >>
> > 
> > Isn't it part of the python-dev package? I'm using Debian, but I would
> > expect it should come with whatever python development package you
> > distro has?
> 
> My point wasn't about the missing package but the odd error of the
> configure when python-config doesn't exist.
> 

My point being that you've clearly installed python development package
(and we check that in configure) but you don't have python-config. It
looks a bit weird. But if this is how some distro packages python then
we should deal with this.

Wei.

> Regards,
> 
> -- 
> Julien Grall

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: "./configure: line 7058: python-config: command not found" after commit 0013245
  2015-03-03 18:48     ` Wei Liu
@ 2015-03-03 19:41       ` Julien Grall
  2015-03-04  9:07         ` Ian Campbell
  0 siblings, 1 reply; 17+ messages in thread
From: Julien Grall @ 2015-03-03 19:41 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, Ian Jackson, Ian Campbell



On 03/03/2015 18:48, Wei Liu wrote:
> On Tue, Mar 03, 2015 at 05:46:08PM +0000, Julien Grall wrote:
>> On 03/03/15 17:36, Wei Liu wrote:
>>> On Tue, Mar 03, 2015 at 05:22:39PM +0000, Julien Grall wrote:
>>>> Hi,
>>>>
>>>> I've tried to use ./configure on the latest master and got the below error:
>>>>
>>>> checking for python-config... no
>>>> checking Python.h usability... yes
>>>> checking Python.h presence... yes
>>>> checking for Python.h... yes
>>>> checking for PyArg_ParseTuple in -lpython2.7... yes
>>>> checking whether Python setup.py brokenly enables -D_FORTIFY_SOURCE...
>>>> ./configure: line 7058: python-config: command not found
>>>> no
>>>> checking for xgettext... /usr/bin/xgettext
>>>>
>>>> Shall we require python-config installed on the build-platform?
>>>>
>>>
>>> Isn't it part of the python-dev package? I'm using Debian, but I would
>>> expect it should come with whatever python development package you
>>> distro has?
>>
>> My point wasn't about the missing package but the odd error of the
>> configure when python-config doesn't exist.
>>
>
> My point being that you've clearly installed python development package
> (and we check that in configure) but you don't have python-config. It
> looks a bit weird. But if this is how some distro packages python then
> we should deal with this.

Oh sorry I didn't understand your point like that. I'm using Debian Jessie.

python-dev is not installed. Although I have libpython-dev installed.

Regards,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: "./configure: line 7058: python-config: command not found" after commit 0013245
  2015-03-03 19:41       ` Julien Grall
@ 2015-03-04  9:07         ` Ian Campbell
  2015-03-04 12:27           ` Julien Grall
  0 siblings, 1 reply; 17+ messages in thread
From: Ian Campbell @ 2015-03-04  9:07 UTC (permalink / raw)
  To: Julien Grall; +Cc: Ian Jackson, Wei Liu, xen-devel

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 <roger.pau@entel.upc.edu>
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 <roger.pau@entel.upc.edu>
    Cc: Zhang, Yang Z <yang.z.zhang@intel.com>
    Tested-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
    Cc: Ian Campbell <ian.campbell@citrix.com>
    Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

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.

Can someone cook up a patch please?

Ian.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: "./configure: line 7058: python-config: command not found" after commit 0013245
  2015-03-04  9:07         ` Ian Campbell
@ 2015-03-04 12:27           ` Julien Grall
  2015-03-04 12:35             ` Ian Campbell
  0 siblings, 1 reply; 17+ messages in thread
From: Julien Grall @ 2015-03-04 12:27 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Ian Jackson, Wei Liu, xen-devel

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 <roger.pau@entel.upc.edu>
> 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 <roger.pau@entel.upc.edu>
>     Cc: Zhang, Yang Z <yang.z.zhang@intel.com>
>     Tested-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
>     Cc: Ian Campbell <ian.campbell@citrix.com>
>     Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
> 
> 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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: "./configure: line 7058: python-config: command not found" after commit 0013245
  2015-03-04 12:27           ` Julien Grall
@ 2015-03-04 12:35             ` Ian Campbell
  2015-03-04 12:47               ` Julien Grall
  0 siblings, 1 reply; 17+ messages in thread
From: Ian Campbell @ 2015-03-04 12:35 UTC (permalink / raw)
  To: Julien Grall; +Cc: Ian Jackson, Wei Liu, xen-devel

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 <roger.pau@entel.upc.edu>
> > 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 <roger.pau@entel.upc.edu>
> >     Cc: Zhang, Yang Z <yang.z.zhang@intel.com>
> >     Tested-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
> >     Cc: Ian Campbell <ian.campbell@citrix.com>
> >     Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
> > 
> > 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 (according to the commit log above) optional so that
people using Python <= 2.4 can still build Xen.

> 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.

Patches welcomed either way.

> 
> Regards,
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: "./configure: line 7058: python-config: command not found" after commit 0013245
  2015-03-04 12:35             ` Ian Campbell
@ 2015-03-04 12:47               ` Julien Grall
  2015-03-04 13:00                 ` Ian Campbell
  0 siblings, 1 reply; 17+ messages in thread
From: Julien Grall @ 2015-03-04 12:47 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Ian Jackson, Wei Liu, xen-devel

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 <roger.pau@entel.upc.edu>
>>> 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 <roger.pau@entel.upc.edu>
>>>     Cc: Zhang, Yang Z <yang.z.zhang@intel.com>
>>>     Tested-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
>>>     Cc: Ian Campbell <ian.campbell@citrix.com>
>>>     Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
>>>
>>> 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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: "./configure: line 7058: python-config: command not found" after commit 0013245
  2015-03-04 12:47               ` Julien Grall
@ 2015-03-04 13:00                 ` Ian Campbell
  2015-03-04 14:02                   ` Roger Pau Monné
  0 siblings, 1 reply; 17+ messages in thread
From: Ian Campbell @ 2015-03-04 13:00 UTC (permalink / raw)
  To: Julien Grall, Roger Pau Monne; +Cc: Ian Jackson, Wei Liu, xen-devel

On Wed, 2015-03-04 at 12:47 +0000, Julien Grall wrote:
> 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 <roger.pau@entel.upc.edu>
> >>> 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 <roger.pau@entel.upc.edu>
> >>>     Cc: Zhang, Yang Z <yang.z.zhang@intel.com>
> >>>     Tested-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
> >>>     Cc: Ian Campbell <ian.campbell@citrix.com>
> >>>     Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
> >>>
> >>> 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)?

Assuming you mean 2.5 (per Roger's commit message), I think so. Roger?

Ian.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: "./configure: line 7058: python-config: command not found" after commit 0013245
  2015-03-04 13:00                 ` Ian Campbell
@ 2015-03-04 14:02                   ` Roger Pau Monné
  2015-03-04 14:10                     ` Ian Campbell
  0 siblings, 1 reply; 17+ messages in thread
From: Roger Pau Monné @ 2015-03-04 14:02 UTC (permalink / raw)
  To: Ian Campbell, Julien Grall; +Cc: Ian Jackson, Wei Liu, xen-devel

El 04/03/15 a les 14.00, Ian Campbell ha escrit:
> On Wed, 2015-03-04 at 12:47 +0000, Julien Grall wrote:
>> 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 <roger.pau@entel.upc.edu>
>>>>> 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 <roger.pau@entel.upc.edu>
>>>>>     Cc: Zhang, Yang Z <yang.z.zhang@intel.com>
>>>>>     Tested-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
>>>>>     Cc: Ian Campbell <ian.campbell@citrix.com>
>>>>>     Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
>>>>>
>>>>> 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)?
> 
> Assuming you mean 2.5 (per Roger's commit message), I think so. Roger?

Yes, I think so, for python versions > 2.4 we should require
python-config. IMHO python_fortify_noopt.m4 should also be fixed to deal
with older python version that don't have python-config.

Roger.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: "./configure: line 7058: python-config: command not found" after commit 0013245
  2015-03-04 14:02                   ` Roger Pau Monné
@ 2015-03-04 14:10                     ` Ian Campbell
  2015-03-04 16:07                       ` Ian Jackson
  0 siblings, 1 reply; 17+ messages in thread
From: Ian Campbell @ 2015-03-04 14:10 UTC (permalink / raw)
  To: Roger Pau Monné; +Cc: Ian Jackson, Julien Grall, Wei Liu, xen-devel

On Wed, 2015-03-04 at 15:02 +0100, Roger Pau Monné wrote:
> Yes, I think so, for python versions > 2.4 we should require
> python-config.

ACK.

> IMHO python_fortify_noopt.m4 should also be fixed to deal
> with older python version that don't have python-config.

That would be ideal, but unless someone shows me/us a system with Python
<=2.4 which suffers from this issue I'd also be inclined to accept a
patch which made that check only apply iff python-config was found
(assuming that would be simpler. it might actually be harder...).

Ian.


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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: "./configure: line 7058: python-config: command not found" after commit 0013245
  2015-03-04 14:10                     ` Ian Campbell
@ 2015-03-04 16:07                       ` Ian Jackson
  2015-03-04 16:14                         ` Ian Campbell
  0 siblings, 1 reply; 17+ messages in thread
From: Ian Jackson @ 2015-03-04 16:07 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel, Julien Grall, Wei Liu, Roger Pau Monné

Ian Campbell writes ("Re: "./configure: line 7058: python-config: command not found" after commit 0013245"):
> On Wed, 2015-03-04 at 15:02 +0100, Roger Pau Monné wrote:
> > Yes, I think so, for python versions > 2.4 we should require
> > python-config.
> 
> ACK.
> 
> > IMHO python_fortify_noopt.m4 should also be fixed to deal
> > with older python version that don't have python-config.
> 
> That would be ideal, but unless someone shows me/us a system with Python
> <=2.4 which suffers from this issue I'd also be inclined to accept a
> patch which made that check only apply iff python-config was found
> (assuming that would be simpler. it might actually be harder...).

Isn't that what the current code does (rather messily) ?

That is, it invokes python-config, doesn't notice that python-config
fails, finds that the no output produced by python-config doesn't
contain the problematic fortify options, and disables the workaround.

Ian.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: "./configure: line 7058: python-config: command not found" after commit 0013245
  2015-03-04 16:07                       ` Ian Jackson
@ 2015-03-04 16:14                         ` Ian Campbell
  2015-03-05  8:32                           ` Roger Pau Monné
  0 siblings, 1 reply; 17+ messages in thread
From: Ian Campbell @ 2015-03-04 16:14 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel, Julien Grall, Wei Liu, Roger Pau Monné

On Wed, 2015-03-04 at 16:07 +0000, Ian Jackson wrote:
> Ian Campbell writes ("Re: "./configure: line 7058: python-config: command not found" after commit 0013245"):
> > That would be ideal, but unless someone shows me/us a system with Python
> > <=2.4 which suffers from this issue I'd also be inclined to accept a
> > patch which made that check only apply iff python-config was found
> > (assuming that would be simpler. it might actually be harder...).
> 
> Isn't that what the current code does (rather messily) ?

Yes, I misread Julien's original mail and thought configure was failing
due to the lack of python-config, but you are right, it carries on.

So it sounds like perhaps all that is needed is some judicious use of
"2>/dev/null"?

> 
> That is, it invokes python-config, doesn't notice that python-config
> fails, finds that the no output produced by python-config doesn't
> contain the problematic fortify options, and disables the workaround.
> 
> Ian.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: "./configure: line 7058: python-config: command not found" after commit 0013245
  2015-03-04 16:14                         ` Ian Campbell
@ 2015-03-05  8:32                           ` Roger Pau Monné
  2015-03-05 10:56                             ` Ian Campbell
  0 siblings, 1 reply; 17+ messages in thread
From: Roger Pau Monné @ 2015-03-05  8:32 UTC (permalink / raw)
  To: Ian Campbell, Ian Jackson; +Cc: xen-devel, Julien Grall, Wei Liu

El 04/03/15 a les 17.14, Ian Campbell ha escrit:
> On Wed, 2015-03-04 at 16:07 +0000, Ian Jackson wrote:
>> Ian Campbell writes ("Re: "./configure: line 7058: python-config: command not found" after commit 0013245"):
>>> That would be ideal, but unless someone shows me/us a system with Python
>>> <=2.4 which suffers from this issue I'd also be inclined to accept a
>>> patch which made that check only apply iff python-config was found
>>> (assuming that would be simpler. it might actually be harder...).
>>
>> Isn't that what the current code does (rather messily) ?
> 
> Yes, I misread Julien's original mail and thought configure was failing
> due to the lack of python-config, but you are right, it carries on.

Same here, I thought configure was failing.

> So it sounds like perhaps all that is needed is some judicious use of
> "2>/dev/null"?

But we still require python-config for python versions >= 2.5, or else
we will fail to detect if the workaround is needed?

Roger.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: "./configure: line 7058: python-config: command not found" after commit 0013245
  2015-03-05  8:32                           ` Roger Pau Monné
@ 2015-03-05 10:56                             ` Ian Campbell
  0 siblings, 0 replies; 17+ messages in thread
From: Ian Campbell @ 2015-03-05 10:56 UTC (permalink / raw)
  To: Roger Pau Monné; +Cc: Wei Liu, Julien Grall, Ian Jackson, xen-devel

On Thu, 2015-03-05 at 09:32 +0100, Roger Pau Monné wrote:
> > So it sounds like perhaps all that is needed is some judicious use of
> > "2>/dev/null"?
> 
> But we still require python-config for python versions >= 2.5, or else
> we will fail to detect if the workaround is needed?

I've said it a few times in this thread: Until we know that there are
systems which both lack python-config _and_ suffer from the fortify
incompatibility then we can live with this IMHO.

IOW I think we can just assume that the fortify incompatibility is a
feature of either newer distros and/or newer versions of python
implementing hardening flags which is something which has been going on
over the last few years.

Python 2.5 dates back to 2006, before then I think enabling fortify by
default was not all that common.

Ian.


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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-03-05 10:56 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-03 17:22 "./configure: line 7058: python-config: command not found" after commit 0013245 Julien Grall
2015-03-03 17:36 ` Wei Liu
2015-03-03 17:46   ` Julien Grall
2015-03-03 18:48     ` Wei Liu
2015-03-03 19:41       ` Julien Grall
2015-03-04  9:07         ` Ian Campbell
2015-03-04 12:27           ` Julien Grall
2015-03-04 12:35             ` Ian Campbell
2015-03-04 12:47               ` Julien Grall
2015-03-04 13:00                 ` Ian Campbell
2015-03-04 14:02                   ` Roger Pau Monné
2015-03-04 14:10                     ` Ian Campbell
2015-03-04 16:07                       ` Ian Jackson
2015-03-04 16:14                         ` Ian Campbell
2015-03-05  8:32                           ` Roger Pau Monné
2015-03-05 10:56                             ` Ian Campbell
2015-03-03 17:36 ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.