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

haskell.lib.justStaticExecutables doesn't seem to reduce closure size #42095

Closed
vaibhavsagar opened this issue Jun 16, 2018 · 4 comments
Closed

Comments

@vaibhavsagar
Copy link
Member

Issue description

haskell.lib.justStaticExecutables doesn't seem to reduce closure size as reported by du -sch $(nix-store -qR $path). Is this the expected behaviour, and if so what is the way to remove unneeded dependencies to reduce closure size?

Steps to reproduce

$ du -sch $(nix-store -qR $(nix-build -E "with import <nixpkgs> {}; pkgs.haskell.lib.justStaticExecutables pkgs.haskellPackages.pandoc"))
<...>
1.1G    /nix/store/hjvv3ayhyddz2piydw8rra85pczbsz9j-ghc-8.2.2
<...>
2.0G    total

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.14.47, NixOS, 18.03.132645.43c77db3aa5 (Impala)
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 2.0.4
  • channels(vaibhavsagar): ""
  • channels(root): "nixos-18.03.132645.43c77db3aa5"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs
@vaibhavsagar
Copy link
Member Author

I've tried this with scotty and hakyll and in that case it does seem to reduce the closure size. Maybe this is something pandoc specific?

@vaibhavsagar
Copy link
Member Author

This looks like a duplicate of #34376, closing.

@lf-
Copy link
Member

lf- commented Oct 5, 2022

This is a duplicate of that issue for pandoc (that issue is scoped to just pandoc, however!), but strip does not seem to fix it on my aarch64-darwin, while building a large (currently proprietary) binary with GHC-9.2.4.

Nixpkgs commit d6490a0

Paths to libraries that are affected (big app!):

/nix/store/cjwzzk4lwkzhl5d81ycxll46v7lkh04q-warp-3.3.21/etc
/nix/store/cjwzzk4lwkzhl5d81ycxll46v7lkh04q-warp-3.3.21/libexec/aarch64-osx-ghc-9.2.4/warp-3.3.21
/nix/store/cjwzzk4lwkzhl5d81ycxll46v7lkh04q-warp-3.3.21/share/aarch64-osx-ghc-9.2.4/warp-3.3.21
/nix/store/cjwzzk4lwkzhl5d81ycxll46v7lkh04q-warp-3.3.21/lib/ghc-9.2.4/aarch64-osx-ghc-9.2.4
/nix/store/cjwzzk4lwkzhl5d81ycxll46v7lkh04q-warp-3.3.21/lib/ghc-9.2.4/aarch64-osx-ghc-9.2.4/warp-3.3.21-KgMrgV3QBolBwpD4
ttB2Wl
/nix/store/cjwzzk4lwkzhl5d81ycxll46v7lkh04q-warp-3.3.21/bin
/nix/store/rpva2yd70cisdq7a0w88b1s834m39llz-hs-opentelemetry-sdk-0.0.3.3/etc
/nix/store/rpva2yd70cisdq7a0w88b1s834m39llz-hs-opentelemetry-sdk-0.0.3.3/libexec/aarch64-osx-ghc-9.2.4/hs-opentelemetry-
sdk-0.0.3.3
/nix/store/rpva2yd70cisdq7a0w88b1s834m39llz-hs-opentelemetry-sdk-0.0.3.3/share/aarch64-osx-ghc-9.2.4/hs-opentelemetry-sd
k-0.0.3.3
/nix/store/rpva2yd70cisdq7a0w88b1s834m39llz-hs-opentelemetry-sdk-0.0.3.3/lib/ghc-9.2.4/aarch64-osx-ghc-9.2.4
/nix/store/rpva2yd70cisdq7a0w88b1s834m39llz-hs-opentelemetry-sdk-0.0.3.3/lib/ghc-9.2.4/aarch64-osx-ghc-9.2.4/hs-opentele
metry-sdk-0.0.3.3-4okP8RUIhRPJ82kxo9f3AG
/nix/store/rpva2yd70cisdq7a0w88b1s834m39llz-hs-opentelemetry-sdk-0.0.3.3/bin

@lf- lf- reopened this Oct 5, 2022
@lf-
Copy link
Member

lf- commented Oct 5, 2022

#164630 related issue, I would say even more canonical.

@lf- lf- closed this as completed Oct 5, 2022
@Atemu Atemu closed this as not planned Won't fix, can't repro, duplicate, stale Nov 15, 2023
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

3 participants