← Back to team overview

openjdk team mailing list archive

[Bug 1518741] Re: A pkg-config file is need for OpenJDK distributions

 

Thank you for taking the time to report this bug and helping to make
Ubuntu better.

There has been a few discussions in the past about pkg-config on the
OpenJDK mailing lists, the first one back from 2009
http://mail.openjdk.java.net/pipermail/distro-pkg-
dev/2009-July/006480.html

Another thread was started last year on two OpenJDK mailing lists, most messages are the same but a few have been sent only to one of those mailing lists:
http://mail.openjdk.java.net/pipermail/discuss/2014-August/003511.html
http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2014-June/028371.html

again no consensus and no conclusion was reached, the thread either died
down or continued in private.

One of those messages linked to a bug report which has an interesting
comment from Omair:

"Basically, it's wrong for fedora packages to link against a specific
JVM. We use alternatives and JAVA_HOME to allow users to select the
right VM at runtime. Linking directly against a VM runs against this.
Individual programs needs to be fixed to use dlopen() on the appropriate
JVM and use that." @
https://bugzilla.redhat.com/show_bug.cgi?id=740762#c27

Petr's reply was "Which still leaves the burden of locating the shared
library location on the application. If pkg-config is not suitable
solution, another locator should be provided." - very reasonable, but no
further discussion happened over what such locator or solution would
look like.

If you believe this is not the case, please let us know or even forward
this request upstream, possibly both to OpenJDK [1] and IcedTea [2].

[1] http://mail.openjdk.java.net/mailman/listinfo/discuss
[2] http://mail.openjdk.java.net/mailman/listinfo/distro-pkg-dev

** Bug watch added: Red Hat Bugzilla #740762
   https://bugzilla.redhat.com/show_bug.cgi?id=740762

-- 
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-7 in Ubuntu.
https://bugs.launchpad.net/bugs/1518741

Title:
  A pkg-config file is need for OpenJDK distributions

Status in openjdk-7 package in Ubuntu:
  New

Bug description:
  When developing using JNI ( either to start a JVM or to develop native
  support files for classes ), you need to compile and link against
  <jni.h> and libjvm.so.

  The normal way for developers to do this on Linux systems is to use
  pkg-config to get the required paths for --cflags and --libs and avoid
  hardwiring paths into make and other build files.

  However OpenJDK does not supply a pkg-config file, which is a shame as
  it's a very simple file to add to the package.

  I would make three observations in this regards :

  1. In practical terms libraries should be the normal search path for
  Linux libraries, so that they can be found by linkers ( ld ) without
  complex configurations.  Having the Java libraries in a completely
  separate location is not ideal.   However, failing the uatomatic
  installation of a symbolic link in e.g. /usr/lib to the Java runtime
  libraries, having them accessible via a standard mechanism like pkg-
  config would be some help.

  2.  While a pkg-config would be a big help, without libraries being
  installed on standard paths people distributing non-Java applications
  that wish to start their own JVM have problems ensuring the
  application will launch without knowledge of where on the system the
  Java runtime libraries are.  A symbolic link or similar to the Java
  libs would be useful in it's own right

  3. Any symbolic links should probably be made against /usr/lib/jvm
  /default-path and not the canonical path to the files proper.  This
  allows more flexibility.

  Thanks,

    Stephen Geary

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/1518741/+subscriptions


References