classification
Title: Add current dir when running try_run test program
Type: Stage:
Components: Distutils Versions:
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: collinwinter Nosy List: collinwinter, fernando_gomes, lianos, mdehoon, pje
Priority: normal Keywords: patch

Created on 2005-03-22 02:49 by mdehoon, last changed 2009-01-12 17:55 by fernando_gomes. This issue is now closed.

Files
File name Uploaded Description Edit
config.py.diff mdehoon, 2005-03-22 02:49 Patch for distutils/command/config.py
Messages (6)
msg48042 - (view) Author: Michiel de Hoon (mdehoon) * Date: 2005-03-22 02:49
The try_run function in command/config.py is used to
run a test program as part of configuring an extension
module with "python setup.py config" before running
"python setup.py build". When running the test program,
the current directory is not included in the program
name. So it attempts to run _configtest instead of
./_configtest. This works fine as long as the user has
the current directory in the path. If not, the attempt
to run _configtest fails. The patch adds the current
directory in front of _configtest, so that the program
runs even if the user does not have the current
directory in the path.
msg48043 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2007-03-12 17:00
Phillip, any thoughts?
msg48044 - (view) Author: PJ Eby (pje) * (Python committer) Date: 2007-03-12 18:26
Sorry, I've never used the "config" command nor seen any code that does, nor any documentation for it.  I didn't even know it was actually usable.

The OP's rationale for the change sounds reasonable to me, but a quick skim of the module doesn't convince me that it'll fix the problem correctly, vs. e.g. using os.path.abspath().  One thing that bugs me is why the program's being created in the current directory instead of the build/ directory in the first place.  ISTM that there's a lot more that's broken here.   OTOH, I don't suppose the patch would make things any worse.  It would be nice if the original author of the module were around.
msg48045 - (view) Author: Collin Winter (collinwinter) * (Python committer) Date: 2007-03-13 02:14
Closing based on PJE's comment.
msg73648 - (view) Author: Steve Lianoglou (lianos) Date: 2008-09-23 16:44
Sorry to bring up an old issue, but I just got bit by this when trying
to install a python package.

The `config` command was used to ensure that a certain function was
included in the math.h on my cpu before compiling the resulting c binary
and python wrapper for it.

I had to chase down the problem and basically re-figure out what Michiel
did in his patch on my system[1] and override the `try_run` method in
the setup.py file.

I didn't bother checking the issue tracker assuming distutils is used so
widely (and is old enough) that the bug couldn't be in distutiles
itself, but must be something I'm doing wrong in my end ... oh well.

Anyway, could we somehow try to fix this bug to mitigate some lost time
and frustration?

Michiel's patch seems reasonable enough to me since it looks to be the
least surgery-intensive way (I'm not sure where Phillip would like to
put the os.path.abspath() call) to fix the bug for the majority of the
time when someone would be bitten by it.

Regardless of whether or not the code is well documented, it's still
there and usable in distutils (w/o any warnings against its use), so it
would make sense to me that we at least have it work as its intended to.

[1] My path was slightly different than the submitted patch. Where
Michiel has:

command = os.path.join(os.curdir, exe)

I have:

command = os.path.join(os.getcwd(), exe)

all in all, you get the same effect
msg79687 - (view) Author: Fernando Gomes (fernando_gomes) Date: 2009-01-12 17:55
Dear Community,
I'd fronted problems to install Statistics module on my Ubuntu.
There are errors that are hard to solve without an expert help, such as
the one received from Michiel (Thank you again!!!).
Errors are listed below:

# XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
oot@fgsj-IMA:/usr/lib/python2.5/statistics-0.19# python setup.py config
running config
 ============= begin statistics configuration ================
unable to execute _configtest: No such file or directory
libm does not contain erf; skipping this feature
unable to execute _configtest: No such file or directory
libm does not contain erfc; skipping this feature
 ============= end statistics configuration ==================
