[Numpy-discussion] Compilation problems npy_float64

Johan hbar1054571 at gmail.com
Thu Nov 5 11:26:18 EST 2015


Hello, I searched the forum, but couldn't find a post related to my 
problem.  I am installing scipy via pip in cygwin environment

pip install scipy

Note: numpy version 1.10.1 was installed with pip install -U numpy


    /usr/bin/gfortran -Wall -g -Wall -g -shared -Wl,-gc-sections -Wl,-s 
build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/qhull.o 
build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/qhull/src/geom2.o 
build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/qhull/src/geom.o 
build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/qhull/src/global.o 
build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/qhull/src/io.o 
build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/qhull/src/libqhull.o 
build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/qhull/src/mem.o 
build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/qhull/src/merge.o 
build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/qhull/src/poly2.o 
build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/qhull/src/poly.o 
build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/qhull/src/qset.o 
build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/qhull/src/random.o 
build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/qhull/src/rboxlib.o 
build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/qhull/src/stat.o 
build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/qhull/src/user.o 
build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/qhull/src/usermem.o 
build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/qhull/src/userprintf.o 
build/temp.cygwin-2.2.1-x86_64-
2.7/scipy/spatial/qhull/src/userprintf_rbox.o -L/usr/lib -
L/usr/lib/gcc/x86_64-pc-cygwin/4.9.3 -L/usr/lib/python2.7/config -
L/usr/lib -Lbuild/temp.cygwin-2.2.1-x86_64-2.7 -llapack -lblas -
lpython2.7 -lgfortran -o build/lib.cygwin-2.2.1-x86_64-
2.7/scipy/spatial/qhull.dll
    building 'scipy.spatial.ckdtree' extension
    compiling C++ sources
    C compiler: g++ -fno-strict-aliasing -ggdb -O2 -pipe -Wimplicit-
function-declaration -fdebug-prefix-map=/usr/src/ports/python/python-
2.7.10-1.x86_64/build=/usr/src/debug/python-2.7.10-1 -fdebug-prefix-
map=/usr/src/ports/python/python-2.7.10-1.x86_64/src/Python-
2.7.10=/usr/src/debug/python-2.7.10-1 -DNDEBUG -g -fwrapv -O3 -Wall

    creating build/temp.cygwin-2.2.1-x86_64-2.7/scipy/spatial/ckdtree
    creating build/temp.cygwin-2.2.1-x86_64-
2.7/scipy/spatial/ckdtree/src
    compile options: '-I/usr/include/python2.7 -
I/usr/lib/python2.7/site-packages/numpy/core/include -
Iscipy/spatial/ckdtree/src -I/usr/lib/python2.7/site-
packages/numpy/core/include -I/usr/include/python2.7 -c'
    g++: scipy/spatial/ckdtree/src/ckdtree_cpp_exc.cxx
    cc1plus: warning: command line option ‘-Wimplicit-function-
declaration’ is valid for C/ObjC but not for C++
    g++: scipy/spatial/ckdtree/src/ckdtree_query.cxx
    cc1plus: warning: command line option ‘-Wimplicit-function-
declaration’ is valid for C/ObjC but not for C++
    In file included from /usr/lib/python2.7/site-
packages/numpy/core/include/numpy/ndarraytypes.h:1781:0,
                     from /usr/lib/python2.7/site-
packages/numpy/core/include/numpy/ndarrayobject.h:18,
                     from /usr/lib/python2.7/site-
packages/numpy/core/include/numpy/arrayobject.h:4,
                     from 
scipy/spatial/ckdtree/src/ckdtree_query.cxx:15:
    /usr/lib/python2.7/site-
packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: 
warning: #warning "Using deprecated NumPy API, disable it by " 
"#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     #warning "Using deprecated NumPy API, disable it by " \
      ^
    In file included from 
scipy/spatial/ckdtree/src/ckdtree_query.cxx:31:0:
    scipy/spatial/ckdtree/src/ckdtree_cpp_methods.h:12:20: error: 
‘npy_float64 infinity’ redeclared as different kind of symbol
     extern npy_float64 infinity;
                        ^
    In file included from /usr/include/python2.7/pyport.h:325:0,
                     from /usr/include/python2.7/Python.h:58,
                     from 
scipy/spatial/ckdtree/src/ckdtree_query.cxx:14:
    /usr/include/math.h:263:15: note: previous declaration ‘double 
infinity()’
     extern double infinity _PARAMS((void));
                   ^
    In file included from 
scipy/spatial/ckdtree/src/ckdtree_query.cxx:31:0:
    scipy/spatial/ckdtree/src/ckdtree_cpp_methods.h: In function 
‘npy_float64 _distance_p(const npy_float64*, const npy_float64*, 
npy_float64, npy_intp, npy_float64)’:
    scipy/spatial/ckdtree/src/ckdtree_cpp_methods.h:139:17: error: 
