Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#14447 closed defect (fixed)

Add Cygwin as supported platform

Reported by: jdemeyer Owned by: tbd
Priority: major Milestone: sage-5.9
Component: porting: Cygwin Keywords: cygwin prereq
Cc: Merged in: sage-5.9.rc0
Authors: Jean-Pierre Flori, Jeroen Demeyer Reviewers: Jeroen Demeyer, Jean-Pierre Flori
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by jdemeyer)

The prereqs were not sufficiently modified in #14406 to build Sage on Cygwin without setting SAGE_PORT.

Apply trac_14447-case-v2.patch to SAGE_ROOT.

Attachments (5)

trac_14447-uname.patch (1.4 KB) - added by jpflori 7 years ago.
uname solution
trac_14447-echo.patch (1.4 KB) - added by jpflori 7 years ago.
echo solution
trac_14447-sed.patch (1.4 KB) - added by jpflori 7 years ago.
sed solution
trac_14447-case.patch (9.3 KB) - added by jpflori 7 years ago.
case solution
trac_14447-case-v2.patch (5.8 KB) - added by jdemeyer 7 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 7 years ago by jpflori

  • Description modified (diff)
  • Keywords cygwin added

Changed 7 years ago by jpflori

uname solution

Changed 7 years ago by jpflori

echo solution

Changed 7 years ago by jpflori

sed solution

Changed 7 years ago by jpflori

case solution

comment:2 Changed 7 years ago by jpflori

  • Description modified (diff)
  • Status changed from new to needs_review

Ok, I've put up four different patches which should achieve the same goal :

  • the uname, echo and sed version make minimal changes by modifying UNAME on Cygwin only using the corresponding command to detect we are on Cygwin (uname was suggested by Jeroen on #14406, echo avoid recalling uname, sed is what is used in sage/bin/sage-env to modify UNAME on Cygwin)
  • the case version does not modify UNAME but replace the if/elif/elif/.../else construction used to filter OSes by a case statement.

This last one is my preferred one, but I'll let Jeroen decide.

I tested it on Linux, Cygwin and Solaris this time, so the patches should be fine.

Changed 7 years ago by jdemeyer

comment:3 Changed 7 years ago by jdemeyer

  • Description modified (diff)
  • Keywords prereq added

I made a new patch based on yours, needs review. I also simplified the CYGWIN handling in sage-env.

comment:4 Changed 7 years ago by jdemeyer

It is obviously vital that this actually tested on Cygwin.

comment:5 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:6 follow-ups: Changed 7 years ago by jpflori

This still works fine on Linux and Cygwin.

Just a remark about SunOS release filtering. According to Wikipedia, there are 4.1.x releases and a 5.5.1 whence the filtering I used, i.e. only keep 5.1[0-9]* thinking that would be enough for the next decade unless Oracle decides to go for 6.x. But I guess nobody will ever try to build Sage on 4.1.x or 5.5.1 so it's not that problematic. Not even sure more than a couple of people actually build it for actual usage on 5.10 and 5.11...

And I guess there is a spurious space at the end of

export UNAME=`uname | sed 's/CYGWIN.*/CYGWIN/' ` 

comment:7 Changed 7 years ago by jpflori

And obviously there are even older version of SunOS before the distribution was rebranded as Solaris 1.x :)

comment:8 in reply to: ↑ 6 Changed 7 years ago by jdemeyer

Replying to jpflori:

And I guess there is a spurious space

That's intentional for better readability.

comment:9 in reply to: ↑ 6 Changed 7 years ago by jdemeyer

Replying to jpflori:

According to Wikipedia, there are 4.1.x releases and a 5.5.1 whence the filtering I used, i.e. only keep 5.1[0-9]* thinking that would be enough for the next decade unless Oracle decides to go for 6.x. But I guess nobody will ever try to build Sage on 4.1.x or 5.5.1 so it's not that problematic. Not even sure more than a couple of people actually build it for actual usage on 5.10 and 5.11...

Exactly, I wouldn't worry about SunOS/Solaris versions too much. I think it's more important that future versions correctly, than that we catch older non-working versions.

comment:10 Changed 7 years ago by jpflori

  • Authors changed from Jean-Pierre Flori to Jean-Pierre Flori, Jeroen Demeyer
  • Reviewers changed from Jeroen Demeyer to Jeroen Demeyer, Jean-Pierre Flori
  • Status changed from needs_review to positive_review

Thanks for your answers. Both make sense, so positive review.

comment:11 Changed 7 years ago by jdemeyer

  • Merged in set to sage-5.9.rc0
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:12 Changed 7 years ago by kcrisman

Thanks for this! I had to give my faster Windows box back so hadn't actually seen this.

Note: See TracTickets for help on using tickets.