Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#80166 - [jdk-openjdk] massive size - stripping issue

Attached to Project: Arch Linux
Opened by Jim (MustardOnCheese) - Saturday, 04 November 2023, 22:30 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:21 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Leonidas Spyropoulos (inglor)
Levente Polyak (anthraxx)
freswa (frederik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The version before this latest update is the jdk, jre and jre-headless. Now they are combined which is a good idea.

$ yay -Qo /usr/lib/jvm/java-21-openjdk/
/usr/lib/jvm/java-21-openjdk/ is owned by jdk-openjdk 21.u35-3
/usr/lib/jvm/java-21-openjdk/ is owned by jre-openjdk 21.u35-3
/usr/lib/jvm/java-21-openjdk/ is owned by jre-openjdk-headless 21.u35-3

However, my issue is the massive size increase. Combining the three into one doubled in size when it should be close to the same:
$ du -sch /usr/lib/jvm/java-21-openjdk/
503M /usr/lib/jvm/java-21-openjdk/

Installing the update will take 1136.48 MiB. Is this an error in the package build?

Additional info:
* package version(s)
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:21 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/java-openjdk/issues/8
Comment by Jim (MustardOnCheese) - Saturday, 04 November 2023, 22:35 GMT
Just an FYI. The following file /usr/lib/jvm/java-21-openjdk/lib/server/libjvm.so is not stripped and has the following props:
-rwxr-xr-x 1 root root 639M 2023-10-22 17:36 libjvm.so

After I stripped it:
-rwxr-xr-x 1 root root 21M 2023-11-04 18:32 libjvm.so

Is there a reason it is not stripped? This isn't supposed to be a debug build.
Comment by loqs (loqs) - Sunday, 05 November 2023, 00:13 GMT
> Is there a reason it is not stripped? This isn't supposed to be a debug build.
I suspect it is related to https://gitlab.archlinux.org/pacman/pacman/-/merge_requests/38 as from a freshly built java-openjdk in /var/lib/archbuild/extra-x86_64/builduser-0/build/java-openjdk/pkg
$ find -name libjvm.so -exec file {} \;
./jdk-openjdk/usr/lib/jvm/java-21-openjdk/lib/server/libjvm.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=7e622daaddbdc60768d1bb431ca93b503eb386c4, with debug_info, not stripped
./jre-openjdk/usr/lib/jvm/java-21-openjdk/lib/server/libjvm.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=7e622daaddbdc60768d1bb431ca93b503eb386c4, not stripped
./jre-openjdk-headless/usr/lib/jvm/java-21-openjdk/lib/server/libjvm.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=7e622daaddbdc60768d1bb431ca

and jre-openjdk-headless which is packaged first contains the stripped libjvm.so.
Comment by Toolybird (Toolybird) - Sunday, 05 November 2023, 00:15 GMT
Yeah, something seems to have gone awry with the stripping:

With a combined unpacked tree of the -3 pkgs:

$ find . -type f | xargs file | grep "not stripped" | wc -l
1

With an unpacked tree of the -7 pkg:

$ find . -type f | xargs file | grep "not stripped" | wc -l
44
Comment by loqs (loqs) - Sunday, 05 November 2023, 12:16 GMT
Rebuilding with makepkg that has [1] applied all files are stripped as expected.

[1] https://gitlab.archlinux.org/pacman/pacman/-/merge_requests/38
Comment by Leonidas Spyropoulos (inglor) - Monday, 06 November 2023, 12:58 GMT
Feel free to put pressure on pacman MR to merge this.
Comment by loqs (loqs) - Monday, 06 November 2023, 13:13 GMT
> Feel free to put pressure on pacman MR to merge this.
There has been no response to the request for minor changes.

Loading...