Opened 11 years ago

Last modified 10 years ago

#12433 closed defect

Make zn_poly respect the CC environment variable (and clean up the spkg) — at Version 4

Reported by: ohanar Owned by: GeorgSWeber
Priority: major Milestone: sage-5.2
Component: packages: standard Keywords: spkg hardcoded hard-coded CC CXX compiler sd40.5
Cc: roed Merged in:
Authors: R. Andrew Ohana, Leif Leonhardy Reviewers: Leif Leonhardy
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by leif)

The zn_poly spkg currently does not respect the CC environment variable, we should fix this (for instance for #12426).

I've posted an spkg at http://wstein.org/home/ohanar/clang-port/sage-5.0.beta1-src/spkg/standard/zn_poly-0.9.p6.spkg. (Andrew)

There's also still the obsolete Debian dist/ directory, and the spkg can be improved in many ways.


New spkg: http://boxen.math.washington.edu/home/leif/Sage/spkgs/zn_poly-0.9.p7.spkg

md5sum: 068cc74a5ac55bdfd74653e26be69964 zn_poly-0.9.p7.spkg

zn_poly-0.9.p7 (Leif Leonhardy, April 8th, 2012)

  • #12433: Reviewer changes.
  • Restore upstream sources. (One file in src/tune/ was already patched.)
  • Remove the obsolete Debian dist/ directory.
  • Use patch to apply the patches.
  • Remove patches/ from .hgignore! (And remove the prepatched files.)
  • Add Python to the dependencies, since (some) Python is needed to create the Makefile during build / configure. (spkg/standard/deps already reflects this.)
  • Rework (upstream's) makemakefile.py to create a proper Makefile, respecting CC, CXX, CFLAGS, CXXFLAGS, CPPFLAGS etc. with their *usual* meaning (i.e., not using CPP to compile C++!), and using LDFLAGS consistently, also not hardcoding e.g. -m64 (which was added by Sage).
  • Do not add -O3 to CFLAGS (in spkg-install) without the possibility to get overridden by user-provided CFLAGS. Also honor SAGE_DEBUG=yes by completely disabling optimization in that case.
  • Fix typo in spkg-check, which certainly would break building the test program when SAGE64=yes. (Although it is actually already built from within spkg-install.)
  • Clean up spkg-install and spkg-check; redirect error messages to stderr, add more error checks, use $MAKE in spkg-check as well, quote more environment variables, use cp [-f] instead of $CP, don't create an absolute symbolic link on Cygwin.

zn_poly-0.9.p6 (R. Andrew Ohana, February 4th, 2012)

  • #12433: Make spkg respect global CC flag

Change History (7)

Changed 11 years ago by ohanar

for review purposes

comment:1 Changed 11 years ago by ohanar

  • Status changed from new to needs_review

comment:2 Changed 10 years ago by leif

  • Reviewers set to Leif Leonhardy
  • Status changed from needs_review to needs_work

Same here: $CC has to be quoted.

comment:3 Changed 10 years ago by leif

Oh, the zn_poly spkg is a real mess... :-)

I'll make a p7 cleaning up spkg-install and spkg-check, removing the obsolete Debian stuff, using patch to apply the patches, and -- more importantly -- modifying makemakefile.py to produce a proper Makefile, respecting CC (and CXX, not CPP!, likewise CXXFLAGS instead of CPPFLAGS, and using CPPFLAGS for what they're meant to be used), using LDFLAGS consistently...

Then we won't have to use $MAKE ... CC=... etc.

Changed 10 years ago by leif

Diff between Andrew's and my new spkg. For reference / review only.

Changed 10 years ago by leif

Diff between the previous spkg in Sage and my new spkg. For reference / review only.

comment:4 Changed 10 years ago by leif

  • Authors set to R. Andrew Ohana, Leif Leonhardy
  • Component changed from build to packages
  • Description modified (diff)
  • Keywords spkg hardcoded hard-coded CC CXX compiler added
  • Status changed from needs_work to needs_review
  • Summary changed from make zn_poly respect global CC flag to Make zn_poly respect the CC environment variable (and clean up the spkg)

Ok, here's something to review... :P

Left a few TODOs, as well as a lot of (hopefully obsolete) code I just commented out right now.

I've attached diffs between the p5, p6 and p7 spkgs, and the new patch to makemakefile.py, too, for easier reviewing. (You don't have to apply any of these.)

Note: See TracTickets for help on using tickets.