-
-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade cvxopt in sage from 0.9 to 1.1.3 #6456
Comments
comment:1
Fly in the ointment: The recent version has this statement on its license page http://abel.ee.ucla.edu/cvxopt/copyright.html:
Older versions apparently did not have that. |
comment:2
I've recently upgraded it for me to 1.1.2. The problem is, that the sources from them did not compile on my ubuntu 9.10 machine. So I went to the ubuntu packges db for lucid and grabbed their version. I don't know what they did in their patch, but I guess it's non trivial... My spkg is here. The only remaining modification I had to made to run the examples from the cvxopt website in
to
in Q:
|
comment:3
I've created an updated p1 spkg. Using the 1.1.2 sources directly, I get this error |
comment:4
Ticket #1620 is a duplicate of this one. |
comment:5
Replying to @haraldschilly:
sage -t "devel/sage-work/sage/numerical/optimize.py" bumps out essentially due to:
Can you reproduce this on a stand-alone build of cvxopt? |
Attachment: trac-6456.patch.gz patch for cvxopt-1.1.2.p1/src/src/setup.py |
comment:6
Replying to @haraldschilly:
please check the patch I just uploaded. It fixes this problem; |
comment:7
Replying to @dimpase:
Thanks, I knew that it is something with that! Works now!!! ;) I've uploaded 1.1.1.p2 here Next I'll try if using the debian/ubuntu version of it was really necessary. For everyone who wants to try this, don't forget that you have to disable the preparser in Sage via |
comment:8
Replying to @haraldschilly:
please take out f77blas all over in setup.py, for this is apparently obsolete and not needed - and also nukes the installation on Mac OS X (ppc) -- (otherwise it works on the latter platform) |
comment:9
Replying to @haraldschilly: I think that really what remains to be done is to remove dependencies on
I don't see a necessity to try non-debian/ubunty version.
Does this mean that we should think of importing cvxopt's matrix into Sage under some other name? I don't know what the usual Sage's way to deal with such things, i.e. name clashes between packages, is. |
comment:10
|
comment:11
Replying to @sagetrac-drkirkby:
it is GPL v3 or later. Does it matter?
no, but I can try on one of Skynet's machines (perhaps you can tell me which |
comment:12
You better check the license issue with William. Code should be GPL 2 or GPL2+, but there are exceptions if a package is optional and some other conditions - I've never fully understood under what conditions code can be GLP 3. But you might find you can only use the latest version which is GPL 2, and not a GPL 3 version.
says all code except jsmath is GPL2, and apparently jsmath is ok, as Sage does not link to it. The code will not build on skynet, as there are no SPARC machines there. It should build it on 't2' easily though. I suggest you download sage 4.3.0.1 from one of the mirrors http://www.sagemath.org/download-solaris.html Use the following settings.
type make, and build Sage, then try your package. There is also a binary of Sage on the mirrors. You could download that. I'm not precisely sure what you then need to do to build just your package using the binary as a starting point. The latest Sage source will not build on Solaris, but 4.3.0.1 will. Dave |
comment:13
Replying to @sagetrac-drkirkby:
Well, cvxopt is an optional package, so it must be in the same boat as jmath,
hmm, isn't this a sparc/solaris? SunOS mark2 5.10 Generic_127111-01 sun4u sparc SUNW,Sun-Blade-2500 Dima |
comment:14
Replying to @dimpase:
Fair enough.
Yes, it is. Sorry, I was not aware of the existance of that machine. However, I do not know how the compilers and paths are configured on that machine. You need to have GNU make & GNU tar in your path before the Sun ones, and you need to have the Sun linker (/usr/ccs/bin/ld) in your path before any GNU ones. There are some general instructions on building Sage on Solaris at http://wiki.sagemath.org/solaris which you would need to follow. I've written some somewhat simpler instructions at http://wiki.sagemath.org/devel/Building-Sage-on-the-T5240-t2 on how to build Sage on 't2'. They are simpler, as I have already put the right tools in the right locations. The Sun Blade 2500 (mark2) should be quicker than the T5240 (t2) at building Sage. However it would require some setting up of the build environment to build Sage. If you just want an easy solution, 't2' will just work, albeit not as quickly as the Sun Blade 2500. Dave |
comment:15
Replying to @sagetrac-drkirkby:
well, on Skynet there is /usr/local/skynet_bash_profile I don't have an account on t2, it seems to me. Dima |
comment:16
Replying to @sagetrac-drkirkby:
I emailed William about this, and he said it's OK in this case, it can be v3. |
comment:17
Replying to @dimpase:
I'm not however aware of anyone building Sage on there recently, so I don't know if the environment is set up suitably. Quite a few Solaris-specific changes have been made in the last year, and some of them might not be compatible with the build system on there. I don't know. Specifically, if
shows gcc was configured with the GNU linker, then the GNU linker must be in your path before the Sun linker. (Basically, whatever linker gcc uses, must be in your path first, as some code makes the assumption the first linker in your path is the one gcc uses, which might not be true.) I'm not aware of a foolproof test of this. There should be something like
if the Sun linker was used, or
if the GNU linker was used. Certainly, I've never had a problem with gnutls failing on 't2'.
I've emailed William to ask if you can have an account on t2, as that might be the simplest solution, though that Blade 2500 would be significantly faster than 't2'.
I can see your point about upgrading, though I'm not aware of any particular issues with the version in Sage. That version will build on Solaris. You could try appending /usr/sfw/lib to your LD_LIBRARY_PATH. I have known of issues with gnutls on OpenSolaris, but not on Solaris 10. I see your post about the GPL 3. That bit is sorted out then. Dave |
comment:18
Replying to @dimpase:
Here is an updated version, that also works on Solaris (this needed copying sun_complex.h from old cvxopt-0.9 http://boxen.math.washington.edu/home/dima/packages/cvxopt-1.1.2.p3.spkg |
changes for the doctested examples in the numerical_sage section for cvxopt |
comment:154
Attachment: 6456-numerical_sage_cvxopt-with-updated-commitmessage.patch.gz Replying to @jdemeyer:
AUB |
Merged: sage-4.6.1.alpha2 |
comment:156
There's a failure with 4.6.1.alpha2 on Skynet's iras (ia64-Linux-suse): $ ./sage -t -long -force_lib devel/sage/doc/en/numerical_sage/cvxopt.rst
sage -t -long -force_lib "devel/sage/doc/en/numerical_sage/cvxopt.rst"
**********************************************************************
File "/tmp/sage_iras/sage-4.6.1.alpha2/devel/sage/doc/en/numerical_sage/cvxopt.rst", line 129:
sage: print sol['x'] # ... below since can get -00 or +00 depending on architecture
Expected:
[ 1.00e+00]
[ 1.00e+00]
Got:
[ 1.00e-00]
[ 1.00e+00]
<BLANKLINE> |
Attachment: 10309_cvxopt_doctest.patch.gz |
comment:158
Is there anything else that needs to happen for this to get positive review? I'm unclear on how spkgs merged before positive review finally do get positive review. |
comment:159
Replying to @kcrisman:
Somebody should look at the spkg, check that |
comment:160
Replying to @jdemeyer:
Being an author, I am biased, but I think it has been reviewed over and over to near-death already, and found sound enough :-) |
comment:161
Replying to @dimpase:
Of course! I have a brief question about the patches. The Solaris one and the init one seem fine, and most of the setup.py makes sense for finding Sage-specific things. I do have a question about Also, in SPKG.txt there is a spelling "enchance" instead of "enhance", and "recongnision" instead of "recognition". Everything else seems to make sense, though I should note I am not a shell script or install expert :) Still, with no problems reported on 4.6.1.alpha2, perhaps it's time for positive review once those things get resolved. |
comment:162
Replying to @kcrisman:
Fixed. A leftover from times when GLPK was still optional. Now GLPK is standard.
fixed.
OK so the fixes are in the spkg file in the same location. Thanks for your time, Dima |
comment:163
Okay, these were just cosmetic changes, and I verified they are in the updated spkg, and it's been tested at a basic level without destroying Sage for a while now, so this should go in. |
comment:164
Since the package is not pure upstream and contains pacthes, I believe it should be renamed to |
comment:165
Replying to @jdemeyer:
I thought this had been debated on sage-devel before, and William's opinion is that it should not be .p0. There's noting in the Sage Developers Guide to say it should be either. As such, I don't think that this is a reasonable reason for putting the ticket to needs work. Dave |
comment:166
Replying to @jdemeyer:
I believe the opposite, and was specifically indoctorinated into my belief when I was updating GAP and its GAP-packages spkgs. |
We are shipping an ancient version of cvxopt in sage. It's worse than Debian shipping sage-3.0.5!
Note that upgrading cvxopt should be fairly easy, since basically nothing in Sage depends on cvxopt.
New spkg: http://sage.math.washington.edu/home/dima/packages/cvxopt-1.1.3.spkg
and the patch to use the interface to GLPK : https://github.com/sagemath/sage/files/ticket6456/6456-cvxopt-glpk-interface.patch.gz
Upstream: Completely fixed; Fix reported upstream
Component: packages: standard
Author: Harald Schilly, Dmitrii Pasechnik
Reviewer: Mike Hansen, Karl-Dieter Crisman
Merged: sage-4.6.1.alpha2
Issue created by migration from https://trac.sagemath.org/ticket/6456
The text was updated successfully, but these errors were encountered: