"./configure: line 7058: python-config: command not found" after commit 0013245
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,
Signature · 1 line
Julien Grall
Quoted 14 lines · Julien Grall
Hi,
I've tried to use ./configure on the latest master and got the below error:
checking for python-config... no
checkingPython.husability... yes
checkingPython.hpresence... yes
checking forPython.h... yes
checking forPyArg_ParseTuplein -lpython2.7... yes checking whether Pythonsetup.pybrokenly enables -D_FORTIFY_SOURCE... ./configure: line 7058: python-config: command not found
no
checking for xgettext.../usr/bin/xgettext
Quoted 1 line
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.
Quoted 14 lines · Julien Grall
Hi,
I've tried to use ./configure on the latest master and got the below error:
checking for python-config... no
checkingPython.husability... yes
checkingPython.hpresence... yes
checking forPython.h... yes
checking forPyArg_ParseTuplein -lpython2.7... yes checking whether Pythonsetup.pybrokenly enables -D_FORTIFY_SOURCE... ./configure: line 7058: python-config: command not found
no
checking for xgettext.../usr/bin/xgettext
Quoted 2 lines
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.
Quoted 4 lines
Regards,
Signature · 1 line
Julien Grall
Quoted 15 lines · Wei Liu
Quoted 14 lines · Julien Grall
Hi,
I've tried to use ./configure on the latest master and got the below error:
checking for python-config... no
checkingPython.husability... yes
checkingPython.hpresence... yes
checking forPython.h... yes
checking forPyArg_ParseTuplein -lpython2.7... yes checking whether Pythonsetup.pybrokenly enables -D_FORTIFY_SOURCE... ./configure: line 7058: python-config: command not found
no
checking for xgettext.../usr/bin/xgettext
Quoted 6 lines
Quoted 2 lines
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,
Signature · 1 line
Julien Grall
Quoted 19 lines · Julien Grall
Quoted 18 lines · Wei Liu
Quoted 16 lines · Julien Grall
Hi,
I've tried to use ./configure on the latest master and got the below error:
checking for python-config... no
checkingPython.husability... yes
checkingPython.hpresence... yes
checking forPython.h... yes
checking forPyArg_ParseTuplein -lpython2.7... yes checking whether Pythonsetup.pybrokenly enables -D_FORTIFY_SOURCE... ./configure: line 7058: python-config: command not found
no
checking for xgettext.../usr/bin/xgettextShall we require python-config installed on the build-platform?
Quoted 7 lines
Quoted 3 lines
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.
Quoted 4 lines
Regards,
Signature · 1 line
Julien Grall
Quoted 24 lines · Wei Liu
Quoted 23 lines · Julien Grall
Quoted 21 lines · Wei Liu
Quoted 14 lines · Julien Grall
Hi,
I've tried to use ./configure on the latest master and got the below error:
checking for python-config... no
checkingPython.husability... yes
checkingPython.hpresence... yes
checking forPython.h... yes
checking forPyArg_ParseTuplein -lpython2.7... yes checking whether Pythonsetup.pybrokenly enables -D_FORTIFY_SOURCE... ./configure: line 7058: python-config: command not found
no
checking for xgettext.../usr/bin/xgettextQuoted 2 lines
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?
Quoted 8 lines
Quoted 3 lines
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,
Signature · 1 line
Julien Grall
Ian Campbell
Tested-by KUWAMURA Shin'yaQuoted 1 line · Julien Grall
python-dev is not installed. Although I have libpython-dev installed.
And this used to work I suppose?
As I said in <[email protected]>:
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 <[email protected]> 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.
So it seems like it is necessary to continue to work without python-config present.
Quoted 5 lines · In my same earlier mail I
Perhaps
AX_CHECK_PYTHON_FORTIFY_NOOPTshould be a nop unless python-config is available?Or perhaps
AX_CHECK_PYTHON_DEVELshould exportPYTHON_CFLAGSetc 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.
Hi Ian,
Quoted 43 lines · Ian Campbell
Quoted 1 line · Julien Grall
python-dev is not installed. Although I have libpython-dev installed.
And this used to work I suppose?
As I said in <[email protected]>:
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
474a0e59d821bfb49b64c3d722a000bd9b5b7599Author: Roger Pau Monne <[email protected]> Date: Tue Apr 3 14:28:45 2012 +0100autoconf: 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 <[email protected]>Cc Zhang, Yang Z <[email protected]>Tested-by KUWAMURA Shin'ya <[email protected]>Cc Ian Campbell <[email protected]>Committed-by Ian Jackson <[email protected]>So it seems like it is necessary to continue to work without python-config present.
Quoted 3 lines · In my same earlier mail I
Perhaps
AX_CHECK_PYTHON_FORTIFY_NOOPTshould be a nop unless python-config is available?
Quoted 7 lines
Quoted 2 lines
Or perhaps
AX_CHECK_PYTHON_DEVELshould exportPYTHON_CFLAGSetc 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,
Signature · 1 line
Julien Grall
Quoted 49 lines · Julien Grall
Hi Ian,
Quoted 46 lines · Ian Campbell
Quoted 1 line · Julien Grall
python-dev is not installed. Although I have libpython-dev installed.
And this used to work I suppose?
As I said in <[email protected]>:
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
474a0e59d821bfb49b64c3d722a000bd9b5b7599Author: Roger Pau Monne <[email protected]> Date: Tue Apr 3 14:28:45 2012 +0100autoconf: 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 <[email protected]>Cc Zhang, Yang Z <[email protected]>Tested-by KUWAMURA Shin'ya <[email protected]>Cc Ian Campbell <[email protected]>Committed-by Ian Jackson <[email protected]>So it seems like it is necessary to continue to work without python-config present.
Quoted 5 lines · In my same earlier mail I
Perhaps
AX_CHECK_PYTHON_FORTIFY_NOOPTshould be a nop unless python-config is available?Or perhaps
AX_CHECK_PYTHON_DEVELshould exportPYTHON_CFLAGSetc which the fortify test should look at instead of invoking python-cofnig?
Quoted 7 lines
Quoted 4 lines
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.
Quoted 5 lines
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.
Quoted 3 lines
Regards,
Quoted 55 lines · Ian Campbell
Quoted 54 lines · Julien Grall
Hi Ian,
Quoted 50 lines · Ian Campbell
Quoted 1 line · Julien Grall
python-dev is not installed. Although I have libpython-dev installed.
And this used to work I suppose?
As I said in <[email protected]>:
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
474a0e59d821bfb49b64c3d722a000bd9b5b7599Author: Roger Pau Monne <[email protected]> Date: Tue Apr 3 14:28:45 2012 +0100autoconf: 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 <[email protected]>Cc Zhang, Yang Z <[email protected]>Tested-by KUWAMURA Shin'ya <[email protected]>Cc Ian Campbell <[email protected]>Committed-by Ian Jackson <[email protected]>So it seems like it is necessary to continue to work without python-config present.
Quoted 5 lines · In my same earlier mail I
Perhaps
AX_CHECK_PYTHON_FORTIFY_NOOPTshould be a nop unless python-config is available?Or perhaps
AX_CHECK_PYTHON_DEVELshould exportPYTHON_CFLAGSetc 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.
Quoted 6 lines
Quoted 2 lines
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).
Quoted 2 lines
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,
Signature · 1 line
Julien Grall
Quoted 63 lines · Julien Grall
Quoted 55 lines · Ian Campbell
Quoted 54 lines · Julien Grall
Hi Ian,
Quoted 50 lines · Ian Campbell
Quoted 1 line · Julien Grall
python-dev is not installed. Although I have libpython-dev installed.
And this used to work I suppose?
As I said in <[email protected]>:
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
474a0e59d821bfb49b64c3d722a000bd9b5b7599Author: Roger Pau Monne <[email protected]> Date: Tue Apr 3 14:28:45 2012 +0100autoconf: 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 <[email protected]>Cc Zhang, Yang Z <[email protected]>Tested-by KUWAMURA Shin'ya <[email protected]>Cc Ian Campbell <[email protected]>Committed-by Ian Jackson <[email protected]>So it seems like it is necessary to continue to work without python-config present.
Quoted 5 lines · In my same earlier mail I
Perhaps
AX_CHECK_PYTHON_FORTIFY_NOOPTshould be a nop unless python-config is available?Or perhaps
AX_CHECK_PYTHON_DEVELshould exportPYTHON_CFLAGSetc 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.
Quoted 6 lines
Quoted 2 lines
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.
Quoted 7 lines
python-config is part of python-dev package. Although I have only install libpython-dev (which contains the headers).
Quoted 2 lines
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.
El 04/03/15 a les 14.00, Ian Campbell ha escrit:
Quoted 67 lines · Julien Grall
Quoted 66 lines · Ian Campbell
Quoted 55 lines · Julien Grall
Quoted 54 lines
Hi Ian,
Quoted 50 lines · Ian Campbell
Quoted 1 line · Julien Grall
python-dev is not installed. Although I have libpython-dev installed.
And this used to work I suppose?
As I said in <[email protected]>:
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
474a0e59d821bfb49b64c3d722a000bd9b5b7599Author: Roger Pau Monne <[email protected]> Date: Tue Apr 3 14:28:45 2012 +0100autoconf: 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 <[email protected]>Cc Zhang, Yang Z <[email protected]>Tested-by KUWAMURA Shin'ya <[email protected]>Cc Ian Campbell <[email protected]>Committed-by Ian Jackson <[email protected]>So it seems like it is necessary to continue to work without python-config present.
Quoted 5 lines · In my same earlier mail I
Perhaps
AX_CHECK_PYTHON_FORTIFY_NOOPTshould be a nop unless python-config is available?Or perhaps
AX_CHECK_PYTHON_DEVELshould exportPYTHON_CFLAGSetc 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.
Quoted 6 lines
Quoted 2 lines
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).
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
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.
Quoted 2 lines · Roger Pau Monné
Yes, I think so, for python versions > 2.4 we should require python-config.
ACK.
Quoted 2 lines
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
[email protected]
http://lists.xen.org/xen-devel
Ian Campbell writes ("Re: "./configure: line 7058: python-config: command not found" after commit 0013245"):
Quoted 6 lines · Roger Pau Monné
Quoted 2 lines
Yes, I think so, for python versions > 2.4 we should require python-config.
ACK.
Quoted 7 lines
Quoted 2 lines
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.
Quoted 7 lines · Ian Jackson
Ian Campbell writes ("Re: "./configure: line 7058: python-config: command not found" after commit 0013245"):
Quoted 4 lines
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"?
Quoted 6 lines
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.
El 04/03/15 a les 17.14, Ian Campbell ha escrit:
Quoted 11 lines · Ian Jackson
Quoted 7 lines
Ian Campbell writes ("Re: "./configure: line 7058: python-config: command not found" after commit 0013245"):
Quoted 4 lines
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.
Quoted 2 lines
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.
Quoted 5 lines · Roger Pau Monné
Quoted 2 lines
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
[email protected]
http://lists.xen.org/xen-devel