-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
Generic mechanism for system package checks at configure time #24919
Comments
comment:1
It should be noted that, of course, each time a package's |
comment:3
One other aspect of this that probably needs work before it's ready, is to add flags for explicitly selecting whether or not to use the system's version of some package. I would definitely prefer to not install SPKGs by default we don't have to. But we could also add a global flag like "always use SPKGs regardless of configure checks" or something. |
comment:4
Replying to @embray:
I agree. That's also the current behaviour for gcc, git, ... |
comment:5
Replying to @jdemeyer:
Indeed. I don't know if anyone would have a problem with this or not. I think most people would consider it an enhancement if Sage installed fewer dependencies by default :) I guess it mostly comes down to how reliable the system versions of those dependencies are and how well they integrate with Sage. I'm concerned about using GMP/MPIR from the system--not because it wouldn't work, but because of how Sage currently installs MPIR as a synonym for GMP. Many platforms don't have an MPIR package in the first place, so I guess they would just use GMP. I'm not sure how best to handle that one. |
comment:6
Replying to @embray:
Sage can use both MPIR and GMP. Of course, you'll need to check whether the MPIR/GMP version is sufficiently recent. |
comment:7
The branch doesn't merge. |
comment:9
Replying to @jdemeyer:
I know. I think my concern here was just that Sage builds MPIR with its |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
|
comment:12
Rebased, but I think some other cleanup of configure.ac is now needed as a prerequisite (e.g. #25011). |
comment:14
By the way, I have |
comment:15
Replying to @dimpase:
Dima, does that work without this ticket, or did this break it somehow? The way this ticket does the feature test for curl is not substantively different from how it was done previously--it's just been moved to a different file. But if it did work before then I'm sure there is a real bug. Note, the correct |
comment:16
It didn't work before either, I think, but in fact
and the version seems good too:
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
|
comment:19
Replying to @dimpase:
Thanks. If it wasn't working before this ticket either then I wouldn't be inclined to address it here, since this is just moving around the existing code. I would open a separate issue for that. Though it seems like it should work if you run it like I'll see if I can set up a way to test that myself. Also if there are problems with the C compiler itself many other configure-time checks won't succeed at first. |
comment:128
Replying to @dimpase:
Yes, it looks like a change to build/make/Makefile.in was also accidentally reverted as part of the same bogus merge, though that one is merely cosmetic. |
comment:129
How about fixing it on #26286 ? |
comment:131
I still have some doubts about whether the gcc-related checks are working as intended. I need to re-review my original fixes for those and ensure that this isn't causing a regression (I think it might be). Previously I had incorporated all those fixes into this ticket but everything's been through so many revisions/rebases it's not clear that it's working as I expect. |
comment:132
In particular I think #25188 may have totally regressed; specifically the question of whether or not |
comment:133
Yeah, I made at least one mistake while rebasing. This should be spelled |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:135
Okay, now it should be good to go. |
comment:136
Specifically, the commit at sagemath/sagetrac-mirror@8fd4dec is updated with the corrected spelling of that line. |
Changed branch from u/embray/build/autoconf-macros to |
Changed commit from |
comment:138
see #26715 for a gfortran-related collateral damage caused here. |
Here's a look at the work I've been doing on top of (albeit not completely dependent on) #21524 in order to better support use of system packages for any of Sage's SPKGs.
This takes the workarounds that are already hard-coded in Sage's
configure.ac
for detecting certain packages--notably gcc/gfortran, yasm, git, and and curl--and converts those to a more generic mechanism.In the new mechanism each SPKG may have a file in its SPKG directory named
spkg-configure.m4
. The./bootstrap
script gathers these all up and includes them intoconfigure
.Each
spkg-configure.m4
should call a macro calledSAGE_SPKG_CONFIGURE
which is passed the package name, and some configure-time checks it should perform for that package. See the documentation inspkg-configure.m4
for more details on that macro. Inside these checks, they should set eithersage_spkg_install_<pkgname>=yes|no
in order to track whether or not Sage should install that package, or if we can just the version from the system (or we don't require the package at all for the current platform).We then move the hard-coded bits for yasm, gcc, etc. out of
configure.ac
and into their individualspkg-configure.m4
files. The end result is the same in terms of the checks that are performed.As proof of concept we also add a configure-time check for the system's
patch
, demonstrating how this might be used to enable support for more system packages.See #26286 for a follow-up.
Depends on #21524
Depends on #25011
Depends on #25208
Depends on #25188
Depends on #25198
CC: @mezzarobba @dimpase
Component: build
Author: Erik Bray
Branch:
79de3bd
Reviewer: John Palmieri, Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/24919
The text was updated successfully, but these errors were encountered: