Bug 1756487 - rust-std-static is significantly larger in 1.38
Summary: rust-std-static is significantly larger in 1.38
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rust
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Josh Stone
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-27 18:23 UTC by Josh Stone
Modified: 2019-09-30 00:22 UTC (History)
4 users (show)

Fixed In Version: rust-1.38.0-2.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-30 00:22:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github rust-lang rust issues 61978 0 None None None 2019-09-27 18:23:21 UTC
Github rust-lang rust issues 62486 0 None None None 2019-09-27 18:23:21 UTC
Github rust-lang rust pull 64823 0 None None None 2019-09-27 18:23:21 UTC

Description Josh Stone 2019-09-27 18:23:22 UTC
Upstream, most of the compiler's internal libraries were changed in how they are built and packaged. Before, they were individual shared libraries, but now they are built as rlibs (static) and finally linked into one librust_driver.so.

However, the rust-std component is collected and installed by just grabbing *all* rlibs in the build sysroot, including all those compiler libs that are considered unstable for external users.

rust-std-static-1.37.0-1.fc32.x86_64.rpm -- Size 39623589 (37.8 MiB)
rust-std-static-1.38.0-1.fc32.x86_64.rpm -- Size 620606290 (592 MiB)

See the referenced upstream issues, as well as the pull request where I am working on reducing the included rlibs. The problem is actually much worse for us though, because we build with full compiler debuginfo. Some of that is stripped in rpmbuild like normal, in the rlib archive's .o members, but Rust-specific members also include debug metadata that is not stripped.

Comment 1 Josh Stone 2019-09-27 18:39:06 UTC
On the plus side, the main rust package is smaller with that compiler lib change:

rust-1.37.0-1.fc32.x86_64.rpm -- Size 41209126 (39.3 MiB)
rust-1.38.0-1.fc32.x86_64.rpm -- Size 19397218 (18.5 MiB)

So once we filter rust-std rlibs, the total rust toolchain size will be much smaller.

Comment 2 Josh Stone 2019-09-30 00:22:45 UTC
rust-1.38.0-2.fc32.x86_64.rpm -- Size 19393383 (18.5 MiB)
rust-std-static-1.38.0-2.fc32.x86_64.rpm -- Size 17471432 (16.7 MiB)


Note You need to log in before you can comment on or make changes to this bug.