-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
GHC is too big #8390
Comments
I don't think that we can realistically drop any of those files from the Generally speaking, we have only two active versions of GHC in Nixpkgs: 7.8.4 and 7.10.1. I believe that builds requiring the former versions are rare, really, so the average Hydra build slave should not require more than two copies of GHC at a time |
The *.a files are needed to create compile static executables (thinking of haskell stuff linkage only), right? Is it viable to e.g. use only dynamic linkage by default and thus omit *.a from the default haskell stuff? |
No, I would personally imagine Haskell so-libs shattered from one store path into many smaller ones and have runtime dependencies on (and among) those. EDIT: that is, unless there are some other nontrivial disadvantages in Haskell dynamic linking (perhaps lower performance due to fewer optimization opportunities?). |
@edolstra @peti what's the problem on depending on ghc with dyn libs? Isn't On Thu, Jun 18, 2015 at 8:59 PM, Peter Simons notifications@github.com
NixOS Linux http://nixos.org |
IMHO splitting individual libs is secondary, because most users of Haskell stuff will need to have GHC itself as well, which will require to have all of the currently bundled libs anyway (I suppose). What might make more sense is this *.a and *.so dichotomy. It seems a waste to me to always have both sets, though I must admit I don't have a good idea about static vs. dynamic use cases with GHC. |
@vcunat, some Haskell projects like Now, splitting GHC's run-time libraries into a separate output sounds like a good idea at first glance, but it won't accomplish much because |
For comparison, http://downloads.haskell.org/~ghc/7.10.2/ghc-7.10.2-x86_64-unknown-linux-deb7.tar.bz2 is 1.1 GB unpacked, Arch Linux's GHC is 943.7 MB, and Debian's GHC is 930MB (split across 4 packages), so NixOS is actually on the small side. |
GHC has perl in the closure for no reason good reason #10541 |
So, the current numbers on 15.09 – ghc has ~1001 MB, consisting of:
Apart from docs, |
Back when GHC only did static linkage, I recall that running @vcunat .hi files are interface metadata files that GHC uses to keep track of what's in the corresponding objects. Also, cc @thoughtpolice who's the primary GHC maintainer and might have ideas on what we can do to to improve this. |
IIRC strip can be run directly on |
If people are deploying binaries on a server it's best to use With shared being the default maybe we should split out at least the .so files to avoid having that extra 1G by accident on servers. A preliminary test [1] shows a lib/rest split works but I don't have the resources on my small laptop to test the full package set. [1] |
Closing in favor of #4504, which encompasses this topic. |
The GHC package is enormous:
While this is probably unpleasant for users (and packages that depend on GHC), it also puts significant strain on Hydra: copying nearly a GB of data to each build machine, for every version of GHC, takes a lot of time. Not to mention the time/cost of uploading those copies to the binary cache.
Maybe this could be reduced somehow? For example, the path above contains 626 MB of
*.a
files, in profiling and non-profiling versions, which are in addition to the shared library versions.The text was updated successfully, but these errors were encountered: