, jmods and --with-native-debug-symbols=internal

Erik Joelsson erik.joelsson at
Fri Feb 10 08:25:01 UTC 2017


Oracle builds with external debuginfo and handles packaging of debuginfo 
in the build, so we don't have this problem. For us the jmods always 
contain stripped binaries. I guess nobody thought of your process so 
this is an unfortunate side effect. I don't have any good idea on how to 
solve it.


On 2017-02-09 18:41, Omair Majid wrote:
> Hi,
> I have been working on building preview versions of OpenJDK 9 for
> Fedora. You can see the latest build here:
> One thing that I just realized is that we build OpenJDK 9 using the
> configure option --with-native-debug-symbols=internal. As far as I
> understand the build, this is what happens:
> 1. is built
> 2. is not stripped of any debug information
> 3. a jmod - java.base.jmod - containing is created
> 4. the jmod containing is extracted to create images/jdk/ (and
>     images/jre/)
> Then the linux packaging tools (rpmbuild in my case) take over and do
> the following:
> 5. strip in images/jdk/, put stripped symbols in a separate
>     location
> 6. Package up images/jdk/ into the distribution package
> 7. make a -debuginfo package (or -dbg in case of Debian) that contains
>     the stripped symbols from
> So now users get a in the default package that's stripped and
> less than 20MB. They also get an optional -debuginfo (or -dbg) package
> that contains just the debug symbols. This lets them use the small
> package containing libjvm and but also lets them download a large
> package to debug if they wish. This is all great so far and
> works like it should.
> One new change that happened with OpenJDK 9 only is that the jmod
> (java.base.jmod here) contains the original and unstripped
> This jmod also gets included into the images/jdk/. This bumps up the
> images/jdk/jmods directory size to hundreds of megabytes. Anyone who now
> wants to use jmods now ends up installing all the unstripped debuginfo,
> unintentionally, eating up disk space.
> Is this intentional or an unintended side-effect of various changes? Is
> it a known issue?
> Thanks,
> Omair

More information about the build-dev mailing list