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

Big closure size #317

Closed
ck3d opened this issue Jan 24, 2024 · 4 comments
Closed

Big closure size #317

ck3d opened this issue Jan 24, 2024 · 4 comments
Labels
question Generally ask questions

Comments

@ck3d
Copy link

ck3d commented Jan 24, 2024

The closure size of nixd is round about 550Mb on latest nixpkgs.

I would be great if the runtime dependency to llvm-dev and nix-dev can be removed.

@inclyc
Copy link
Member

inclyc commented Jan 24, 2024

I would be great if the runtime dependency to llvm-dev and nix-dev can be removed.

AFAIK, we do not rely on llvm-dev & nix-dev as runtime dependency, only llvm.out & nix.out.

@inclyc
Copy link
Member

inclyc commented Jan 24, 2024

LLVM closure size is much larger than many other repositories (e.g. Debian), it's only about 30~40M if properly packaged1. You may refer to NixOS/nixpkgs#230616 and these llvm static libraries contributed most closure size (which is definitely unnecessary at runtime).

Footnotes

  1. For example, on Debian (amd64) https://packages.debian.org/bookworm/llvm-14 it is only 48,353kb (47.2M) after installation.

@inclyc inclyc added the question Generally ask questions label Jan 24, 2024
@ck3d
Copy link
Author

ck3d commented Jan 24, 2024

You are right, the llvm itself is the main problem.

My mentioned packaged llvm-dev and nix-dev are only a problem on darwin, the dependencies are:

/nix/store/qlml6qifkgs47s3gb714lcq4vh27qpic-libcxxabi-16.0.6
/nix/store/6zn9dj3sdncl5qafw52p5zx7zszxjpjm-libcxx-16.0.6
/nix/store/a6kpihjkaiwxj1z544ha4s39mqgsjv8p-llvm-16.0.6-lib
/nix/store/4fkk4s69qln8nsbkd46n77s48cli1i6i-llvm-16.0.6-dev
/nix/store/909bg372n5iij7cs8vyggzkpb381dkla-boehm-gc-8.2.2
/nix/store/zic94z6xi9vrhd65z5dsn1q3bwab7wa8-nix-2.16.2
/nix/store/8mqyfmzb9nbfa3gghzfzkbv56zwzb44x-nix-2.16.2-dev
/nix/store/awwqpd7740g1m0qpxgcljmf18amsb1ky-libbacktrace-unstable-2022-12-16
/nix/store/8rsj7vmz86kgwy8aq8hbqg4kvsc22cw5-nixd-1.2.2

On linux, the package dependency shows following:

nix/store/p3jshbwxiwifm1py0yq544fmdyy98j8a-glibc-2.38-27
/nix/store/4zp05qkzh9s3c3k7pp9d36vhiz3x8h9l-gcc-13.2.0-lib
/nix/store/6ki2537r0m4p16i55j0gw5x0il6j9nl8-libbacktrace-unstable-2022-12-16
/nix/store/93kxyl9lh01rbqwjgdxjaf7l62zf9fp6-llvm-16.0.6-lib
/nix/store/kdgrm7cn9nfh0nhq2qnxc2fjx5ha1lq4-boehm-gc-8.2.2
/nix/store/v851wnb6ny7v2zhlikxma0qn9cwa1a69-nix-2.16.2
/nix/store/m8c94isyh6920vkb531pvxri998lwc3p-nixd-1.2.2

@ck3d
Copy link
Author

ck3d commented Jan 24, 2024

The root cause is the big llvm package, which needs to be fixed in nixpkgs. Therefor I close this issue.
Sorry for the noise.

@ck3d ck3d closed this as completed Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Generally ask questions
Projects
None yet
Development

No branches or pull requests

2 participants