progress on cygwin port!

11 views
Skip to first unread message

William Stein

unread,
Oct 24, 2009, 7:11:52 PM10/24/09
to sage-windows, sage-devel, Martin Albrecht, Peter Brook
Hi,

I was reading through the Cygwin User's Guide today and decided to try
again to try to get Sage to startup on Cygwin. I took my 4.1 build
(see http://trac.sagemath.org/sage_trac/ticket/6743 for links to
tickets and patches needed to get this to build), and was able to get
it start up (finally) and half the sage library to load, *including*
libsingular:

bash-3.2$ ./sage
----------------------------------------------------------------------
| Sage Version 4.1, Release Date: 2009-07-09 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
Unable to start gap
sage: 2 + 3
5
sage: type(2)
<type 'sage.rings.integer.Integer'>
sage: time n=factorial(10^6)
CPU times: user 1.38 s, sys: 0.43 s, total: 1.81 s
Wall time: 1.81 s
sage: os.uname()
('CYGWIN_NT-5.1', 'WINXP3', '1.5.25(0.156/4/2)', '2008-06-12 19:34', 'i686')
sage: R.<x,y,z> = QQ[]
sage: f = (x+y+z+1)^2; f
x^2 + 2*x*y + y^2 + 2*x*z + 2*y*z + z^2 + 2*x + 2*y + 2*z + 1
sage: type(f)
<type 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular'>


-----

In particular, libsingular appears to be totally rock solid on cygwin!
This is exciting because libsingular was *the* reason I (stupidly)
stopped support for Cygwin back in early 2007.

There is still a huge amount of work left to fully port Sage to
Cygwin. However, I'm 100% confident it is possible, do-able, and very
maintainable once the port is done. Regarding maintainability, Ondrej
Certik and I even setup 3 Windows XP virtual machines with ssh access
on boxen, so it is easy to work on the port.

Finishing the port will be a massive amount of work, though vastly
less work than an MSVC port. I'm posting this mainly because I
don't personally want to do all that work myself. Help wanted.

If you're very serious about helping, I can make an account for you on
one of these virtual machines, or even just make you a complete
virtual machine. The importance of being able to work remotely is
the autoconf parts of building sage on cygwin are quite slow.

For the record, I'll post a binary of my cygwin sage that starts here:
http://sage.math.washington.edu/home/wstein/tmp/cygwin/

William


--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

William Stein

unread,
Oct 24, 2009, 10:30:20 PM10/24/09
to sage-windows, sage-devel, Martin Albrecht, Peter Brook
On Sat, Oct 24, 2009 at 4:11 PM, William Stein <wst...@gmail.com> wrote:
> Hi,
>
> I was reading through the Cygwin User's Guide today and decided to try
> again to try to get Sage to startup on Cygwin.  I took my 4.1 build
> (see http://trac.sagemath.org/sage_trac/ticket/6743 for links to
> tickets and patches needed to get this to build), and was able to get
> it start up (finally) and half the sage library to load, *including*
> libsingular:
>
> bash-3.2$ ./sage

...

and here's a screenshot of the Sage notebook running natively (no
virtual machines or anything):

http://wstein.org/home/wstein/tmp/sagenbwin.png

William

Robert Bradshaw

unread,
Oct 25, 2009, 12:36:34 AM10/25/09
to sage-...@googlegroups.com, sage-windows, Martin Albrecht, Peter Brook

Cool! I'm (very pleasantly) surprised we were so close. (Not to
diminish your work, but I thought we were at least a week or two of
solid work to get to this point...and I realize there's still a lot
ahead.)

Regarding maintainability, how much will the typical Sage developer
have to know about/test on Cygwin to keep the port solid?

- Robert

William Stein

unread,
Oct 25, 2009, 2:32:39 AM10/25/09
to sage-w...@googlegroups.com, sage-...@googlegroups.com, Martin Albrecht, Peter Brook
On Sat, Oct 24, 2009 at 9:36 PM, Robert Bradshaw
<robe...@math.washington.edu> wrote:
>
> On Oct 24, 2009, at 7:30 PM, William Stein wrote:
>
>> On Sat, Oct 24, 2009 at 4:11 PM, William Stein <wst...@gmail.com>
>> wrote:
>>> Hi,
>>>
>>> I was reading through the Cygwin User's Guide today and decided to
>>> try
>>> again to try to get Sage to startup on Cygwin.  I took my 4.1 build
>>> (see http://trac.sagemath.org/sage_trac/ticket/6743 for links to
>>> tickets and patches needed to get this to build), and was able to get
>>> it start up (finally) and half the sage library to load, *including*
>>> libsingular:
>>>
>>> bash-3.2$ ./sage
>>
>> ...
>>
>> and here's a screenshot of the Sage notebook running natively (no
>> virtual machines or anything):
>>
>> http://wstein.org/home/wstein/tmp/sagenbwin.png
>
> Cool! I'm (very pleasantly) surprised we were so close. (Not to
> diminish your work, but I thought we were at least a week or two of
> solid work to get to this point...and I realize there's still a lot
> ahead.)

