From debian bugreport https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892538
``` Source: kamailio Severity: serious Tags: sid buster User: debian-gcc@lists.debian.org Usertags: gcj-rm
Hi,
kamailio depends or build-depends on GCJ. GCJ has been dropped upstream since GCC 7, so we are dropping it from Debian. Thus please either drop support for GCJ if you are just building an alternative package with GCJ support (e.g. ant-gcj, ecj-gcj) or switch to default-jdk / default-jre as appropriate.
Cheers, Emilio ```
``` Java (GCJ)
The GCC Java frontend and associated libjava runtime library have been removed from GCC. ``` Can the ``app_java`` module be built with openjdk-9-jdk?
I am not familiar with app_java, but I guess here it is about compatibility of java devel library across these options, as we do not use java itself for compilation, just include header files and link against the libs.
From this perspective, I wonder if it would be easy to see if other projects with packages in debian did this kind of conversion -- could make things simpler to see how the did it and make similar changes here.
While I don't use app_java at all, I did some work to at least get it to build on modern Fedora 27 systems without GCJ and with the following patch and spec: https://messinet.com/rpms/browser/kamailio/app_java.patch, https://messinet.com/rpms/browser/kamailio/kamailio.spec
Though even with that patch it probably my builds probably wouldn't work--the build is filled with lots of incompatible pointer type warnings like the following so the code probably needs some modernizing too. ``` BUILDSTDERR: java_msgobj.c: In function 'fill_sipmsg_object': BUILDSTDERR: java_msgobj.c:83:27: warning: passing argument 2 of '(*env)->SetIntField' from incompatible pointer type [-Wincompatible-pointer-types] BUILDSTDERR: (*env)->SetIntField(env, SipMsgInstance, fid, msg->id); ```
Closed #1487.
@amessina - thanks, I added some conditions in the Makefile to be able to control how to build it.