Re: [Numpy-discussion] Compilation problems npy_float64

2015-11-07 Thread Sturla Molden
Johan  wrote:

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

I think I introduced this error when moving a global variable from the
Cython module to a C++ module. The name collision with math.h was silent on
Linux, Mac, and Windows (MinGW and MSVC) -- or not even present --, and
thus went under the radar. But it eventually showed up on SunOS, and now
also on Cygwin. :-(

My apologies.

Anyhow, it should be gone now. Try SciPy master.


Sturla

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Compilation problems npy_float64

2015-11-05 Thread Pauli Virtanen
Thu, 05 Nov 2015 16:26:18 +, Johan kirjoitti:
> Hello, I searched the forum, but couldn't find a post related to my
> problem.  I am installing scipy via pip in cygwin environment
[clip]
> /usr/include/math.h:263:15: note: previous declaration ‘double
> infinity()’
>  extern double infinity _PARAMS((void));
>^
[clip]

This looks like some Cygwin weirdness --- a variable called
"infinity" is apparently there declared by math.h, and thus
a reserved name.

This was fixed by (but not for this reason)
https://github.com/scipy/scipy/commit/832baa20f0b5
so you may have better luck with the dev version.

-- 
Pauli Virtanen

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion


[Numpy-discussion] Compilation problems npy_float64

2015-11-05 Thread Johan

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_p