Opened 7 years ago
Closed 7 years ago
#13799 closed defect (fixed)
cvxopt needs to link against gmp/mpir on 32-bit Windows XP Cygwin
Reported by: | kcrisman | Owned by: | tbd |
---|---|---|---|
Priority: | major | Milestone: | sage-5.6 |
Component: | porting: Cygwin | Keywords: | |
Cc: | jpflori | Merged in: | sage-5.6.beta2 |
Authors: | Jean-Pierre Flori | Reviewers: | Karl-Dieter Crisman |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
As in the summary. Lots of undefined reference to
messages about things like __imp____gmpq_clear
and the like.
Use spkg at http://boxen.math.washington.edu/home/jpflori/cvxopt-1.1.5.p0.spkg
It adds back the glpk needed dependencies removed at #13160.
Attachments (1)
Change History (12)
comment:1 Changed 7 years ago by
comment:2 Changed 7 years ago by
Maybe. We do
# Set to 1 if you are installing the glpk module. -BUILD_GLPK = 0 +BUILD_GLPK = 1
in setup.py.patch, and got rid of
- if BUILD_GLPK: -- glpk = Extension('glpk', libraries = ['glpk'], -+ glpk = Extension('glpk', libraries = libraries+['glpk', 'gmp', 'z'], - include_dirs = [ GLPK_INC_DIR ], -- library_dirs = [ GLPK_LIB_DIR ], -+ library_dirs = libdirs + [ GLPK_LIB_DIR ], - sources = ['C/glpk.c'] ) - extmods += [glpk]; -
but Cygwin is notoriously finicky about extensions, so maybe we need to add this back in. Have you seen any problems at all on Windows 7? Maybe
# Directory containing libglpk (used only when BUILD_GLPK = 1). -GLPK_LIB_DIR = '/usr/lib' +GLPK_LIB_DIR = SAGE_LIB # Directory containing glpk.h (used only when BUILD_GLPK = 1). -GLPK_INC_DIR = '/usr/include' +GLPK_INC_DIR = SAGE_INCLUDE
is sufficient there, if those are even relevant here (are they where it is put, or where it looks for things it depends on?).
comment:3 Changed 7 years ago by
The fix is just to add back gmp and z as dependencies for glpk, or I guess so, more or less as your first solution proposes. Your second solution won't work (or could but that's not a good idea, it will use the system gmp I guess). I've got a quite working spkg, but will only post it tomorrow, too late for today.
comment:4 Changed 7 years ago by
Sorry, the "second" thing is already in there, so that we use the Sage include and lib directories. I am more or less suggesting that we add
+ if BUILD_GLPK:
+- glpk = Extension('glpk', libraries = ['glpk'],
++ glpk = Extension('glpk', libraries = libraries+['glpk', 'gmp', 'z'],
+ include_dirs = [ GLPK_INC_DIR ],
+- library_dirs = [ GLPK_LIB_DIR ],
++ library_dirs = libdirs + [ GLPK_LIB_DIR ],
+ sources = ['C/glpk.c'] )
+ extmods += [glpk];
+
back in the patch file, or at least I think so, at least if __CYGWIN__
is defined.
comment:5 Changed 7 years ago by
- Description modified (diff)
- Status changed from new to needs_review
I've uploaded a working spkg at http://boxen.math.washington.edu/home/jpflori/cvxopt-1.1.5.p0.spkg
It adds back the glpk needed dependencies removed at #13160.
comment:6 Changed 7 years ago by
- Reviewers set to Karl-Dieter Crisman
- Status changed from needs_review to positive_review
Just FYI, there are two hunks that succeed but are offset by one line each. Otherwise this seems fine. Builds ok on Mac and sage.math and XP Cygwin, passes tests on the numerical_sage
doc module on Mac and sage.math.
By the way, at some point I also had a p1 spkg that (according to sage-devel list I said that) Volker had made, but I can't find what ticket, if any, that was related to.
comment:7 Changed 7 years ago by
- Status changed from positive_review to needs_work
SPKG.txt
has the wrong version number (cvxopt-1.1.5 instead of cvxopt-1.1.5.p0) and there should be a blank line after
== Changelog ==
comment:8 Changed 7 years ago by
The newly uploaded spkg should be fine.
comment:9 Changed 7 years ago by
- Status changed from needs_work to needs_review
comment:10 Changed 7 years ago by
- Status changed from needs_review to positive_review
comment:11 Changed 7 years ago by
- Merged in set to sage-5.6.beta2
- Resolution set to fixed
- Status changed from positive_review to closed
I guess overlinking was so muchfixed in #13160 it became underlinking.