wrote config file (src/config.h)
root@fgsj-IMA:/usr/lib/python2.5/statistics-0.19# python setup.py build
running build
running build_ext
building 'statistics' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -Isrc
-I/usr/lib/python2.5/site-packages/numpy/core/include
-I/usr/include/python2.5
-c src/statisticsmodule.c -o
build/temp.linux-i686-2.5/src/statisticsmodule.o
src/statisticsmodule.c:1:20: error: Python.h: No such file or directory
In file included from
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/arrayobject.h:14,
                from src/statisticsmodule.c:2:
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:100:2:
error: #error Must use Python with unicode enabled.
In file included from
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/arrayobject.h:14,
                from src/statisticsmodule.c:2:
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:920:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:921:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘npy_uintp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1013:
error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1014:
error:
expected ‘)’ before ‘*’ token
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1016:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1016:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1017:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1027:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1027:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1029:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1029:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1030:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1032:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1037:
error:
expected ‘)’ before ‘*’ token
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1042:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1044:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1045:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1045:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1047:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1051:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1053:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1054:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1055:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1056:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1056:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1057:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1057:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1061:
error:
expected specifier-qualifier-list before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1074:
error:
expected specifier-qualifier-list before ‘PyArray_GetItemFunc’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1175:
error:
expected specifier-qualifier-list before ‘PyObject_HEAD’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1207:
error:
expected specifier-qualifier-list before ‘PyObject’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1217:
error:
expected specifier-qualifier-list before ‘PyObject_HEAD’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1242:
error:
expected specifier-qualifier-list before ‘PyObject_HEAD’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1250:
error:
expected specifier-qualifier-list before ‘PyObject_HEAD’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1257:
error:
expected declaration specifiers or ‘...’ before ‘PyObject’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1399:
error:
expected specifier-qualifier-list before ‘PyObject_HEAD’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1546:
error:
expected specifier-qualifier-list before ‘PyObject_HEAD’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1600:
error:
expected specifier-qualifier-list before ‘PyObject_HEAD’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1813:
error:
expected specifier-qualifier-list before ‘npy_intp’
In file included from
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1828,
                from
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/arrayobject.h:14,
                from src/statisticsmodule.c:2:
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:403:
error: ‘NULL’ undeclared here (not in a function)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:
In function ‘_import_array’:
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:960:
error: ‘PyObject’ undeclared (first use in this function)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:960:
error: (Each undeclared identifier is reported only once
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:960:
error: for each function it appears in.)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:960:
error: ‘numpy’ undeclared (first use in this function)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:960:
warning: implicit declaration of function ‘PyImport_ImportModule’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:961:
error: ‘c_api’ undeclared (first use in this function)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:963:
warning: implicit declaration of function ‘PyObject_GetAttrString’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:964:
warning: implicit declaration of function ‘Py_DECREF’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:965:
warning: implicit declaration of function ‘PyCObject_Check’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:966:
warning: implicit declaration of function ‘PyCObject_AsVoidPtr’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:973:
warning: implicit declaration of function ‘PyErr_Format’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:973:
error: ‘PyExc_RuntimeError’ undeclared (first use in this function)
src/statisticsmodule.c: At top level:
src/statisticsmodule.c:14: error: expected ‘)’ before ‘*’ token
src/statisticsmodule.c:71: error: expected ‘)’ before ‘*’ token
src/statisticsmodule.c: In function ‘find_mnemonic’:
src/statisticsmodule.c:117: warning: implicit declaration of function
‘strlen’
src/statisticsmodule.c:117: warning: incompatible implicit declaration of
built-in function ‘strlen’
src/statisticsmodule.c:119: warning: implicit declaration of function
‘malloc’
src/statisticsmodule.c:119: warning: incompatible implicit declaration of
built-in function ‘malloc’
src/statisticsmodule.c:120: warning: implicit declaration of function
‘strcpy’
src/statisticsmodule.c:120: warning: incompatible implicit declaration of
built-in function ‘strcpy’
src/statisticsmodule.c:121: warning: implicit declaration of function
‘tolower’
src/statisticsmodule.c:123: warning: implicit declaration of function
‘strcmp’
src/statisticsmodule.c:134: warning: implicit declaration of function ‘free’
src/statisticsmodule.c:134: warning: incompatible implicit declaration of
built-in function ‘free’
src/statisticsmodule.c: At top level:
src/statisticsmodule.c:152: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘parse_integer’
src/statisticsmodule.c:227: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:445: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:646: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:840: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:985: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:1046: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:1115: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:1195: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:1292: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:1490: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:1650: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:1821: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:2013: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:2057: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:2181: error: array type has incomplete element type
src/statisticsmodule.c:2182: error: ‘PyCFunction’ undeclared here (not in a
function)
src/statisticsmodule.c:2182: error: expected ‘}’ before ‘py_mean’
src/statisticsmodule.c:2183: error: expected ‘}’ before ‘py_median’
src/statisticsmodule.c:2184: error: expected ‘}’ before ‘py_variance’
src/statisticsmodule.c:2185: error: expected ‘}’ before ‘py_covariance’
src/statisticsmodule.c:2186: error: expected ‘}’ before ‘py_correlation’
src/statisticsmodule.c:2187: error: expected ‘}’ before ‘py_regression’
src/statisticsmodule.c:2188: error: expected ‘}’ before ‘py_bandwidth’
src/statisticsmodule.c:2189: error: expected ‘}’ before ‘py_pdf’
src/statisticsmodule.c:2190: error: expected ‘}’ before ‘py_cpdf’
src/statisticsmodule.c:2191: error: expected ‘}’ before ‘py_cpdfc’
src/statisticsmodule.c: In function ‘initstatistics’:
src/statisticsmodule.c:2202: warning: implicit declaration of function
‘PyErr_Print’
src/statisticsmodule.c:2202: warning: implicit declaration of function
‘PyErr_SetString’
src/statisticsmodule.c:2202: error: ‘PyExc_ImportError’ undeclared
(first use
in this function)
src/statisticsmodule.c:2203: warning: implicit declaration of function
‘Py_InitModule3’
src/statisticsmodule.c:2204: warning: implicit declaration of function
‘PyErr_Occurred’
src/statisticsmodule.c:2204: warning: implicit declaration of function
‘Py_FatalError’
error: command 'gcc' failed with exit status 1
root@fgsj-IMA:/usr/lib/python2.5/statistics-0.19# python setup.py install
running install
running build
running build_ext
building 'statistics' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -Isrc
-I/usr/lib/python2.5/site-packages/numpy/core/include
-I/usr/include/python2.5
-c src/statisticsmodule.c -o
build/temp.linux-i686-2.5/src/statisticsmodule.o
src/statisticsmodule.c:1:20: error: Python.h: No such file or directory
In file included from
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/arrayobject.h:14,
                from src/statisticsmodule.c:2:
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:100:2:
error: #error Must use Python with unicode enabled.
In file included from
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/arrayobject.h:14,
                from src/statisticsmodule.c:2:
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:920:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:921:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘npy_uintp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1013:
error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1014:
error:
expected ‘)’ before ‘*’ token
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1016:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1016:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1017:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1027:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1027:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1029:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1029:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1030:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1032:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1037:
error:
expected ‘)’ before ‘*’ token
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1042:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1044:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1045:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1045:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1047:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1051:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1053:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1054:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1055:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1056:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1056:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1057:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1057:
error:
expected declaration specifiers or ‘...’ before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1061:
error:
expected specifier-qualifier-list before ‘npy_intp’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1074:
error:
expected specifier-qualifier-list before ‘PyArray_GetItemFunc’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1175:
error:
expected specifier-qualifier-list before ‘PyObject_HEAD’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1207:
error:
expected specifier-qualifier-list before ‘PyObject’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1217:
error:
expected specifier-qualifier-list before ‘PyObject_HEAD’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1242:
error:
expected specifier-qualifier-list before ‘PyObject_HEAD’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1250:
error:
expected specifier-qualifier-list before ‘PyObject_HEAD’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1257:
error:
expected declaration specifiers or ‘...’ before ‘PyObject’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1399:
error:
expected specifier-qualifier-list before ‘PyObject_HEAD’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1546:
error:
expected specifier-qualifier-list before ‘PyObject_HEAD’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1600:
error:
expected specifier-qualifier-list before ‘PyObject_HEAD’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1813:
error:
expected specifier-qualifier-list before ‘npy_intp’
In file included from
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:1828,
                from
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/arrayobject.h:14,
                from src/statisticsmodule.c:2:
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:403:
error: ‘NULL’ undeclared here (not in a function)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:
In function ‘_import_array’:
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:960:
error: ‘PyObject’ undeclared (first use in this function)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:960:
error: (Each undeclared identifier is reported only once
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:960:
error: for each function it appears in.)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:960:
error: ‘numpy’ undeclared (first use in this function)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:960:
warning: implicit declaration of function ‘PyImport_ImportModule’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:961:
error: ‘c_api’ undeclared (first use in this function)
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:963:
warning: implicit declaration of function ‘PyObject_GetAttrString’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:964:
warning: implicit declaration of function ‘Py_DECREF’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:965:
warning: implicit declaration of function ‘PyCObject_Check’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:966:
warning: implicit declaration of function ‘PyCObject_AsVoidPtr’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:973:
warning: implicit declaration of function ‘PyErr_Format’
/usr/lib/python2.5/site-packages/numpy/core/include/numpy/__multiarray_api.h:973:
error: ‘PyExc_RuntimeError’ undeclared (first use in this function)
src/statisticsmodule.c: At top level:
src/statisticsmodule.c:14: error: expected ‘)’ before ‘*’ token
src/statisticsmodule.c:71: error: expected ‘)’ before ‘*’ token
src/statisticsmodule.c: In function ‘find_mnemonic’:
src/statisticsmodule.c:117: warning: implicit declaration of function
‘strlen’
src/statisticsmodule.c:117: warning: incompatible implicit declaration of
built-in function ‘strlen’
src/statisticsmodule.c:119: warning: implicit declaration of function
‘malloc’
src/statisticsmodule.c:119: warning: incompatible implicit declaration of
built-in function ‘malloc’
src/statisticsmodule.c:120: warning: implicit declaration of function
‘strcpy’
src/statisticsmodule.c:120: warning: incompatible implicit declaration of
built-in function ‘strcpy’
src/statisticsmodule.c:121: warning: implicit declaration of function
‘tolower’
src/statisticsmodule.c:123: warning: implicit declaration of function
‘strcmp’
src/statisticsmodule.c:134: warning: implicit declaration of function ‘free’
src/statisticsmodule.c:134: warning: incompatible implicit declaration of
built-in function ‘free’
src/statisticsmodule.c: At top level:
src/statisticsmodule.c:152: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘parse_integer’
src/statisticsmodule.c:227: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:445: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:646: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:840: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:985: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:1046: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:1115: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:1195: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:1292: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:1490: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:1650: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:1821: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:2013: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:2057: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/statisticsmodule.c:2181: error: array type has incomplete element type
src/statisticsmodule.c:2182: error: ‘PyCFunction’ undeclared here (not in a
function)
src/statisticsmodule.c:2182: error: expected ‘}’ before ‘py_mean’
src/statisticsmodule.c:2183: error: expected ‘}’ before ‘py_median’
src/statisticsmodule.c:2184: error: expected ‘}’ before ‘py_variance’
src/statisticsmodule.c:2185: error: expected ‘}’ before ‘py_covariance’
src/statisticsmodule.c:2186: error: expected ‘}’ before ‘py_correlation’
src/statisticsmodule.c:2187: error: expected ‘}’ before ‘py_regression’
src/statisticsmodule.c:2188: error: expected ‘}’ before ‘py_bandwidth’
src/statisticsmodule.c:2189: error: expected ‘}’ before ‘py_pdf’
src/statisticsmodule.c:2190: error: expected ‘}’ before ‘py_cpdf’
src/statisticsmodule.c:2191: error: expected ‘}’ before ‘py_cpdfc’
src/statisticsmodule.c: In function ‘initstatistics’:
src/statisticsmodule.c:2202: warning: implicit declaration of function
‘PyErr_Print’
src/statisticsmodule.c:2202: warning: implicit declaration of function
‘PyErr_SetString’
src/statisticsmodule.c:2202: error: ‘PyExc_ImportError’ undeclared
(first use
in this function)
src/statisticsmodule.c:2203: warning: implicit declaration of function
‘Py_InitModule3’
src/statisticsmodule.c:2204: warning: implicit declaration of function
‘PyErr_Occurred’
src/statisticsmodule.c:2204: warning: implicit declaration of function
‘Py_FatalError’
error: command 'gcc' failed with exit status 1
# XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
History
Date User Action Args
2009-01-12 17:55:15fernando_gomessetnosy: + fernando_gomes
messages: + msg79687
2008-09-23 16:44:38lianossetnosy: + lianos
messages: + msg73648
2005-03-22 02:49:04mdehooncreate