A pkg-config file for OpenJDK
Omair Majid
omajid at redhat.com
Mon Aug 11 17:13:04 UTC 2014
* Mario Torre <neugens at redhat.com> [2014-08-05 12:05]:
> On Tue, 2014-08-05 at 17:42 +0200, dalibor topic wrote:
> > On 04.08.2014 10:41, Mario Torre wrote:
> > > If compact profiles are an issue, I would say that OpenJDK should ship
> > > with a pkg-config for each of the profiles.
> >
> > OK, now let's assume that multiple profiles are installed in parallel. ;)
> >
> > Or, for a not too unusual setup, that multiple JDK/JRE versions are
> > installed in parallel.
> >
> > How does pkg-config pick the 'right' one to link against? Does the first
> > one to install the OpenJDK .pc file win? The last one? Does one need a
> > different .pc file for each major version? For each minor version?
I would expect that something like this would be handled similar to how
the selection of the correct `java` program is handled in Linux
distributions.
In case of Fedora, there would be a .pc file for each major version, and
the latest installed JDK would 'win'.
> > If I'm parsing https://bugzilla.redhat.com/show_bug.cgi?id=740762#c27
> > right it seems that the design of the feature in the context of Fedora
> > is still under discussion.
Yes, that's true. It looks like some people disagree that a pkg-config
file is the right solution. I would like to withdraw this patch for the
time being (and possibly resubmit if we (or other distributions) decide
it's useful).
> > > The whole point of pkg-config is to not worry about where things are
> > > installed and what the linking/flags options are, you only need to know
> > > the package name, which should be standard across distros.
> >
> > OpenJDK 8u typically gets packaged as "openjdk-8" on Debian derived
> > distributions, "java-1.8.0-openjdk" on Fedora derived ones, and
> > presumably something else somewhere else.
One of the goals of this pkg-config file is to have a standard 'name':
irrespective of your distribution, there would be one name for the
pkg-config file that is decided by OpenJDK (that's us here on this
mailing list). A distribution can call their package openjdk-8.0 and it
would still use the same well-known-name for the pkg-config file.
> > In addition, the distributions tend to split OpenJDK packages in
> > different ways - See
> >
> > java-1.8.0-openjdk-accessibility
> > java-1.8.0-openjdk-demo
> > java-1.8.0-openjdk-devel
> > java-1.8.0-openjdk-headless
> > java-1.8.0-openjdk-javadoc
> > java-1.8.0-openjdk-src
> >
> > vs.
> >
> > openjdk-8-dbg
> > openjdk-8-demo
> > openjdk-8-doc
> > openjdk-8-jdk
> > openjdk-8-jre
> > openjdk-8-jre-headless
> > openjdk-8-jre-jamvm
> > openjdk-8-jre-zero
> > openjdk-8-source
> >
> > for a Fedora vs. Debian comparison.
One thing to note is that this pkg-config file is meant for those
compiling (Java and C) code. It is expected that they will need `javac`
installed. This is provided by java-1.8.0-openjdk-devel and
openjdk-8-jdk in the list above. And both those packages pull down a
working JRE too. So, even though the packages are split in funny ways,
installing the package that installs javac gets you a working JRE too,
and that's basically all you need if you are building Java code. It
should really be enough for the pkg-config file too.
Other distributions seem to use a similar packaging style: unless
there's a monolithic package, the jdk package requires the jre package
and builds on that to give everything that's required for someone who
wants to compile Java code.
> The only issue OpenJDK should probably address is the naming of itself
> in the pkg-config template, since this should likely be standard, then
> everything else will be decided at packaging level[1].
>
> Probably Omair can help us here to better understand what OpenJDK as
> upstream could do though, since he has more packaging experience than I
> do, I would also love some feedback from the Debian packagers (or any
> other distribution that can help her).
I have cc'ed Emmanuel Bourg, who is one of the maintainers of OpenJDK 8
in Debian.
Thanks,
Omair
--
PGP Key: 66484681 (http://pgp.mit.edu/)
Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681
More information about the discuss
mailing list