There is a huge amount ahead. It's not impossible though. But at
least it is reasonable at this point to imagine working with a real
Sage, which is always much nicer than an imaginary one.

> Regarding maintainability, how much will the typical Sage developer
> have to know about/test on Cygwin to keep the port solid?

Probably about 4 hours reading the following relatively well-written document:

http://cygwin.com/cygwin-ug-net/

Plus, something we would add to that about Sage-specific issues (e.g.,
with library paths, dll, etc.), which would probably be an additional
1-2 hour read.

William

Ondrej Certik

unread,
Oct 25, 2009, 2:56:13 AM10/25/09
to sage-w...@googlegroups.com, sage-devel
On Sat, Oct 24, 2009 at 4:11 PM, William Stein <wst...@gmail.com> wrote:
>

Great job. Just curious --- does sage build without Cygwin segfaulting
on the way for you?

Because when I build FEMhub, which is much smaller than Sage, my
cygwin on my windows 7 can't handle it and segfaults. I then just have
to restart the windows (maybe there is some shortcut), go back to
cygwin and type "make", then it finishes.

Ondrej

William Stein

unread,
Oct 25, 2009, 3:02:31 AM10/25/09
to sage-w...@googlegroups.com, sage-devel

No, it doesn't segfault.

> Because when I build FEMhub, which is much smaller than Sage, my
> cygwin on my windows 7 can't handle it and segfaults. I then just have
> to restart the windows (maybe there is some shortcut), go back to
> cygwin and type "make", then it finishes.

Maybe Cygwin is still buggy on Windows 7? The Cygwin webpage says
"Note that the official support for Windows 95, Windows 98, and
Windows Me will be discontinued with the next major version (1.7) of
Cygwin, which is in beta testing right now. Note that Windows 7 and
later will only be supported starting with the 1.7 version of Cygwin."

So it sounds like support for windows 7 is "beta".

-- William

kcrisman

unread,
Oct 26, 2009, 2:13:22 PM10/26/09
to sage-windows

Hi,
I'd like to test this on my Mac, using Parallels with NT - I'm very
interested in testing, though I have no expertise to develop. Do I
have to download something for the Cygwin, or just the binary that's
at http://sage.math.washington.edu/home/wstein/tmp/cygwin/?
Thanks,
- kcrisman

William Stein

unread,
Oct 26, 2009, 2:28:59 PM10/26/09
to sage-w...@googlegroups.com

You have to install Cygwin. You can try downloading that binary and
extracting it under Cygwin. It probably won't work unless you install
sufficiently many Cygwin packages (since probably the Sage binary
links against them), and I'm not sure which are required.

-- William

kcrisman

unread,
Oct 28, 2009, 1:25:28 PM10/28/09
to sage-windows


On Oct 26, 2:28 pm, William Stein <wst...@gmail.com> wrote:
> On Mon, Oct 26, 2009 at 11:13 AM, kcrisman <kcris...@gmail.com> wrote:
>
> > Hi,
> > I'd like to test this on my Mac, using Parallels with NT - I'm very
> > interested in testing, though I have no expertise to develop.  Do I
> > have to download something for the Cygwin, or just the binary that's
> > athttp://sage.math.washington.edu/home/wstein/tmp/cygwin/?
>
> You have to install Cygwin.   You can try downloading that binary and
> extracting it under Cygwin.  It probably won't work unless you install
> sufficiently many Cygwin packages (since probably the Sage binary
> links against them), and I'm not sure which are required.

I just installed everything they offered, which was quite a lot of
familiar stuff that Sage uses.

But I can't figure out what to do with the file from your site. If I
unzip it on the Mac and try to move it to the Windows side, it stops
because it can't find libcsage.so; if I unzip it on the Windows side
or just leave it alone, I'm not sure what I have to do to "open" it
with Cygwin. Any ideas?

Sorry these questions are so newbie.

- kcrisman

William Stein

unread,
Oct 28, 2009, 1:54:07 PM10/28/09
to sage-w...@googlegroups.com

Start cygwin and type

tar xvf sage-4.1-cygwin-i686-CYGWIN_NT-5.1.tar.gz

william

kcrisman

unread,
Oct 28, 2009, 2:37:45 PM10/28/09
to sage-windows


>
>    tar xvf      sage-4.1-cygwin-i686-CYGWIN_NT-5.1.tar.gz

Yes, although I had used Winzip before. What I meant is, what do I do
with it once it's untarred? Just sage-...-5.1/sage as usual? But
then I get the following as it tries to run sage-env:

cat: /bin/sage-banner: No such file or directory
/usr/bin/env: sage.bin: No such file or directory

Again, sorry for these questions; I don't understand the file
structure on Windows or Cygwin very well. Do I need to move this
installation somewhere else?

- kcrisman

William Stein

unread,
Oct 28, 2009, 2:41:28 PM10/28/09
to sage-w...@googlegroups.com

I think you should just give up. Sage on Cygwin isn't even close to
done or "ready for testing". Thanks for trying though.

William

Reply all
Reply to author
Forward
0 new messages