#8278: cygwin: cvxopt doesn't build on cygwin/windows due to missing complex.h
----------------------+-----------------------------------------------------
Reporter: was | Owner: tbd
Type: defect | Status: new
Priority: major | Milestone: sage-4.3.3
Component: cygwin | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
----------------------+-----------------------------------------------------
Old description:
> Using either cvxopt-0.9.p8 (in sage-4.3.3) or cvxopt-1.1.2.p2, which is
> at http://boxen.math.washington.edu/home/schilly/sage/spkg/, we get this
> huge error very quickly upon trying to build:
>
> {{{
> building 'base' extension
> creating build/temp.cygwin-1.7.1-i686-2.6
> creating build/temp.cygwin-1.7.1-i686-2.6/C
> gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
> -I/home/wstein/build/sage-4.3.3.alpha0/local/include/python2.6 -c
> C/base.c -o build/temp.cygwin-1.7.1-i686-2.6/C/base.o
> In file included from C/base.c:23:
> C/cvxopt.h:29:21: error: complex.h: No such file or directory
> In file included from C/base.c:24:
> C/misc.h:29: error: expected specifier-qualifier-list before ‘complex’
> C/base.c:58: error: ‘complex’ undeclared here (not in a function)
> C/base.c: In function ‘write_znum’:
> }}}
>
> IDEAS:
>
> 1. Look for complex.h on this page:
> http://www.cygwin.com/ml/cygwin/2006-07/threads.html#00763 That has some
> ideas.
>
> 2. I think Mike Hansen said that he recently released (then
> unreleased!?) numpy-1.4 had a drop-in complex.h?
New description:
Using either cvxopt-0.9.p8 (in sage-4.3.3) or cvxopt-1.1.2.p2, which is at
http://boxen.math.washington.edu/home/schilly/sage/spkg/, we get this huge
error very quickly upon trying to build:
{{{
building 'base' extension
creating build/temp.cygwin-1.7.1-i686-2.6
creating build/temp.cygwin-1.7.1-i686-2.6/C
gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
-I/home/wstein/build/sage-4.3.3.alpha0/local/include/python2.6 -c C/base.c
-o build/temp.cygwin-1.7.1-i686-2.6/C/base.o
In file included from C/base.c:23:
C/cvxopt.h:29:21: error: complex.h: No such file or directory
In file included from C/base.c:24:
C/misc.h:29: error: expected specifier-qualifier-list before ‘complex’
C/base.c:58: error: ‘complex’ undeclared here (not in a function)
C/base.c: In function ‘write_znum’:
}}}
IDEAS:
1. Look for complex.h on this page:
http://www.cygwin.com/ml/cygwin/2006-07/threads.html#00763 That has some
ideas.
2. I think Mike Hansen said that he recently released (then unreleased!?)
numpy-1.4 had a drop-in complex.h?
--
Comment(by was):
I put in some fake #defines to get past the complex.h import problem.
Then linking fails due to no libcblas.
{{{
gcc -shared -Wl,--enable-auto-image-base
build/temp.cygwin-1.7.1-i686-2.6/C/base.o
build/temp.cygwin-1.7.1-i686-2.6/C/dense.o
build/temp.cygwin-1.7.1-i686-2.6/C/sparse.o
-L/home/wstein/build/sage-4.3.3.alpha0/local/lib
-L/home/wstein/build/sage-4.3.3.alpha0/local/lib/python2.6/config -lm
-llapack -lcblas -lf77blas -latlas -lgfortran -lpython2.6 -o
build/lib.cygwin-1.7.1-i686-2.6/cvxopt/base.dll
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld:
cannot find -lcblas
collect2: ld returned 1 exit status
}}}
Changing the libraries= line in setup.py to
{{{
libraries = ['m','lapack','blas','gfortran']
}}}
(like it is for OS X) gets past this problem.
I think it may be easy to implement complex.h, at least enough for cvxopt,
just using what is in GSL... since cvxopt doesn't need much.
To get cvxopt to build, I replaced all references to atlas and cblas by
"blas". This *did* work. I've attached my hacked setup.py (based on
the one in cvxopt-1.1.2.p2) to this ticket just 'cause:
{{{
/home/wstein/build/sage-4.3.3.alpha0
sage subshell$ python
Python 2.6.4 (r264:75706, Feb 12 2010, 22:06:32)
[GCC 4.3.4 20090804 (release) 1] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cvxopt
>>>
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8278#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.