invalid operands of types ‘const npy_float64 {aka const double}’ and 
‘double()’ to binary ‘operator==’
         else if (p==infinity) {
                     ^
    scipy/spatial/ckdtree/src/ckdtree_query.cxx: In function ‘PyObject* 
query_knn(const ckdtree*, npy_float64*, npy_intp*, const npy_float64*, 
npy_intp, npy_intp, npy_float64, npy_float64, npy_float64)’:
    scipy/spatial/ckdtree/src/ckdtree_query.cxx:431:111: error: cannot 
convert ‘double (*)()’ to ‘npy_float64 {aka double}’ for argument ‘9’ to 
‘void __query_single_point(const ckdtree*, npy_float64*, npy_intp*, 
const npy_float64*, npy_intp, npy_float64, npy_float64, npy_float64, 
npy_float64)’
                     __query_single_point(self, dd_row, ii_row, xx_row, 
k, eps, p, distance_upper_bound, ::infinity);
                                                                                                                   
^
    In file included from /usr/lib/python2.7/site-
packages/numpy/core/include/numpy/ndarrayobject.h:27:0,
                     from /usr/lib/python2.7/site-
packages/numpy/core/include/numpy/arrayobject.h:4,
                     from 
scipy/spatial/ckdtree/src/ckdtree_query.cxx:15:
    /usr/lib/python2.7/site-
packages/numpy/core/include/numpy/__multiarray_api.h: At global scope:
    /usr/lib/python2.7/site-
packages/numpy/core/include/numpy/__multiarray_api.h:1634:1: warning: 
‘int _import_array()’ defined but not used [-Wunused-function]
     _import_array(void)
     ^
    cc1plus: warning: command line option ‘-Wimplicit-function-
declaration’ is valid for C/ObjC but not for C++
    In file included from /usr/lib/python2.7/site-
packages/numpy/core/include/numpy/ndarraytypes.h:1781:0,
                     from /usr/lib/python2.7/site-
packages/numpy/core/include/numpy/ndarrayobject.h:18,
                     from /usr/lib/python2.7/site-
packages/numpy/core/include/numpy/arrayobject.h:4,
                     from 
scipy/spatial/ckdtree/src/ckdtree_query.cxx:15:
    /usr/lib/python2.7/site-
packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: 
warning: #warning "Using deprecated NumPy API, disable it by " 
"#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     #warning "Using deprecated NumPy API, disable it by " \
      ^
    In file included from 
scipy/spatial/ckdtree/src/ckdtree_query.cxx:31:0:
    scipy/spatial/ckdtree/src/ckdtree_cpp_methods.h:12:20: error: 
‘npy_float64 infinity’ redeclared as different kind of symbol
     extern npy_float64 infinity;
                        ^
    In file included from /usr/include/python2.7/pyport.h:325:0,
                     from /usr/include/python2.7/Python.h:58,
                     from 
scipy/spatial/ckdtree/src/ckdtree_query.cxx:14:
    /usr/include/math.h:263:15: note: previous declaration ‘double 
infinity()’
     extern double infinity _PARAMS((void));
                   ^
    In file included from 
scipy/spatial/ckdtree/src/ckdtree_query.cxx:31:0:
    scipy/spatial/ckdtree/src/ckdtree_cpp_methods.h: In function 
‘npy_float64 _distance_p(const npy_float64*, const npy_float64*, 
npy_float64, npy_intp, npy_float64)’:
    scipy/spatial/ckdtree/src/ckdtree_cpp_methods.h:139:17: error: 
invalid operands of types ‘const npy_float64 {aka const double}’ and 
‘double()’ to binary ‘operator==’
         else if (p==infinity) {
                     ^
    scipy/spatial/ckdtree/src/ckdtree_query.cxx: In function ‘PyObject* 
query_knn(const ckdtree*, npy_float64*, npy_intp*, const npy_float64*, 
npy_intp, npy_intp, npy_float64, npy_float64, npy_float64)’:
    scipy/spatial/ckdtree/src/ckdtree_query.cxx:431:111: error: cannot 
convert ‘double (*)()’ to ‘npy_float64 {aka double}’ for argument ‘9’ to 
‘void __query_single_point(const ckdtree*, npy_float64*, npy_intp*, 
const npy_float64*, npy_intp, npy_float64, npy_float64, npy_float64, 
npy_float64)’
                     __query_single_point(self, dd_row, ii_row, xx_row, 
k, eps, p, distance_upper_bound, ::infinity);
                                                                                                                   
^
    In file included from /usr/lib/python2.7/site-
packages/numpy/core/include/numpy/ndarrayobject.h:27:0,
                     from /usr/lib/python2.7/site-
packages/numpy/core/include/numpy/arrayobject.h:4,
                     from 
scipy/spatial/ckdtree/src/ckdtree_query.cxx:15:
    /usr/lib/python2.7/site-
packages/numpy/core/include/numpy/__multiarray_api.h: At global scope:
    /usr/lib/python2.7/site-
packages/numpy/core/include/numpy/__multiarray_api.h:1634:1: warning: 
‘int _import_array()’ defined but not used [-Wunused-function]
     _import_array(void)
     ^
    error: Command "g++ -fno-strict-aliasing -ggdb -O2 -pipe -Wimplicit-
function-declaration -fdebug-prefix-map=/usr/src/ports/python/python-
2.7.10-1.x86_64/build=/usr/src/debug/python-2.7.10-1 -fdebug-prefix-
map=/usr/src/ports/python/python-2.7.10-1.x86_64/src/Python-
2.7.10=/usr/src/debug/python-2.7.10-1 -DNDEBUG -g -fwrapv -O3 -Wall -
I/usr/include/python2.7 -I/usr/lib/python2.7/site-
packages/numpy/core/include -Iscipy/spatial/ckdtree/src -
I/usr/lib/python2.7/site-packages/numpy/core/include -
I/usr/include/python2.7 -c scipy/spatial/ckdtree/src/ckdtree_query.cxx -
o build/temp.cygwin-2.2.1-x86_64-
2.7/scipy/spatial/ckdtree/src/ckdtree_query.o" failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -c "import setuptools, 
tokenize;__file__='/tmp/pip-build-
vAliRx/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)
(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --
record /tmp/pip-gxrCbK-record/install-record.txt --single-version-
externally-managed --compile" failed with error code 1 in /tmp/pip-
build-vAliRx/scipy


More information about the NumPy-Discussion mailing list