-
Notifications
You must be signed in to change notification settings - Fork 80
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
Building with OpenJDK 11 #212
Comments
Hi Christoph, Thanks for the heads up. Is there a bit of lead time available on this? How long before sid becomes a version people are clamoring for? Java 9 brought big changes that might require substantial edits in the build system, and I am not sure it will be practical to make those edits in the PL/Java 1.5.x branch while also keeping it buildable on older versions. So far, my (somewhat inchoate) plan has been to keep 1.5.x as the branch that everybody can still build on ancient systems, and make the-major-version-that-master-is-becoming be the modern one, that will probably build only on Java 9 and later. But I still have a lot of work planned for that branch. Meanwhile, a little playing around this evening suggests that not-very-extensive changes to the 1.5.x pom will allow it to go further:
Honestly, I don't know what that Perhaps as an interim solution, you could build with a patch to the pom? However, the above isn't enough yet. With those changes, it gets as far as the embedded JavaScript and then fails. That seems to be related to this Maven issue, which looks like it has a complicated history, maybe it was merged in Maven 3.5.1, or 3.5.2, but has been reopened, and the last comment (as of now) says it was reverted. It is marked critical, so I assume there will be progress.... So far, I have not tried to simply download a more recent Maven to see how far that gets. What version are you building with? |
Re: Chapman Flack 2019-04-02 <tada/pljava/issues/212/[email protected]>
Thanks for the heads up. Is there a bit of lead time available on this? How long before sid becomes a version people are clamoring for?
Hi,
unfortunately I only noticed when our "all packages have satisfiable
build-deps" check went off the other day for Debian/unstable, and
today the removal of openjdk-8 has propagated to Debian/testing which
will eventually be released as Buster. For users, this is still not a
problem because no stable release is affected, and in the development
branches, the packages still work at run-time. We just couldn't
rebuild them if we had to.
If it takes time to fix this, I can mute that check for pljava, so it
isn't urgent, just annoying.
Java 9 brought big changes that might require substantial edits in the build system, and I am not sure it will be practical to make those edits in the PL/Java 1.5.x branch while also keeping it buildable on older versions. So far, my (somewhat inchoate) plan has been to keep 1.5.x as the branch that everybody can still build on ancient systems, and make the-major-version-that-master-is-becoming be the modern one, that will probably build *only* on Java 9 and later. But I still have a lot of work planned for that branch.
Maintaining separate packages for different branches is possible in
theory, but practically I'd probably stop building packages for the
unsupported combinations; the packages won't get removed so people can
still use them.
Availability looks like this:
Debian:
openjdk-11 | 11.0.1+13-2~bpo9+1 | stretch-backports | source
openjdk-11 | 11.0.2+9-3~bpo9+1 | stretch-backports | source
openjdk-11 | 11.0.3+1-1~bpo9+1 | backports-policy | source
openjdk-11 | 11.0.3+1-1 | testing | source
openjdk-11 | 11.0.3+4-3 | buildd-unstable | source
openjdk-11 | 11.0.3+4-3 | unstable | source
openjdk-12 | 12.0.0-3 | unstable | source
Ubuntu:
openjdk-8 | 8u77-b03-3ubuntu3 | xenial | source
openjdk-8 | 8u162-b12-1 | bionic/universe | source
openjdk-8 | 8u181-b13-1 | cosmic/universe | source
openjdk-8 | 8u191-b12-2ubuntu0.16.04.1 | xenial-security | source
openjdk-8 | 8u191-b12-2ubuntu0.16.04.1 | xenial-updates | source
openjdk-8 | 8u191-b12-2ubuntu0.18.04.1 | bionic-security/universe | source
openjdk-8 | 8u191-b12-2ubuntu0.18.04.1 | bionic-updates/universe | source
openjdk-8 | 8u191-b12-2ubuntu0.18.10.1 | cosmic-security/universe | source
openjdk-8 | 8u191-b12-2ubuntu0.18.10.1 | cosmic-updates/universe | source
openjdk-8 | 8u212-b01-1 | disco/universe | source
openjdk-9 | 9~b114-0ubuntu1 | xenial/universe | source
openjdk-12 | 12.0.0-3 | disco/universe | source
Apparently bionic (LTS) and cosmic (non-LTS) have openjdk-8 only.
Perhaps as an interim solution, you could build with a patch to the pom?
However, the above isn't enough yet.
I could, but it if still fails...
So far, I have not tried to simply download a more recent Maven to see how far that gets. What version are you building with?
maven | 3.3.9-4 | stable | source, all
maven | 3.6.0-1 | testing | source, all
maven | 3.6.0-1 | unstable | source, all
Christoph
|
No joy ... tried with Maven 3.5.2 and 3.6.0, still falls over right at the first javascript bit. I've added a comment on the MNG-6275 issue asking if that's where the trouble is, and the outlook for a resolution if so. |
Another thing worth knowing: Today saw the first production release of GraalVM, 19.0. This release of GraalVM is (among other things) a Java SE 8 JVM, and PL/Java 1.5.2 needs no special attention to build and/or run with it (other than to add It would be great to see GraalVM packaged for the distro, as it can do very cool things (as can PL/Java, when running on it). |
I've pushed a branch Java 12 eliminated the ability to build with runtime compatibility back to 6. If built with 12, the classfiles will only be recognized by Java 7 and later JREs. This branch is based on the latest merges to |
Hi,
The file is there, though:
|
On 6/24/19 11:22 AM, Christoph Berg wrote:
[ERROR] /home/cbe/projects/postgresql/pljava/pljava.git/pljava-so/src/main/include/pljava/pljava.h:16:10: fatal error: jni.h: Datei oder Verzeichnis nicht gefunden
That's weird. It certainly did not happen in my environment.
I am not there at the moment. Would it be possible to run mvn with -X
and attach the output (either all of it, or trimmed down to the command-
line arguments passed to gcc)?
|
In my environment it is finding a copy of I had never noticed that. That is not very reassuring. |
I think the current tip of the |
Confirmed with Java 11 and PG11 and 12 on Debian unstable.
|
Let me know when there's a branch that you'd like having tested! |
Permits building the 1.5 series with Java 9 or newer JDKs, otherwise without radical change or loss of back compatibility. The Java 12 compiler can no longer generate code for targets older than Java 7, so if a PL/Java must be built to run in Java 6, the build must be done with a JDK no newer than 11. Addresses issue #212.
A branch worth testing now would be |
I finally tested 1_5 and it looks good. Are you planning to do a release soonish? |
Thanks for checking. Was it a recent At the moment, I am holding "soonish" to be "some time between this month and general availability of PostgreSQL 12". I still have WIP on #225 that will probably go in. I continue to be of two minds about #200 for this release ... most of the identified bugs are fixed (in Also there's been a lot of progress completing the Saxon example to fill in the ISO SQL XQuery-based functionality that isn't in PG core. That's on a WIP branch here that hasn't been pushed to github yet but probably will after another rebase or two, and be part of the release. |
It was from today, c9e48ed. Maybe don't wait for everything to be perfect? You could still do another release once 12 is out. |
Believed resolved in 1.5.3. |
Hi, |
I'm afraid it doesn't work with java 11:
|
Oh bother. I didn't actually test in Java 6 this time, or in 11, I tested in 7, 8, and 12. Those methods were introduced in 7. The pre-java9 compilers did not catch the problem because the The smarter Looks like I'll achieve a shorter interval between 1.5.3 and 1.5.4 than there was from .1 to .2. |
I was mistaken above: the methods in question were not introduced in 7; they are documented and present in 6. Where they aren't present is in the Continued in #235. |
Hi Christoph, If there's any chance you could test Regards, |
I just tested on sid (Java 11) and on xenial (Java 8), for PG 9.4 .. 12. Everything fine. Let me know if there's any interesting distributions with Java versions in between that I should cover as well. |
Thanks! I guess zesty and artful had Java 9 packages, but I've built on AdoptOpenJDK 9 and 10 here, so I think I'll take the chance. I've released 1.5.4. |
OpenJDK 8 was removed from Debian/unstable, so the trick "build with Java 8, run with Java 11" no longer works.
Trying to build with openjdk-11-headless results in:
We'd need a new release that supports a newer OpenJDK for apt.postgresql.org. Thanks!
The text was updated successfully, but these errors were encountered: