wiki:CygwinPort

Version 97 (modified by kcrisman, 10 years ago) (diff)

--

Information for the port to Cygwin

  • Below are the list of prerequisites, bug fixes/upgrades needed for Cygwin to build, and doctest tickets for Cygwin
  • Closed tickets and some other information, like how to mark Cygwin-specific parts in C, are at the end
  • Although below it compares Windows 7 and Windows XP, it is conceivable that the Cygwin version also sometimes has something to do with the problems listed

Cygwin Prerequisites

These Cygwin packages need to be installed in order for the Sage build to complete. Eventually, these should be added to prereq, but that would be for when Cygwin is actually supported.

  • file, liblapack, liblapack0, liblapack-devel
  • Windows 7 additional requirements
    • patch (at least on Windows 7 building Sage's spkg patch fails, see #11232)
    • libncurses-devel (to build Singular)
    • probably libiconv
    • probably openssl (in order to build libgpg-error)
  • Reminders for compilers
    • Don't forget fortran
    • Make sure you download all gcc and g++ so the versions match
  • Useful other things to install, especially on a minimal install of Cygwin
    • gcc, make, m4, perl are needed
    • not needed but very useful are ssh and scp
    • similarly and nano or vim or something to edit files with

At any point in the build process (or after), changes in Windows (such as antivirus upgrades) can lead to forking problems, and you may need to rebase. See these build notes of William's for a fairly effective strategy to deal with this.

Build Tickets

  • #6743: An old metaticket for exactly this, which now points here. Can be closed when Sage builds out of the box with the prerequisites above.

Win 7 only

  • #11245: on Win7 tar does not unpack cddlib and networkx spkg's right. See the ticket for a workaround.
  • #11232: patch spkg should not be installed, use Cygwin's (needs review)
  • #11550: Singular does not build (see also the older #10235, which may or may not still be valid)
  • Issue with Python 2.6.4 building. Relevant comments:
    • Comment 0 - Original report, from March 2010, at http://groups.google.com/group/sage-windows/browse_thread/thread/88499b995a22ecc1
    • Comment 1 - I had no problems with that thus far in Vista Premium 32-bit - Alec Mihailovs
    • Comment 2 - Alec - Win7 has a newer codebase, so this is not really a proof that we need not worry --- I think we really need to. Dmitrii
    • Comment 3 (from somebody) "obsolete, as Cygwin now has Python 2.6.5 as the standard" - true, but apparently still a problem for us
    • Comment 4 - Python spkg builds fine on XP - kcrisman
    • Comment 5 - Tried this fix on Win7 after it failed on the first extension, but it failed in the next extension after that. Rebasing everything in $SAGE_ROOT seemed to fix that, however, so this remains an open issue.

Win XP only or both

  • #11246: flint-1.5.0.p5 extraneous #includes break typedef ulong (needs review)
  • #11119: ECL 11.1.1 fails on Cygwin (patches fixing the issues given on the ticket)
  • #10240: pari-2.4.3.svn-12577.p9 incorrectly checks for the shared library on Cygwin (should be fixed by #11130)
  • #11494: libblas.dll.a is not copied to $SAGE_LOCAL/lib when ATLAS is "installed" (breaks linbox) (should be fixed by #10226)
  • #11504: Tachyon fails to build due to same failure that was fixed in #7335.
  • #11547: The following files need to be copied "libcliquer.dll -> libcliquer.so", "libflint.dll -> libflint.so", "libntl.dll.a -> libntl.dll"
  • #11497: Twisted sometimes doesn't build
  • #11499: sage/rings/factorint needs gmp as a dependency
  • Maxima
    • #11502: Maxima fails to build on Cygwin on XP
      • Though Maxima did build (precisely) once out of a number of tries on XP lately
    • #11260: ECL-11.1.1 fails to compile maxima on WIndows 7 / Cygwin 1.7.9 (really stuck here :-( )
      • Though Maxima did build once on one Windows 7 machine recently
    • #8269: Maxima doesn't build on XP (but apparently this should be closed?)

Getting Sage to start

  • #11551: Pari segfault on startup (use Windows 7 to recreate if possible, because the traceback is nice and you don't need sage - gdb to see it)
    • This seems to be related to defining Pynac's I, but the final trace is moving an mpfr number to pari

Doctest Tickets

  • #9162 -- pynac.pyx use double precision special functions instead of long double (REVISITED)
  • #9165 -- lcalc does not work for elliptic curves on cygwin
  • #9167 -- importing sage.libs.ecl yields a "no such process" error
  • #9168 -- ratpoints does not work correctly
  • #9169 -- a cachefunc.py doctest hangs seemingly forever
  • #9170 -- get_memory_usage isn't implemented, e.g., because there's no top
  • #9171 -- some test failures in sagedoc.py
  • #9172 -- numerical noise in sage/rings/integer.pyx
  • #9173 -- BSD.py tests behave differently on cygwin, so need to be written to reflect that
  • #9174 -- robert miller's 2-descent is completely broken on cygwin
  • #9176 -- various heegner_index errors involving interval arithmetic on cygwin

Closed

  • #9845: lcalc doesn't build on cygwin due to missing time.h include
  • #9776: Cygwin: GLPK extension module needs to be more explicit in its linking (positive review)
  • #9146: cygwin: gd doesn't correctly link in libpng with sage-4.4.3.
  • #8257: gd needs a better version of expr
  • #7319: gdmodule fails
  • #7321: numpy fails to build on cygwin due to not using the correct fortran compiler
  • #8780: Add cephes spkg for Cygwin (provides complex.h amongst other things)
  • #8192: PolyBoRi needs png12 and z to build on Cygwin.
  • #8782: pari does not work under Cygwin
  • #8907: Python should be build with enable-shared
  • #9050: libntl.dll should be libntl.dll.a
  • #8542 / #8903: Pynac needs to use a function pointer table.
  • #7337: PolyBoRi fails to build on cygwin
  • libflint.dll needs to be libflint.so, or polynomial_integer_dense_flint.pyx needs to know to use the .dll (maybe not a real issue, let's wait an see on this one).
  • #8642: port detection for the notebook does not work in Cygwin
  • #8855: sage-env needs to be updated for Cygwin
  • #8853: fix M_PI_4 in complex_double on Cygwin
  • #8852: minor doctest fix in fast_eval.pyx for Cygwin
  • #8850: Cython should link against BLAS instead of ATLAS on Cygwin
  • #8849: the palp interface throws a (harmless?) OSError on Cygwin
  • #8848, #8847, #8846, #8845, #8844, #8843
  • #9067: boehm_gc (still) fails to build on Cygwin
  • #9166 -- sympow does not work on cygwin (This should be fixed by the patches made for Solaris x86 - see #9703)
  • #9154: BoehmGC again!
  • #10247: Sage 4.6 has PARI problems on Cygwin
  • #11167: Sage 4.7.alpha3 library doesn't build under Cygwin
  • #9163 -- output of a subtle test in expect.py differs slightly on cygwin

how to mark CYGWIN-specific parts in code

gcc on CYGWIN defines a variable __CYGWIN__. So you can use it to #if(n)def stuff.

old Cygwin binaries

(Old) Cygwin prebuilt sage binaries for cygwin are here: http://sage.math.washington.edu/home/wstein/binaries/cygwin/