You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#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.
See also: #29018 - Improve documentation of m4/sage_spkg_configure.m4
mkoeppe
changed the title
Add documentation for implementing spkg-configure.m4 for SPKGs
Add documentation for implementing spkg-configure.m4 and distros/ for SPKGs
Mar 22, 2020
#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.
CC: @dimpase @videlec @jhpalmieri @orlitzky
Component: documentation
Issue created by migration from https://trac.sagemath.org/ticket/26668
The text was updated successfully, but these errors were encountered: