Hello,<div><br></div><div>In order to compile syslog-ng with java, you must have javac (and javah). </div><div><br></div><div>Simply replacing javah/c with java is not okay, they are different and not interchangeable. </div><div><br></div><div>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. </div><div><br></div><div>--</div><div>Kokan<br><br><div class="gmail_quote"><div dir="ltr">On Mon, 3 Sep 2018, 11:06 pm Russell Fulton, <<a href="mailto:r.fulton@auckland.ac.nz">r.fulton@auckland.ac.nz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">I am trying to build syslog-ng with java and json support on Ubuntu 16.0.4.<div><br></div><div>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.</div><div><br></div><div>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 “<font face="Menlo">which javac</font>”  and “<font face="Menlo">javah</font>” both of which failed.  I changed JAVAC to “java” and the configure script then completed with both java and java module enabled.</div><div><br></div><div>Running make then failed </div><div><font face="Menlo"><br></font></div><div><font face="Menlo">builder@secgendev02:~/src/syslog-ng-3.17.2$ make<br>mkdir -p modules/java/syslog-ng-core/classes<br>  GEN      modules/java/syslog-ng-core/classes/org/syslog_ng/LogMessage.class<br>Unrecognized option: -d<br>Error: Could not create the Java Virtual Machine.<br>Error: A fatal exception has occurred. Program will exit.<br>Makefile:20740: recipe for target 'modules/java/syslog-ng-core/classes/org/syslog_ng/LogMessage.class’ failed<br><br></font></div><div>I am guessing that the version of java the jre package installed is not compatible with the configure script.</div><div><br></div><div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;color:rgb(82,48,225);background-color:rgb(255,255,255)"><font face="Menlo"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(52,188,38)"><b>builder@secgendev02</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">:</span><span style="font-variant-ligatures:no-common-ligatures"><b>~/src/syslog-ng-3.17.2</b></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">$ java -version</span></font></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><font face="Menlo">openjdk version "1.8.0_181"</font></span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><font face="Menlo">OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13)</font></span></div><div style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;background-color:rgb(255,255,255)"><span style="font-variant-ligatures:no-common-ligatures"><font face="Menlo">OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)</font></span></div></div><div><span style="font-variant-ligatures:no-common-ligatures"><font face="Menlo"><br></font></span></div><div><span style="font-variant-ligatures:no-common-ligatures">I know that configure checks the java version so I am somewhat surprised…</span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures">Any Ideas on what to try next?</span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures">Russell</span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div></div>______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></div></div>