Bug 236754 - java/openjdk11: platform-specific include dir at wrong place
Summary: java/openjdk11: platform-specific include dir at wrong place
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Greg Lewis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-24 08:40 UTC by Michael Osipov
Modified: 2019-03-27 14:33 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (java)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Osipov 2019-03-24 08:40:10 UTC
Based on a report on the mailing list.

Previously:

> [mosipov@mika-ion /usr/ports/java/openjdk8]$ tree /usr/local/openjdk8/include/
> /usr/local/openjdk8/include/
> ├── classfile_constants.h
> ├── freebsd
> │   ├── jawt_md.h
> │   └── jni_md.h
> ├── jawt.h
> ├── jdwpTransport.h
> ├── jni.h
> ├── jvmti.h
> └── jvmticmlr.h

now

> [mosipov@mika-ion /usr/ports/java/openjdk8]$ tree /usr/local/openjdk11/include/
> /usr/local/openjdk11/include/
> ├── bsd
> │   ├── jawt_md.h
> │   └── jni_md.h
> ├── classfile_constants.h
> ├── jawt.h
> ├── jdwpTransport.h
> ├── jni.h
> ├── jvmti.h
> └── jvmticmlr.h


freesbd vs bsd

in ports I see:
> [mosipov@mika-ion /usr/ports/java/openjdk8]$ find . -name jni_md.h
> ./work/openjdk/jdk/src/macosx/javavm/export/jni_md.h
> ./work/openjdk/jdk/src/windows/javavm/export/jni_md.h
> ./work/openjdk/jdk/src/solaris/javavm/export/jni_md.h
> ./work/openjdk/hotspot/src/share/vm/prims/jni_md.h

> [mosipov@mika-ion /usr/ports/java/openjdk11]$ find . -name jni_md.h
> ./work/openjdk-jdk11u-jdk-11.0.2-9-2/src/java.base/unix/native/include/jni_md.h
> ./work/openjdk-jdk11u-jdk-11.0.2-9-2/src/java.base/windows/native/include/jni_md.h
> ./work/openjdk-jdk11u-jdk-11.0.2-9-2/build/bsd-x86-normal-server-release/support/modules_include/java.base/bsd/jni_md.h
> ./work/openjdk-jdk11u-jdk-11.0.2-9-2/build/bsd-x86-normal-server-release/support/interim-image/include/bsd/jni_md.h
> ./work/openjdk-jdk11u-jdk-11.0.2-9-2/build/bsd-x86-normal-server-release/jdk/include/bsd/jni_md.h
> ./work/openjdk-jdk11u-jdk-11.0.2-9-2/build/bsd-x86-normal-server-release/images/jdk/include/bsd/jni_md.h

It seems to be a bug, because I expect this to be platform-specific, and not generalized.

This also applies to openjdk12.
Comment 1 Greg Lewis freebsd_committer 2019-03-26 20:39:11 UTC
Bug is fixed upstream.  I expect this to be committed to the port shortly.

Note that the fix needs to be forward ported to openjdk12 as well.
Comment 2 commit-hook freebsd_committer 2019-03-26 20:48:27 UTC
A commit references this bug:

Author: glewis
Date: Tue Mar 26 20:48:06 UTC 2019
New revision: 496923
URL: https://svnweb.freebsd.org/changeset/ports/496923

Log:
  Fixes for include path, jshell, and process issues.

  * Put MD specific include files (e.g. jni_md.h) in a subdirectory named
    'freebsd' rather than 'bsd'. [1]
  * Remove the necessity to always have /usr/local/include in the header
    paths and linker paths.  This allows jshell to use the system iconv.h
    rather than the third party one and link correctly. [2]
  * Fix getting process commands and arguments on FreeBSD.
  * Bump PORTREVISION.

  All fixes need forward porting to openjdk12.

  PR:		236754 [1], 236759 [2]
  Submitted by:	Kurt Miller [2]

Changes:
  head/java/openjdk11/Makefile
  head/java/openjdk11/files/patch-make_autoconf_flags-cflags.m4
  head/java/openjdk11/files/patch-make_autoconf_lib-bundled.m4
  head/java/openjdk11/files/patch-make_autoconf_lib-cups.m4
  head/java/openjdk11/files/patch-make_autoconf_libraries.m4
  head/java/openjdk11/files/patch-make_autoconf_platform.m4
  head/java/openjdk11/files/patch-make_autoconf_spec.gmk.in
  head/java/openjdk11/files/patch-make_autoconf_toolchain.m4
  head/java/openjdk11/files/patch-make_lib_Awt2dLibraries.gmk
  head/java/openjdk11/files/patch-src_hotspot_os_bsd_os__bsd.cpp
  head/java/openjdk11/files/patch-src_java.base_bsd_native_libjava_ProcessHandleImpl__bsd.c
Comment 3 Michael Osipov 2019-03-27 11:59:03 UTC
Testing the updates right now...
Comment 4 Michael Osipov 2019-03-27 14:33:16 UTC
Works like a charm now with HawtJNI and Jansi for FreeBSD.