Opened 8 years ago

Last modified 8 years ago

#14406 closed enhancement

Various prereq fixes — at Version 24

Reported by: jdemeyer Owned by: drkirkby
Priority: major Milestone: sage-5.9
Component: porting Keywords:
Cc: jdemeyer, leif, jpflori Merged in:
Authors: Jeroen Demeyer Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by jpflori)

  • Allow Sage to build on Cygwin without setting SAGE_PORT.
  • Don't check for sqrtl() which is apparently not needed (Cygwin doesn't have it, yet Sage builds).
  • Remove all checks for the deprecated variable SAGE_FORTRAN_LIB.
  • Remove AC_ARG_VAR(SAGE_FORTRAN) which is a deprecated variable.
  • Check for tar before actually untarring the prereq tarball (originally #14407), only do these checks if SAGE_PORT is unset.

Copy http://boxen.math.washington.edu/home/jdemeyer/spkg/prereq-1.2.tar.gz to spkg/base (diff)

Apply trac_14406+reviewer-v2.patch

Change History (26)

comment:1 Changed 8 years ago by jdemeyer

  • Description modified (diff)

comment:2 Changed 8 years ago by jdemeyer

  • Authors set to Jeroen Demeyer
  • Cc jdemeyer leif jpflori added
  • Component changed from porting: Cygwin to porting
  • Description modified (diff)
  • Owner changed from tbd to drkirkby
  • Summary changed from Update prereq for Cygwin to Various prereq fixes

comment:3 Changed 8 years ago by jdemeyer

  • Description modified (diff)

comment:4 Changed 8 years ago by jdemeyer

  • Description modified (diff)

Changed 8 years ago by jdemeyer

comment:5 Changed 8 years ago by jdemeyer

  • Status changed from new to needs_review

comment:6 Changed 8 years ago by jpflori

In the prereq install script, the Solaris part could be a little bit polished. The first sentence includes a disturbing also:

You MUST also use the GNU version of tar...

whereas nothing precedes it.

I don't really like the fact that both tar and make are tested together in the constructions

if [ -f "/usr/sfw/bin/gtar" ]  && [ -f "/usr/sfw/bin/gmake" ] ; then

The only advantage of doing this is to easily suggest to do

   echo "$ mkdir \$HOME/bins-for-sage" 
   echo "$ cp /usr/sfw/bin/gmake \$HOME/bins-for-sage/make" 
   echo "$ cp /usr/sfw/bin/gtar \$HOME/bins-for-sage/tar" 
   echo "$ export PATH=\$HOME/bins-for-sage:\$PATH" 

I think we'd better split the two tests, i.e. only check for tar in the tar part and for make in the make part. At worst, a naive user will have to run make twice before it passes the prereq checks and will have twice $HAME\bins-for-sage in its PATH.

There are also ugly double spaces before "&&" on the (new) lines 132 and 165 :)

comment:7 Changed 8 years ago by jpflori

We could also include the Solaris parts together with the HP-UX and other strange Unix oses as elif clauses a little down below.

That may look nicer and prevent running "tar --version" twice.

If so, the commented out comments will need just a little rewriting and relocation.

comment:8 Changed 8 years ago by jdemeyer

OK, making changes...

comment:9 follow-ups: Changed 8 years ago by leif

Didn't we want to replace the check for sqrtl() by a check for ?gammal()? (OTOH I don't recall why exactly... ;-) )

Actually, we need both sqrtl() and [lt]gammal() unless we build Cephes, i.e., unless we're on Cygwin(?) or on FreeBSD, or skip the test because SAGE_PORT is set.

comment:10 Changed 8 years ago by kcrisman

Also recall we still don't have logl (#14078) and so things are still weird, though we worked around it there. But I don't have a problem with the Cygwin stuff here; Sage builds as is on Cygwin. I think David originally added that check just to make sure one didn't need stuff like Cephes, but apparently we don't actually use sqrtl() and friends.

comment:11 in reply to: ↑ 9 Changed 8 years ago by jpflori

Replying to leif:

Didn't we want to replace the check for sqrtl() by a check for ?gammal()? (OTOH I don't recall why exactly... ;-) )

Actually, we need both sqrtl() and [lt]gammal() unless we build Cephes, i.e., unless we're on Cygwin(?) or on FreeBSD, or skip the test because SAGE_PORT is set.

We don't build Cephes on Cygwin. On Cygwin, the only *l functions actually needed anywhere in Sage and which caused troubles (and that Cygwin libm does not provide, not sure what it actually provides, but I seem to remember it provides no "long double" functions at all) was "logl" because of R, but we patched R so that its not needed anymore, and the next R upstream version provides a configure option to disable the use of "long double" functions anyway.

comment:12 Changed 8 years ago by jpflori

Here is what was recently included in Cygwin:

Support for the C99 complex functions, except for the "long double" implementations. New APIs: cacos, cacosf, cacosh, cacoshf, carg, cargf, casin, casinf, casinh, casinhf, catan, catanf, catanh, catanhf, ccos, ccosf, ccosh, ccoshf, cexp, cexpf, cimag, cimagf, clog, clogf, conj, conjf, cpow, cpowf, cproj, cprojf, creal, crealf, csin, csinf, csinh, csinhf, csqrt, csqrtf, ctan, ctanf, ctanh, ctanhf. 

See http://cygwin.com/cygwin-ug-net/ov-new1.7.html.

comment:13 Changed 8 years ago by jpflori

And I don't know what the FreeBSD libm lacks that make Sage's compilation fail (except for the logl function for R of course).

comment:14 Changed 8 years ago by jpflori

And of course we could revert the patch for R from #14078 and let Cephes install again on Cygwin. It is just that at the time we were working on #14078, patching R, which is about to get the "without long double" support in a future release seemed easier. I cannot not promise that installing Cephes and then trying to install R without the patch will just work out of the box.

Changed 8 years ago by jdemeyer

comment:15 in reply to: ↑ 9 Changed 8 years ago by jdemeyer

Replying to leif:

Actually, we need both sqrtl() and [lt]gammal() unless we build Cephes

It seems not, Cygwin doesn't have sqrtl(), nor does it build Cephes. Despite this, Sage builds.

comment:16 Changed 8 years ago by jdemeyer

OK, simplified the tar/make checks.

comment:17 Changed 8 years ago by jpflori

Ok, I've slightly recomplexified it :)

comment:18 Changed 8 years ago by jpflori

Oops, something is wrong, coming back with a proper patch.

comment:19 follow-up: Changed 8 years ago by leif

Replying to jdemeyer:

Replying to leif:

Actually, we need both sqrtl() and [lt]gammal() unless we build Cephes

It seems not, Cygwin doesn't have sqrtl(), nor does it build Cephes. Despite this, Sage builds.

IIRC, because we (still) have some special-casing on Cygwin w.r.t. at least (just?) the (long double) gamma functions.


To repeat Karl-Dieter's question: What is Cephes then needed for at all [on e.g. FreeBSD]?

I.e., we should probably check for those functions Cephes provides (and Sage needs) [unless we're on FreeBSD where Cephes gets built anyway, or SAGE_PORT is set].

comment:20 in reply to: ↑ 19 ; follow-up: Changed 8 years ago by jpflori

Replying to leif:

Replying to jdemeyer:

Replying to leif:

Actually, we need both sqrtl() and [lt]gammal() unless we build Cephes

It seems not, Cygwin doesn't have sqrtl(), nor does it build Cephes. Despite this, Sage builds.

IIRC, because we (still) have some special-casing on Cygwin w.r.t. at least (just?) the (long double) gamma functions.

I'll have a look.


To repeat Karl-Dieter's question: What is Cephes then needed for at all [on e.g. FreeBSD]?

Maybe for complex functions "c*" (which are now in Cygwin libm but used not to be)?

I.e., we should probably check for those functions Cephes provides (and Sage needs) [unless we're on FreeBSD where Cephes gets built anyway, or SAGE_PORT is set].

comment:21 in reply to: ↑ 20 ; follow-up: Changed 8 years ago by jpflori

Replying to jpflori:

Replying to leif:

Replying to jdemeyer:

Replying to leif:

Actually, we need both sqrtl() and [lt]gammal() unless we build Cephes

It seems not, Cygwin doesn't have sqrtl(), nor does it build Cephes. Despite this, Sage builds.

IIRC, because we (still) have some special-casing on Cygwin w.r.t. at least (just?) the (long double) gamma functions.

I'll have a look.

Indeed, we cheat for logl/sqrtl/tgammal/lgammal in sage/symbolic/pynac_cc.h just as we do with the R patch for logl.


To repeat Karl-Dieter's question: What is Cephes then needed for at all [on e.g. FreeBSD]?

Maybe for complex functions "c*" (which are now in Cygwin libm but used not to be)?

I.e., we should probably check for those functions Cephes provides (and Sage needs) [unless we're on FreeBSD where Cephes gets built anyway, or SAGE_PORT is set].

comment:22 in reply to: ↑ 21 ; follow-up: Changed 8 years ago by jpflori

Replying to jpflori:

Replying to jpflori:

Replying to leif:

Replying to jdemeyer:

Replying to leif:

Actually, we need both sqrtl() and [lt]gammal() unless we build Cephes

It seems not, Cygwin doesn't have sqrtl(), nor does it build Cephes. Despite this, Sage builds.

IIRC, because we (still) have some special-casing on Cygwin w.r.t. at least (just?) the (long double) gamma functions.

I'll have a look.

Indeed, we cheat for logl/sqrtl/tgammal/lgammal in sage/symbolic/pynac_cc.h just as we do with the R patch for logl.

And as we only cheat on Cygwin, this implies Cephes is definitively needed on FreeBSD for this file already.


To repeat Karl-Dieter's question: What is Cephes then needed for at all [on e.g. FreeBSD]?

Maybe for complex functions "c*" (which are now in Cygwin libm but used not to be)?

I.e., we should probably check for those functions Cephes provides (and Sage needs) [unless we're on FreeBSD where Cephes gets built anyway, or SAGE_PORT is set].

comment:23 in reply to: ↑ 22 Changed 8 years ago by leif

Replying to jpflori:

Replying to jpflori:

Replying to jpflori:

Replying to leif:

IIRC, because we (still) have some special-casing on Cygwin w.r.t. at least (just?) the (long double) gamma functions.

Indeed, we cheat for logl/sqrtl/tgammal/lgammal in sage/symbolic/pynac_cc.h just as we do with the R patch for logl.

And as we only cheat on Cygwin, this implies Cephes is definitively needed on FreeBSD for this file already.

So what's your conclusion? (Regardless of perhaps cheating on FreeBSD as well.)


I.e., we should probably check for those functions Cephes provides (and Sage needs) [unless we're on FreeBSD where Cephes gets built anyway, or SAGE_PORT is set].

comment:24 Changed 8 years ago by jpflori

  • Description modified (diff)

In fact I slightly prefer the way things get printed with the second version of the reviewer patch. It's slightly easier to understand if both tar and make are missing. Feel free to change it back if you want.

Note: See TracTickets for help on using tickets.