Opened 2 years ago

Last modified 6 weeks ago

#26668 new task

Add documentation for implementing spkg-configure.m4 and distros/ for SPKGs

Reported by: embray Owned by: embray
Priority: major Milestone: sage-pending
Component: documentation Keywords: spkg-configure
Cc: dimpase, vdelecroix, jhpalmieri, mjo Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:


#24919 added support for placing an M4 macro in the file build/pkg/<pkgname>/spkg-configure.m4 which allows any sage-dist SPKG to provide configure-time logic for detecting a usable system version of a dependency.

For new SPKGs in particular, as well as existing SPKGs (see #26286 for a few) we want to encourage implementing these macros. I would especially encourage it for common system-level packages that are not mathematical packages used directly by Sage (as those are simply less likely to be already provided by most systems). Examples include compression libraries like zlib and bzip2, low-level UI-related libraries like ncurses and libfreetype, and possibly some low-level math libraries such as BLAS. There is also discussion of adding an OpenSSL SPKG for convenience of building on macOS, and this is a case that really ought to prefer the system package where possible.

To better enable this, the SPKG development docs need to be updated to mention and encourage use of spkg-configure.m4. I will also provide some basic documentation (with links to resources) on writing M4 macros for autoconf, as not many people have experience with this and it has a non-trivial learning curve. In #24919 I tried to minimize the amount of M4 that actually has to be written though--the challenge is mainly in deciding the most effective way to detect usability of a given package.

Change History (7)

comment:1 Changed 2 years ago by embray

  • Owner changed from (none) to embray

comment:2 Changed 22 months ago by embray

  • Milestone changed from sage-8.5 to sage-8.7

Retargeting some of my tickets.

comment:3 Changed 21 months ago by dimpase

  • Keywords spkg-configure added

comment:4 Changed 19 months ago by embray

  • Milestone changed from sage-8.7 to sage-pending

Removing most of the rest of my open tickets out of the 8.7 milestone, which should be closed.

comment:5 Changed 9 months ago by mkoeppe

See also: #29018 - Improve documentation of m4/sage_spkg_configure.m4

comment:6 Changed 7 months ago by mkoeppe

  • Cc vdelecroix jhpalmieri mjo added
  • Summary changed from Add documentation for implementing spkg-configure.m4 for SPKGs to Add documentation for implementing spkg-configure.m4 and distros/ for SPKGs

comment:7 Changed 6 weeks ago by jhpalmieri

#30543 adds basic documentation and a recommendation to create these files, but details on how to write m4 scripts would still be welcome.

Note: See TracTickets for help on using tickets.