- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 565
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
Install fewer static libraries #28890
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Commit: |
Author: Erik Bray |
Branch: u/embray/ticket-28890 |
comment:3
Passing
Left libatomic_ops static since I think gc likes to link to it statically for performance reasons, but I need to double-check that it's actually doing that. The rest I'm not sure about yet. New commits:
|
comment:4
OK, let me run tests... |
comment:5
the branch looks good, do you want it to be reviewed? |
comment:6
Thanks a lot for taking care of that. (You are crossing an item off the depths of my todo-list!) I just rebuilt sage from scratch with this branch. With standard packages only and using system packages when possible, the remaining static libraries are
So most of the large ones are gone, and those that remain may have a good reason to be there. Like Dima, I'm ready to give this branch positive review if you want. |
comment:7
I want to have a look at a few of the remaining libs. Also, I got a few test failures with this branch, but I don't know if they're at all related (shouldn't be...) |
comment:9
Since we are apparently already moving 9.0 towards a release candidate, this will probably have to wait a bit. |
comment:11
Updated to remove libpari.a. Apparently we had been explicitly installing it pretty much forever, so I couldn't find a clear record of why, but I don't think there's any need for it currently. My only concern here is there no easy way (since it is not a flag that can be passed to PARI_CONFIGURE) to force installation of the static lib. But if someone asks for it for some reason it can be added later. |
comment:12
Replying to @embray:
pari/gp upstream claims that statically linked gp is faster than dynamically linked one. |
This comment has been minimized.
This comment has been minimized.
comment:14
Replying to @dimpase:
If so, it appears we are already not doing this, though we could. Regardless, this can be done during PARI/GP build: there is no need to install the static lib after the fact. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:17
libbraiding and libhomfly will be handled by this as well once #28927 is in. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:19
I think that with the last commit this pretty much covers everything. I looked into all the other packages that are installing static libs, and determined that it's either on purpose, or too much trouble to mess with as part of this ticket. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Changed reviewer from Marc Mezzarobba, https://github.com/mkoeppe/sage/actions/runs/732049335 to Marc Mezzarobba, https://github.com/mkoeppe/sage/actions/runs/733869032 |
comment:51
Now testing at https://github.com/mkoeppe/sage/actions/runs/733869032 |
Changed author from Erik Bray to Erik Bray, Matthias Koeppe |
comment:55
On OS X (with a bunch of homebrew packages), this prevents building of the following:
We should probably build without as many homebrew packages, to make sure things still work. |
comment:56
With |
comment:57
The runs at https://github.com/mkoeppe/sage/actions/runs/733869032 (linux/macos), https://github.com/mkoeppe/sage/actions/runs/732049334 (optional packages), were also successful. On |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:60
New test on cygwin at https://github.com/mkoeppe/sage/actions/runs/738661838 |
Changed reviewer from Marc Mezzarobba, https://github.com/mkoeppe/sage/actions/runs/733869032 to Marc Mezzarobba, https://github.com/mkoeppe/sage/actions/runs/738661838 |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Changed reviewer from Marc Mezzarobba, https://github.com/mkoeppe/sage/actions/runs/738661838 to Marc Mezzarobba, John Palmieri |
comment:62
I'm not sure why I can't view the branch attached to this ticket, but it merges cleanly with Sage 9.3. I think we should add this to an early beta of 9.4 (or 9.5 if 9.4 is a bug-fix release) to make sure it gets tested thoroughly. |
comment:63
Thanks! |
Changed branch from u/mkoeppe/ticket-28890 to |
As pointed out on sage-devel, by default many SPKGs install static libraries in addition to their associated dynamic libs.
I usually ignored this as harmless, but as Marc pointed out, some of them are quite large, especially libgiac.a. Almost none of these are actually needed either at build or runtime and do not need to be installed by default in SAGE_LOCAL.
I think by default we should configure the relevant packages to not install static libs, or remove them manually if the packages' build system installs them forcibly. This could be overridden with
<PKGNAME>_CONFIGURE
variables if someone needs the static lib for some reason.At least the following packages are installing static libs
In at least a few cases, like
libatomic_ops
, I believe this is intentional. But in most cases it is probably unnecessary.Additional notes:
cliquer: it already passes
--disable-static
but it installs a test file intoshare/
which happens to end with.a
but is not a static lib as far as I can tell.ecl: The
.a
modules installed with ECL seem to be pretty baked into its build process and I'm not sure if there's an easy way to omit them or if it's even desirable to.ecm: apparently we deliberately build it as a static lib by default; not sure why. Need to investigate (performance reasons?)
gap: The SmallGrp package also installs some ".a" file that are not static libs; otherwise GAP is not installing any static libs (some things in gap_packages might but I haven't checked yet).
mpir: mpir/gmp is linked statically for at least some libraries such as ECM, and possibly some others (GP?).
ntl: NTL's build system makes static library installation pretty mandatory--I don't know if there's any good reason for that or not, so for now we can just leave it alone.
python2/3: The static lib installation (performed by the
libainstall
make target) is a part of Python's standard installation process and more trouble to remove than it's worth, although I don't think we explicitly need it for anything.ratpoints: Has only ever supported being built as a static library, and is statically linked into Sage's ratpoints interface.
yasm: If I understand correctly, libyasm contains some special support functions and is intended to be linked statically.
CC: @mezzarobba @dimpase @orlitzky @jhpalmieri @videlec
Component: build
Keywords: static
Author: Erik Bray, Matthias Koeppe
Branch/Commit:
c8ccab6
Reviewer: Marc Mezzarobba, John Palmieri
Issue created by migration from https://trac.sagemath.org/ticket/28890
The text was updated successfully, but these errors were encountered: