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

at-spi2-core has a large closure size #62421

Open
matthewbauer opened this issue Jun 1, 2019 · 9 comments
Open

at-spi2-core has a large closure size #62421

matthewbauer opened this issue Jun 1, 2019 · 9 comments
Labels
6.topic: closure size The final size of a derivation, including its dependencies

Comments

@matthewbauer
Copy link
Member

Issue description

Looking at at-spi-core2, the closure size looks really big:

$ du -sch $(nix-store -qR /nix/store/dglh318sp4xzybap1mm2mlcy8rv1nkl6-at-spi2-core-2.32.1) | sort -h
16K	/nix/store/y48is3y65apgyjwlwiyzjay1dw19l19a-dns-root-data-2019-01-11
36K	/nix/store/vckbx0p1isjvmgjh7ppni3h87imazbzb-libcap-2.27-lib
44K	/nix/store/jf6lfawjvwr6ggnd4lhc5w4dp9v3kgh4-libXdmcp-1.1.3
56K	/nix/store/z2darh83lb4rmsfnnyjc0hll51fyvj49-libSM-1.2.3
64K	/nix/store/yh1w64xprl0rxmj8nvxpmikp6x3qvgdb-libffi-3.2.1
68K	/nix/store/qbwcp86aslamyhhmf2xx0l5d17dyg2jh-libmnl-1.0.4
80K	/nix/store/v31bag67wm17wkdg7zr9yi62c5028y59-libXau-1.0.9
84K	/nix/store/mmjbmvw64yl2756y1zvsxk0ic0nhzq2a-libnfnetlink-1.0.1
84K	/nix/store/rj8xd9ajm3wqjz1vfkignlp011fss53q-bzip2-1.0.6.0.1-bin
88K	/nix/store/206dvjl6595dk40dli12ziv393ww54wl-bzip2-1.0.6.0.1
92K	/nix/store/cd09qv56inq4gwa89656r4n0lq0vgidw-libXi-1.7.9
100K	/nix/store/5l3967kll8m6s66zprzwb2p6vf2mh5yd-libtasn1-4.13
108K	/nix/store/lswf09qbkkrqd0rgzaqyrkr44lf78y9x-libXext-1.3.4
128K	/nix/store/4qq5hh1r6sqb0kpxc305rb468s45j4aw-libICE-1.0.9
152K	/nix/store/ynykygggqw7l6wy5cp45565c0phxh8kv-zlib-1.2.11
164K	/nix/store/xdhh337yhl93x33vzd9davinrbr9x9iz-libmicrohttpd-0.9.63
184K	/nix/store/dp4npqj13czk7f49q3dy0warx2g68wrh-gzip-1.10
200K	/nix/store/sl5ij4lqwpll3hnl74f8fw797k9imh3x-acl-2.2.53
208K	/nix/store/skj3vdaxmbwzwxg5npdm437y4ka67kl2-attr-2.4.48
220K	/nix/store/zvfhspl24f45ml3jq2a424rngfl2vhnw-libXtst-1.2.3
260K	/nix/store/wccns8l8bav11z3xlhasmnkz383q1k9p-libnetfilter_conntrack-1.0.7
264K	/nix/store/4i1mw6av3d6pr9bqggb4hnv6cykbrhhi-kexec-tools-2.0.19
280K	/nix/store/4jw2677fvb11aj1bal9a2iksqz0mk80m-expat-2.2.6
312K	/nix/store/hg863b95fxv9zlk008qjyf87qgyx58h1-libseccomp-2.4.1-lib
316K	/nix/store/kvy2sz5lvi89lnh4rmw1df4jsnhqf1ay-libnftnl-1.1.2
380K	/nix/store/a2rr0irv2ssvvphvafgrxy4di0pkkagn-audit-2.8.5
408K	/nix/store/hfgblg8bdj328pbp9lmmf1wn58gq4b4s-xz-5.2.4
424K	/nix/store/rl2z4bb7wkfp0g12ccqffh287qal1109-kmod-26
448K	/nix/store/ndjjyr4rqibzkgs8w55bx2idhnckh39p-libidn2-2.1.1a
468K	/nix/store/6hwdmzpspbnb7ix5z6m9h60jyy42kj90-dbus-1.12.12-lib
504K	/nix/store/b85cjvwqsi39rb55dp2iv29iifnkcwa6-pcre-8.43
512K	/nix/store/vzjwz11r1yy02xv07vx2577pqizzx83n-nettle-3.4.1
544K	/nix/store/6b2jabk1scwhhk9bz7wjzycvmkiw419d-libapparmor-2.13.1
556K	/nix/store/caa29d4y2zip0ly9mcc7f4w94blw8k60-lz4-1.9.1
684K	/nix/store/daizqdqrm7g4favv814hnijmqhay8hs4-dbus-1.12.12
696K	/nix/store/m6hisb1d7q1c4z0s3icax40gynz4f8fl-gmp-6.1.2
884K	/nix/store/2j9jm3jaxfn2g6wxak61wkhmrg6c4nn5-unbound-1.9.1-lib
884K	/nix/store/xbcc8v50g7h7wqh892q7k22wb1ky8cg7-libevent-2.1.8
932K	/nix/store/yfmvcf5cslq4f9kv0vlmxksdgvick22d-libgpg-error-1.36
1.3M	/nix/store/94nrq9paz335s155x9za8n7kb0q3y211-libgcrypt-1.8.4
1.3M	/nix/store/jn0bddfc3fzhnf5ns4s2khhzclswvzb2-libpcap-1.9.0
1.4M	/nix/store/x0mlaj4z4ciycaycfwc36l1932mwywfj-bash-4.4-p23
1.5M	/nix/store/9hysgvp7qrfcil4b5qhwdq2vm9hism13-libxcb-1.13.1
1.5M	/nix/store/dglh318sp4xzybap1mm2mlcy8rv1nkl6-at-spi2-core-2.32.1
1.6M	/nix/store/mn0nzy294n07x1b92m9n0rwrv7z1441m-libunistring-0.9.10
1.7M	/nix/store/r6mrgd9k1jzzqrhphrg1qgxvgvbka7p8-pcre2-10.33
1.7M	/nix/store/rcn9d2q4mpapxf4qd54hkqz32ljhv0rw-util-linux-2.33.2
1.8M	/nix/store/a185xh0jcx7il7hw2gfh0pmvrah3x67y-systemd-239.20190219-lib
1.8M	/nix/store/bv1lw6a2kw0mn2y3lxhi43180idx6sp9-coreutils-8.31
2.7M	/nix/store/glx4vsd291jvbjzg49knldfq2mlhrpzn-glibc-2.27-bin
2.8M	/nix/store/1dydqkwswavzkyvr1qr62zmx3nqpmpp4-gnutls-3.6.7
3.2M	/nix/store/zh1q7yvyaxlcmj3n6g0rrdaq0v73pp90-linux-pam-1.3.1
3.4M	/nix/store/gsl1dw8ycrdvlzczsl59mkz0qpbwcmz1-iptables-1.8.2
3.5M	/nix/store/69vq0a9sqynmz335apm8zgyjdmq34s5j-libX11-1.6.7
3.5M	/nix/store/6whclwjzwg46s0dkxwk1xz8cdcxnkd3y-db-4.8.30
3.6M	/nix/store/qpj9rsal85rc94pizrkwb3c5nkivlfcl-p11-kit-0.23.14
3.6M	/nix/store/sm4yylq92rip64wdk3iniy91w48a90ia-openssl-1.0.2r
4.2M	/nix/store/2xhsrw4ws6kc4x3983wdwwlnim27c6iz-shadow-4.6
4.2M	/nix/store/lr9yhdbn8a3la69j56cz0vi1qva973dv-kbd-2.0.4
5.6M	/nix/store/jhah1057vq9d6j6jqzq0yhhlc6fybdj6-gcc-7.4.0-lib
5.6M	/nix/store/s7rqxrfb631i53dfl90gac35095jyypq-util-linux-2.33.2-bin
10M	/nix/store/znjkmjz0pgckxxzq0m9d17isnsd9s03q-cracklib-2.9.7
14M	/nix/store/yrmrvha03pvdyi9ww2bi6xjpk5930sf8-glib-2.60.1
23M	/nix/store/6bvd29jny80ka8df9prr5hrl5yz7d98k-systemd-239.20190219
30M	/nix/store/c745s6cnnxy6c98bvhi0qsijrh3ikag1-glibc-2.27
147M	total

The main reason this is important is because gtk3 depends on it and that is used by a bunch of other apps.

Steps to reproduce

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

@matthewbauer matthewbauer added the 6.topic: closure size The final size of a derivation, including its dependencies label Jun 1, 2019
@jtojnar
Copy link
Member

jtojnar commented Jun 2, 2019

systemd is a transitive dependency of dbus (and cracklib of systemd via pam). We probably cannot get rid of glib or glibc and it would not be very helpful since GTK is based upon GLib. It should be probably possible to port it to gdbus which is part of GLib as many other programs did but since the public API depends on types from libdbus, it will not be possible in short term.

@jtojnar
Copy link
Member

jtojnar commented Jun 2, 2019

We could try to build some of these dependencies lighter but since almost everything comes from systemd closure, user will have it already installed.

@matthewbauer
Copy link
Member Author

Yeah, I was hoping we could get rid of the dependency on systemd.out, which is pretty big. NixOS users will have systemd already installed but not necessarily for those installing outside of NixOS. systemd.lib is probably okay because it is so small.

$ nix why-depends -a /nix/store/dglh318sp4xzybap1mm2mlcy8rv1nkl6-at-spi2-core-2.32.1 /nix/store/6bvd29jny80ka8df9prr5hrl5yz7d98k-systemd-239.20190219
/nix/store/dglh318sp4xzybap1mm2mlcy8rv1nkl6-at-spi2-core-2.32.1
╚═══libexec/at-spi-bus-launcher: …a boolean but got %s./nix/store/daizqdqrm7g4favv814hnijmqhay8hs4-dbus-1.12.12/bin/dbus-daemon...…
    => /nix/store/daizqdqrm7g4favv814hnijmqhay8hs4-dbus-1.12.12
    ╚═══etc/systemd/user/dbus.socket: …t/bus.ExecStartPost=-/nix/store/6bvd29jny80ka8df9prr5hrl5yz7d98k-systemd-239.20190219/bin/system…
        => /nix/store/6bvd29jny80ka8df9prr5hrl5yz7d98k-systemd-239.20190219

