Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
embray opened this issue Nov 9, 2018 · 4 comments
Open

Comments

@embray
Copy link
Contributor

embray commented Nov 9, 2018

#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

@embray embray added this to the sage-8.5 milestone Nov 9, 2018
@embray embray self-assigned this Nov 9, 2018
@embray
Copy link
Contributor Author

embray commented Dec 28, 2018

comment:2

Retargeting some of my tickets.

@embray
Copy link
Contributor Author

embray commented Mar 25, 2019

comment:4

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

@embray embray removed this from the sage-8.7 milestone Mar 25, 2019
@embray embray added the pending label Mar 25, 2019
@mkoeppe
Copy link
Contributor

mkoeppe commented Jan 16, 2020

comment:5

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

@mkoeppe 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
@jhpalmieri
Copy link
Member

comment:7

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants