[syslog-ng] problems compiling 3.17.2 on Ubuntu 16.0.4 with java

Péter, Kókai peter.kokai at oneidentity.com
Tue Sep 4 04:59:33 UTC 2018


Hello,

In order to compile syslog-ng with java, you must have javac (and javah).

Simply replacing javah/c with java is not okay, they are different and not
interchangeable.

You must have JRE to run java based destination which you've installed, but
to compile you must have JDK, which shall contain javah/c.

--
Kokan

On Mon, 3 Sep 2018, 11:06 pm Russell Fulton, <r.fulton at auckland.ac.nz>
wrote:

> I am trying to build syslog-ng with java and json support on Ubuntu 16.0.4.
>
> I can’t use prepackaged version because ubuntu have decided that one must
> not have  both rsyslog (which is our corporate standard) and syslog-ng
> (which I need for its pattern matching in an application) on the same
> machine. Installing one package removes the other.
>
> As well as the standard build tools I have installed these packages via
> apt: jsoncpp, jre and gradle.   Simply running ./configure ran through but
> did not find java (i.e. java and java-module were both set to no).   I
> added —enable java and configure terminated complaining that it could not
> find java.  I dug into the configure script and found that it was executing
> “which javac”  and “javah” both of which failed.  I changed JAVAC to
> “java” and the configure script then completed with both java and java
> module enabled.
>
> Running make then failed
>
> builder at secgendev02:~/src/syslog-ng-3.17.2$ make
> mkdir -p modules/java/syslog-ng-core/classes
>   GEN
>  modules/java/syslog-ng-core/classes/org/syslog_ng/LogMessage.class
> Unrecognized option: -d
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.
> Makefile:20740: recipe for target
> 'modules/java/syslog-ng-core/classes/org/syslog_ng/LogMessage.class’ failed
>
> I am guessing that the version of java the jre package installed is not
> compatible with the configure script.
>
> *builder at secgendev02*:*~/src/syslog-ng-3.17.2*$ java -version
> openjdk version "1.8.0_181"
> OpenJDK Runtime Environment (build
> 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13)
> OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
>
> I know that configure checks the java version so I am somewhat surprised…
>
> Any Ideas on what to try next?
>
> Russell
>
>
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation:
> http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.balabit.com/wiki/syslog-ng-faq
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.balabit.hu/pipermail/syslog-ng/attachments/20180904/d26a6134/attachment.html>


More information about the syslog-ng mailing list