* [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped
@ 2020-09-29 3:06 Logarithmus
2020-09-29 4:33 ` Logarithmus
` (16 more replies)
0 siblings, 17 replies; 18+ messages in thread
From: Logarithmus @ 2020-09-29 3:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]
New issue by Logarithmus on void-packages repository
https://github.com/void-linux/void-packages/issues/25183
Description:
<!-- Don't request update of package. We have a script for that. https://alpha.de.repo.voidlinux.org/void-updates/void-updates.txt . However, a quality pull request may help. -->
`/lib/jvm/openjdk11/lib/server/libjvm.so` is stripped and is only 18 MiB in size, but `libjvm.so` which is bundled inside `java.base.jmod` is whopping 573 MiB (JMOD is a bit smaller thanks to compression being used)!
As you can see, in Arch Linux [jdk11-openjdk](https://www.archlinux.org/packages/extra/x86_64/jdk11-openjdk/) is only 76 MB, but the same package in Void is 352 MiB. Currently I'm investigating why the library is stripped in Arch but not in Void by comparing PKGBUILD and template. I'll appreciate any help.
### System
* xuname:
`Void 5.8.11_1 x86_64-musl GenuineIntel notuptodate rrnFFFFF`
* package:
`openjdk11-11.0.9+4_1`
### Expected behavior
libjvm.so and other libraries should be stripped before including into JMOD
### Actual behavior
libjvm.so and other libraries inside JMOD aren't stripped
### Steps to reproduce the behavior
`sudo xbps-install openjdk11`
`jmod extract /lib/jvm/openjdk11/jmods/java.base.jmod`
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: openjdk11: libjvm.so inside java.base.jmod isn't stripped
2020-09-29 3:06 [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped Logarithmus
@ 2020-09-29 4:33 ` Logarithmus
2020-09-29 4:35 ` ericonr
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Logarithmus @ 2020-09-29 4:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 474 bytes --]
New comment by Logarithmus on void-packages repository
https://github.com/void-linux/void-packages/issues/25183#issuecomment-700420243
Comment:
Finally, after looking through the package build log, I found the reason of this issue. It's this [commit](https://github.com/void-linux/void-packages/commit/a70c1810192f9e71d5a3fb8044565db8cac1e2da).
I don't know what's the purpose of this wrapper. Maybe it's intent is to save time and avoid stripping the same file 2 times?
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: openjdk11: libjvm.so inside java.base.jmod isn't stripped
2020-09-29 3:06 [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped Logarithmus
2020-09-29 4:33 ` Logarithmus
@ 2020-09-29 4:35 ` ericonr
2020-09-29 4:40 ` Logarithmus
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: ericonr @ 2020-09-29 4:35 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 265 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/issues/25183#issuecomment-700420812
Comment:
It's to allow us to collect debug info when stripping the file. When the build system strips it, we lose that opportunity.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: openjdk11: libjvm.so inside java.base.jmod isn't stripped
2020-09-29 3:06 [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped Logarithmus
2020-09-29 4:33 ` Logarithmus
2020-09-29 4:35 ` ericonr
@ 2020-09-29 4:40 ` Logarithmus
2020-09-29 5:02 ` Logarithmus
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Logarithmus @ 2020-09-29 4:40 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 336 bytes --]
New comment by Logarithmus on void-packages repository
https://github.com/void-linux/void-packages/issues/25183#issuecomment-700421885
Comment:
@ericonr I guess that debug info is used to create *-dbg packages? OK, so the solution would be to unpack *.jmod files after build, then strip the libraries, and finally create jmods again.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: openjdk11: libjvm.so inside java.base.jmod isn't stripped
2020-09-29 3:06 [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped Logarithmus
` (2 preceding siblings ...)
2020-09-29 4:40 ` Logarithmus
@ 2020-09-29 5:02 ` Logarithmus
2020-09-29 5:02 ` Logarithmus
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Logarithmus @ 2020-09-29 5:02 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 375 bytes --]
New comment by Logarithmus on void-packages repository
https://github.com/void-linux/void-packages/issues/25183#issuecomment-700421885
Comment:
@ericonr I guess that debug info is used to create *-dbg packages?
OK, so the solution would be to unpack *.jmod files after build, then strip the libraries, and finally create jmods again.
Or maybe there is a better solution?
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: openjdk11: libjvm.so inside java.base.jmod isn't stripped
2020-09-29 3:06 [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped Logarithmus
` (3 preceding siblings ...)
2020-09-29 5:02 ` Logarithmus
@ 2020-09-29 5:02 ` Logarithmus
2020-09-29 19:38 ` leahneukirchen
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Logarithmus @ 2020-09-29 5:02 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 376 bytes --]
New comment by Logarithmus on void-packages repository
https://github.com/void-linux/void-packages/issues/25183#issuecomment-700421885
Comment:
@ericonr I guess that debug info is used to create *-dbg packages?
OK, so the way to go would be to unpack *.jmod files after build, then strip the libraries, and finally create jmods again.
Or maybe there is a better solution?
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: openjdk11: libjvm.so inside java.base.jmod isn't stripped
2020-09-29 3:06 [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped Logarithmus
` (4 preceding siblings ...)
2020-09-29 5:02 ` Logarithmus
@ 2020-09-29 19:38 ` leahneukirchen
2020-09-29 19:42 ` Logarithmus
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: leahneukirchen @ 2020-09-29 19:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 296 bytes --]
New comment by leahneukirchen on void-packages repository
https://github.com/void-linux/void-packages/issues/25183#issuecomment-700941829
Comment:
I guess it makes sense to properly strip this here, the data should end up in `/usr/lib/debug/usr/lib/jvm/openjdk11/lib/server/libjvm.so` already?
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: openjdk11: libjvm.so inside java.base.jmod isn't stripped
2020-09-29 3:06 [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped Logarithmus
` (5 preceding siblings ...)
2020-09-29 19:38 ` leahneukirchen
@ 2020-09-29 19:42 ` Logarithmus
2020-10-06 17:08 ` SevereOverfl0w
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Logarithmus @ 2020-09-29 19:42 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 191 bytes --]
New comment by Logarithmus on void-packages repository
https://github.com/void-linux/void-packages/issues/25183#issuecomment-700944114
Comment:
Ok, so how to override this strip-wrapper?
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: openjdk11: libjvm.so inside java.base.jmod isn't stripped
2020-09-29 3:06 [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped Logarithmus
` (6 preceding siblings ...)
2020-09-29 19:42 ` Logarithmus
@ 2020-10-06 17:08 ` SevereOverfl0w
2022-04-20 2:14 ` github-actions
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: SevereOverfl0w @ 2020-10-06 17:08 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1737 bytes --]
New comment by SevereOverfl0w on void-packages repository
https://github.com/void-linux/void-packages/issues/25183#issuecomment-704420358
Comment:
At the risk of hijacking, something I've just discovered may be relevant: the dbg symbols don't work for openjdk.
```
/tmp/profilerissue 5m 29s
❯ gdb /usr/lib/jvm/openjdk11/lib/server/libjvm.so
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/lib/jvm/openjdk11/lib/server/libjvm.so...
warning: the debug information found in "/usr/lib/jvm/openjdk11/lib/server/libjvm.debuginfo" does not match "/usr/lib/jvm/openjdk11/lib/server/libjvm.so" (CRC mismatch).
warning: the debug information found in "/usr/lib/debug//usr/lib/jvm/openjdk11/lib/server/libjvm.debuginfo" does not match "/usr/lib/jvm/openjdk11/lib/server/libjvm.so" (CRC mismatch).
(No debugging symbols found in /usr/lib/jvm/openjdk11/lib/server/libjvm.so)
```
It's searching /usr/lib/jvm/openjdk11/lib/server/libjvm.so for debug symbols, instead of /usr/lib/debug.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: openjdk11: libjvm.so inside java.base.jmod isn't stripped
2020-09-29 3:06 [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped Logarithmus
` (7 preceding siblings ...)
2020-10-06 17:08 ` SevereOverfl0w
@ 2022-04-20 2:14 ` github-actions
2022-04-20 12:15 ` leahneukirchen
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: github-actions @ 2022-04-20 2:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 293 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/issues/25183#issuecomment-1103384687
Comment:
Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: openjdk11: libjvm.so inside java.base.jmod isn't stripped
2020-09-29 3:06 [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped Logarithmus
` (8 preceding siblings ...)
2022-04-20 2:14 ` github-actions
@ 2022-04-20 12:15 ` leahneukirchen
2022-04-20 22:17 ` classabbyamp
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: leahneukirchen @ 2022-04-20 12:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 199 bytes --]
New comment by leahneukirchen on void-packages repository
https://github.com/void-linux/void-packages/issues/25183#issuecomment-1103862966
Comment:
Tagging @classabbyamp our local JVM expert... ;)
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: openjdk11: libjvm.so inside java.base.jmod isn't stripped
2020-09-29 3:06 [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped Logarithmus
` (9 preceding siblings ...)
2022-04-20 12:15 ` leahneukirchen
@ 2022-04-20 22:17 ` classabbyamp
2022-04-20 22:17 ` classabbyamp
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: classabbyamp @ 2022-04-20 22:17 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 727 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/issues/25183#issuecomment-1104513185
Comment:
Ok, so:
- dbg doesn't work because jdk11 is built with `--with-native-debug-symbols=none`
- this should work with `internal`, and xbps-src should strip them correctly (tested with jdk17 and gdb)
- I currently don't see any way to strip inside the jmods
- alpine ships jmods as a subpackage, but with `--with-native-debug-symbols=none`
- arch leaves all debug info and jmods in the main jdk package and does not set any debug-related configure options (not sure how they have such a small package size?)
personally I think subpackaging them is the best option for now.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: openjdk11: libjvm.so inside java.base.jmod isn't stripped
2020-09-29 3:06 [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped Logarithmus
` (10 preceding siblings ...)
2022-04-20 22:17 ` classabbyamp
@ 2022-04-20 22:17 ` classabbyamp
2022-04-20 22:19 ` classabbyamp
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: classabbyamp @ 2022-04-20 22:17 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 769 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/issues/25183#issuecomment-1104513185
Comment:
Ok, so:
- dbg doesn't work because jdk11 is built with `--with-native-debug-symbols=none`
- this should work with `internal`, and xbps-src should strip them correctly (tested with jdk17 and gdb)
- I currently don't see any way to strip inside the jmods
- alpine ships jmods as a subpackage, but with `--with-native-debug-symbols=none`
- arch leaves all debug info and jmods in the main jdk package and does not set any debug-related configure options (not sure how they have such a small package size?)
personally I think subpackaging them is the best option for now, but I don't know much about writing java.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: openjdk11: libjvm.so inside java.base.jmod isn't stripped
2020-09-29 3:06 [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped Logarithmus
` (11 preceding siblings ...)
2022-04-20 22:17 ` classabbyamp
@ 2022-04-20 22:19 ` classabbyamp
2022-04-20 22:23 ` Logarithmus
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: classabbyamp @ 2022-04-20 22:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 804 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/issues/25183#issuecomment-1104513185
Comment:
Ok, so:
- dbg doesn't work because jdk11 is built with `--with-native-debug-symbols=none`
- this should work with `internal`, and xbps-src should strip them correctly (tested with jdk17 and gdb)
- I currently don't see any way to strip inside the jmods
- alpine ships jmods as a subpackage, but with `--with-native-debug-symbols=none`
- arch leaves all debug info and jmods in the main jdk package and does not set any debug-related configure options (not sure how they have such a small package size?)
personally I think subpackaging them is the best option for now, but I don't know much about writing java and what jmods might be needed for.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: openjdk11: libjvm.so inside java.base.jmod isn't stripped
2020-09-29 3:06 [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped Logarithmus
` (12 preceding siblings ...)
2022-04-20 22:19 ` classabbyamp
@ 2022-04-20 22:23 ` Logarithmus
2022-04-20 22:24 ` classabbyamp
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: Logarithmus @ 2022-04-20 22:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 338 bytes --]
New comment by Logarithmus on void-packages repository
https://github.com/void-linux/void-packages/issues/25183#issuecomment-1104516416
Comment:
@classabbyamp how do Alpine maintainers manage to strip jmods? https://pkgs.alpinelinux.org/package/edge/community/x86_64/openjdk17-jmods
Judging by the package size, I think it's stripped.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: openjdk11: libjvm.so inside java.base.jmod isn't stripped
2020-09-29 3:06 [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped Logarithmus
` (13 preceding siblings ...)
2022-04-20 22:23 ` Logarithmus
@ 2022-04-20 22:24 ` classabbyamp
2022-04-20 22:25 ` classabbyamp
2022-04-27 22:34 ` [ISSUE] [CLOSED] " leahneukirchen
16 siblings, 0 replies; 18+ messages in thread
From: classabbyamp @ 2022-04-20 22:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 199 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/issues/25183#issuecomment-1104516963
Comment:
they build with no debug symbols at all, I believe
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: openjdk11: libjvm.so inside java.base.jmod isn't stripped
2020-09-29 3:06 [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped Logarithmus
` (14 preceding siblings ...)
2022-04-20 22:24 ` classabbyamp
@ 2022-04-20 22:25 ` classabbyamp
2022-04-27 22:34 ` [ISSUE] [CLOSED] " leahneukirchen
16 siblings, 0 replies; 18+ messages in thread
From: classabbyamp @ 2022-04-20 22:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 280 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/issues/25183#issuecomment-1104516963
Comment:
they build with no debug symbols at all, I believe
see https://git.alpinelinux.org/aports/tree/community/openjdk17/APKBUILD#n139
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [ISSUE] [CLOSED] openjdk11: libjvm.so inside java.base.jmod isn't stripped
2020-09-29 3:06 [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped Logarithmus
` (15 preceding siblings ...)
2022-04-20 22:25 ` classabbyamp
@ 2022-04-27 22:34 ` leahneukirchen
16 siblings, 0 replies; 18+ messages in thread
From: leahneukirchen @ 2022-04-27 22:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]
Closed issue by Logarithmus on void-packages repository
https://github.com/void-linux/void-packages/issues/25183
Description:
<!-- Don't request update of package. We have a script for that. https://alpha.de.repo.voidlinux.org/void-updates/void-updates.txt . However, a quality pull request may help. -->
`/lib/jvm/openjdk11/lib/server/libjvm.so` is stripped and is only 18 MiB in size, but `libjvm.so` which is bundled inside `java.base.jmod` is whopping 573 MiB (JMOD is a bit smaller thanks to compression being used)!
As you can see, in Arch Linux [jdk11-openjdk](https://www.archlinux.org/packages/extra/x86_64/jdk11-openjdk/) is only 76 MB, but the same package in Void is 352 MiB. Currently I'm investigating why the library is stripped in Arch but not in Void by comparing PKGBUILD and template. I'll appreciate any help.
### System
* xuname:
`Void 5.8.11_1 x86_64-musl GenuineIntel notuptodate rrnFFFFF`
* package:
`openjdk11-11.0.9+4_1`
### Expected behavior
libjvm.so and other libraries should be stripped before including into JMOD
### Actual behavior
libjvm.so and other libraries inside JMOD aren't stripped
### Steps to reproduce the behavior
`sudo xbps-install openjdk11`
`jmod extract /lib/jvm/openjdk11/jmods/java.base.jmod`
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2022-04-27 22:34 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 3:06 [ISSUE] openjdk11: libjvm.so inside java.base.jmod isn't stripped Logarithmus
2020-09-29 4:33 ` Logarithmus
2020-09-29 4:35 ` ericonr
2020-09-29 4:40 ` Logarithmus
2020-09-29 5:02 ` Logarithmus
2020-09-29 5:02 ` Logarithmus
2020-09-29 19:38 ` leahneukirchen
2020-09-29 19:42 ` Logarithmus
2020-10-06 17:08 ` SevereOverfl0w
2022-04-20 2:14 ` github-actions
2022-04-20 12:15 ` leahneukirchen
2022-04-20 22:17 ` classabbyamp
2022-04-20 22:17 ` classabbyamp
2022-04-20 22:19 ` classabbyamp
2022-04-20 22:23 ` Logarithmus
2022-04-20 22:24 ` classabbyamp
2022-04-20 22:25 ` classabbyamp
2022-04-27 22:34 ` [ISSUE] [CLOSED] " leahneukirchen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).