Could we just add a bin output for dbus?

@jtojnar
Copy link
Member

jtojnar commented Jun 2, 2019

Sure, or just one for daemon. We can try but we need to be wary of cycles.

@Anton-Latukha
Copy link
Contributor

  1. systemd seems to be platforms = platforms.linux; - and curently a dependency of GTK, ATK. So a catch for GTK apps on macOS: Fix Handbrake build on Darwin by turning off GUI support #63643 (comment) summed in quote.

For Nix it seems to be a bummer that systemd seems not be able to be split & maintained splitted.
They saying it is "modular", it is obvious that it is very complicated now. Anyway I went and pocked a bit if someone has any results on splitting it. Seems no-one maintains splitted systemd:

  1. So the solution untying D-Bus (real name of project libdbus) dependency on systemd on nonLinux seems to be a best solution. Seems like macOS supports libdbus.

@matthewbauer
Copy link
Member Author

matthewbauer commented Jul 19, 2019

  1. So the solution untying D-Bus (real name of project libdbus) dependency on systemd on nonLinux seems to be a best solution. Seems like macOS supports libdbus.

It does but I have not yet come across an app that needs it. Most macOS users won't have dbus running, so compiling with libdbus support could lead to issues. Ideally we could make all of these dependencies optional. In some cases it doesn't make sense because libappindicator-gtk3, but those should be optional dependencies anyway.

@stale
Copy link

stale bot commented Jun 2, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2020
@YoshiRulz
Copy link
Contributor

Did #66634 only fix this for NixOS? I'm seeing systemd-249.5 adding ~100 MiB to the closure of at-spi2-core-2.42.0 on non-NixOS.

Issue title has a typo in the package name BTW.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Sep 10, 2022
@jtojnar jtojnar changed the title at-spi-core2 has a large closure size at-spi2-core has a large closure size Sep 10, 2022
@jtojnar
Copy link
Member

jtojnar commented Sep 10, 2022

That is correct, the dbus-daemon path is hardcoded so the program will not be able to work outside of NixOS. Although I would expect that to not matter since on different system, we would use their own global accessibility match any way.

Also note that the closure size will get worse with the upcoming #176156.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: closure size The final size of a derivation, including its dependencies
Projects
None yet
Development

No branches or pull requests

4 participants