Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jniwrap fails to build with Java 10 #974

Closed
sebastic opened this issue May 4, 2018 · 7 comments
Closed

jniwrap fails to build with Java 10 #974

sebastic opened this issue May 4, 2018 · 7 comments

Comments

@sebastic
Copy link
Contributor

sebastic commented May 4, 2018

The jniwrap bindings fail to build with OpenJDK 10:

dh_auto_build -Sant -Djniwrap -- do_javah jar_it do_make_help
        cd jniwrap && ant -Duser.name debian do_javah jar_it do_make_help
Buildfile: /build/proj-5.0.1/jniwrap/build.xml

start:
     [echo] Creating folder structure...
    [mkdir] Created dir: /build/proj-5.0.1/jniwrap/classes
    [mkdir] Created dir: /build/proj-5.0.1/jniwrap/libs

do_javac:
     [echo] Compiling the java code...
    [javac] Using javac -source 1.5 is no longer supported, switching to 1.7
    [javac] Using javac -target 1.5 is no longer supported, switching to 1.7
    [javac] anomalous package-info.java path: package-info.java
    [javac] Compiling 3 source files to /build/proj-5.0.1/jniwrap/classes
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 7
    [javac] Note: /build/proj-5.0.1/jniwrap/org/proj4/PJ.java uses or overrides a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 1 warning

do_javah:
     [echo] Creating jni headers...

BUILD FAILED
/build/proj-5.0.1/jniwrap/build.xml:46: javah does not exist under Java 10 and higher, use the javac task with nativeHeaderDir instead

Total time: 2 seconds
dh_auto_build: cd jniwrap && ant -Duser.name debian do_javah jar_it do_make_help returned exit code 1

CC: @desruisseaux

@desruisseaux
Copy link
Contributor

I presume that you are using the latest stable release? If yes, this issue should already be fixed on master, with the following change: the do_javah jar_it do_make_help Ant targets are replaced by javadoc (as a replacement of do_make_help; the other targets are now implicit).

If there is a need to preserve compatibility with current Ant targets, will could map:

  • do_javah to a no-operation (as the error message said, javah is no longer needed and does not exist anymore in JDK 10).
  • jar_it to a no-operation (this target is now performed by the default target)
  • do_make_help to javadoc.

@desruisseaux
Copy link
Contributor

This issue depends on #903

@sebastic
Copy link
Contributor Author

sebastic commented May 4, 2018

This is with PROJ 5.0.1. It doesn't have the restructured build.xml yet, with the extended compile target.

@desruisseaux
Copy link
Contributor

Is there a wish to publish a PROJ 5.0.2 with only a fix for JDK10 without the other build.xml changes, or do the project wait for the next release created from master?

@sebastic
Copy link
Contributor Author

sebastic commented May 4, 2018

PROJ 5.1.0 is scheduled for next month, that should be good enough. In the mean time I've included the jniwrap changes from the master branch as a patch in the Debian package.

@sebastic
Copy link
Contributor Author

sebastic commented May 4, 2018

With the jniwrap changes from master PROJ 5.0.1 builds successfully with openjdk-10.

@sebastic sebastic closed this as completed May 4, 2018
@desruisseaux
Copy link
Contributor

Thanks for the information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants