Hello,
and thank you very much for your answer.
First, about OpenJDK 11, and "debian/patches/javah.patch". You are
absolutely right to point that out. Actually, I had missed that the
"javah" tool was removed since OpenJDK 10. Sorry for that.
I was able to reproduce the same error as the one you showed with
OpenJDK 11.
If we take care of a few more C headers include and constant export, it
works. At least for me.
Maybe just a thing to note: the path to "libjawt.so" has changed between
8 and 11, and we need to remove the "${os.arch}" part when giving that
path to GCC, in "platform_build/linux_ant/build.xml".
Please find attached a new version of the patch I proposed, including
those modifications specific to OpenJDK 11.
Should you want to try it, please apply after everything else, including
"javah.patch". (but not the previous version I sent).
Please let me know if this works for you, or maybe what you think about it.
Then, about "OpenGL" and "OpenGL ES": from what I understand they are
two versions of the same thing.
From Wikipedia: "OpenGL for Embedded Systems (OpenGL ES) is a subset of
the OpenGL computer graphics rendering application programming interface
(API)" <https://en.wikipedia.org/wiki/OpenGL_ES>.
About the technical details: in the "build.xml" file, in the root
folder, there is a "compile_native" and "compile_native_es". When we
look at "debian/rules", the "override_dh_auto_build" calls
"compile_native", but never "compile_native_es". And it seems to me that
"compile_native_es" is the only target to call Ant with
"platform_build/linux_ant/build_es.xml" (which is the only build file to
include C files in the sub folders named "opengles"). Also, when looking
at "platform_build/linux_ant/build.xml", the targets that were defined
by upstream (or at least in
<https://github.com/LWJGL/lwjgl/blob/master/platform_build/linux_ant/build.xml>)
do not include the C files in the "opengles" folders. And finally, if I
remember correctly, at first I tried to include C files from every sub
folders, but ended up with conflicting redefinitions of the same C
functions.
So, I am not sure whether we need "OpenGL ES" support or not. And if we
do, I don't know how it should be packaged. But personally I would
simply leave it out, at least for now.
Regards,
Guillaume
Description: Compile and add to library missing object files
Some C files present in "src/native/common", and "src/native/linux"
were not included in the native library build. This patch should include them
back.
.
Also, when building the Debian package, the library "jawt", which is a
dependency, was missing as well when building the native library.
.
This patch should allow building the Debian package with OpenJDK 11.
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=912631#5
Last-Update: 2018-12-31
--- lwjgl-2.9.3+dfsg.orig/platform_build/linux_ant/build.xml
+++ lwjgl-2.9.3+dfsg/platform_build/linux_ant/build.xml
@@ -6,7 +6,7 @@
<property name="libname64" value="liblwjgl64.so"/>
<property name="libs32" value="-L/usr/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/i386 -ljawt" />
<property name="libs64" value="-L/usr/X11R6/lib64 -L/usr/X11/lib64 -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/amd64 -ljawt" />
- <property name="libs" value="-L/usr/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXcursor -lXrandr -lXxf86vm -L${java.home}/lib/${os.arch}" />
+ <property name="libs" value="-L/usr/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXcursor -lXrandr -lXxf86vm -L${java.home}/lib -ljawt" />
<property name="cflags32" value="-O2 -Wall -c -fPIC -std=c99 -Wunused"/>
<target name="clean">
@@ -148,8 +148,12 @@
<arg value="-I${native}/linux/opengl"/>
<mapper type="glob" from="*.c" to="*.o"/>
<fileset dir="${native}/linux" includes="*.c"/>
+ <fileset dir="${native}/linux/opengl" includes="*.c"/>
<fileset dir="${native}/generated" includes="*.c"/>
- <fileset dir="${native}/common" includes="*.c"/>
+ <fileset dir="${native}/common" includes="**/*.c" excludes="opengles/**/*"/>
+ <fileset dir="${native}/generated/openal" includes="*.c"/>
+ <fileset dir="${native}/generated/opencl" includes="*.c"/>
+ <fileset dir="${native}/generated/opengl" includes="*.c"/>
</apply>
<apply dir="." parallel="true" executable="gcc" failonerror="true">
<srcfile/>
--- lwjgl-2.9.3+dfsg.orig/src/java/org/lwjgl/opengl/Pbuffer.java
+++ lwjgl-2.9.3+dfsg/src/java/org/lwjgl/opengl/Pbuffer.java
@@ -52,6 +52,7 @@ public final class Pbuffer extends Drawa
/**
* Indicates that Pbuffers can be created.
*/
+ @java.lang.annotation.Native
public static final int PBUFFER_SUPPORTED = 1 << 0;
/**
--- lwjgl-2.9.3+dfsg.orig/src/native/linux/opengl/org_lwjgl_opengl_Pbuffer.c
+++ lwjgl-2.9.3+dfsg/src/native/linux/opengl/org_lwjgl_opengl_Pbuffer.c
@@ -42,6 +42,7 @@
#include <stdlib.h>
#include "org_lwjgl_opengl_LinuxPbufferPeerInfo.h"
#include "org_lwjgl_opengl_Pbuffer.h"
+#include "org_lwjgl_opengl_LinuxDisplay.h"
#include "extgl.h"
#include "context.h"
#include "common_tools.h"