https://saxonica.plan.io/https://saxonica.plan.io/favicon.ico2020-04-28T11:11:15ZSaxonica Developer CommunitySaxonC - Bug #4531: Saxon-HEC1.1.2 - issues with installation on linux64 (persistent jni errors) and question concerning python extensionhttps://saxonica.plan.io/issues/4531?journal_id=152722020-04-28T11:11:15ZO'Neil Delprattoneil@saxonica.com
<ul></ul><p>Hi Lars,</p>
<p>It looks like you have an old version of Saxon/C. The python extension was added in the Saxon/C 1.2 series release and is available for all the Saxon products (i.e. HE, PE and EE).</p>
<p>See the download page for the latest Saxon/C release: <a href="https://www.saxonica.com/download/c.xml" class="external">https://www.saxonica.com/download/c.xml</a></p> SaxonC - Bug #4531: Saxon-HEC1.1.2 - issues with installation on linux64 (persistent jni errors) and question concerning python extensionhttps://saxonica.plan.io/issues/4531?journal_id=152732020-04-28T11:11:38ZO'Neil Delprattoneil@saxonica.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>AwaitingInfo</i></li></ul> SaxonC - Bug #4531: Saxon-HEC1.1.2 - issues with installation on linux64 (persistent jni errors) and question concerning python extensionhttps://saxonica.plan.io/issues/4531?journal_id=152762020-04-28T18:19:10ZLars Möller
<ul></ul><p>Hey O'Neil Delpratt,</p>
<p>thank you for your quick reply. Good to know that there is a chance to get it working. Unfortunately I could'nt get back to this earlier.</p>
<p>I downloaded the latest <a href="http://www.saxonica.com/saxon-c/libsaxon-HEC-setup64-v1.2.1.zip" class="external">linux64 binary</a> just yesterday. I only wanted to make sure that the preceeding version did not contain the extension while the docs were outdated or alike. I will delete v1.0.2 now.</p>
<p>My issues arose solely with this latest version. I installed it <a href="http://www.saxonica.com/saxon-c/documentation/index.html#!starting/installing/installingLinux" class="external">as advised</a>, but chose $HOME for installation location as my machine is a single user device.</p>
<p>Basically, I have two issues to solve:</p>
<ol>
<li>
<p>the build64-linux.sh script struggles to find jni.h and aborts the compilation of test samples with 10-12 errors like</p>
<blockquote>
<p>../../Saxon.C.API/SaxonCGlue.h:11:10: fatal error: jni.h: Datei oder Verzeichnis nicht gefunden<br>
#include <jni.h><br>
^~~~~~~<br>
compilation terminated.<br>
In file included from ../../Saxon.C.API/SaxonProcessor.h:32:0,
from ../../Saxon.C.API/XdmValue.h:13,
from ../../Saxon.C.API/XdmItem.h:11,
from ../../Saxon.C.API/XdmItem.cpp:3:<br>
../../Saxon.C.API/SaxonCGlue.h:11:10: fatal error: jni.h: Datei oder Verzeichnis nicht gefunden</p>
</blockquote>
<p>… and a bunch of these (~25):</p>
<blockquote>
<p>g++: error: bin/SaxonCGlue.o: Datei oder Verzeichnis nicht gefunden</p>
</blockquote>
<p>I tried:</p>
<ul>
<li>softlinking included jni.h and companion file to $PATH locations, to .../Saxonica/Saxon-HEC1.1.2/Saxon.C.API, $HOME/.local/bin/ and other places</li>
<li>checked its execution rights</li>
<li>
<code>export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/</code> after I installed openjdk-11-source as an alternative source for jni</li>
<li><code>export JAVA_INCLUDE_DIR=/usr/lib/jvm/java-11-openjdk-amd64/include/</code></li>
<li>exported:</li>
</ul>
</li>
</ol>
<blockquote>
<p>CPLUS_INCLUDE_PATH=/usr/lib/rt/amd64:$JAVA_HOME/include/linux:$JAVA_HOME/include
CPLUS_INCLUDE_PATH=$HOME.local/bin/rt/amd64:$JAVA_HOME/include/linux:$JAVA_HOME/include
CPLUS_INCLUDE_PATH=$HOME.local/bin/rt/amd64:$JAVA_HOME/include/linux:$JAVA_HOME/include:$HOMEDevelopment/Saxonica/Saxon-HEC1.1.2/Saxon.C.API/jni/ and what not</p>
</blockquote>
<p>During all this fiddling, the amount of error messages decreased to the remaining:</p>
<blockquote>
<p>In file included from ../../Saxon.C.API/SaxonCGlue.c:1:0:<br>
../../Saxon.C.API/SaxonCGlue.h:11:10: fatal error: jni.h: Datei oder Verzeichnis nicht gefunden<br>
#include <jni.h><br>
^~~~~~~<br>
compilation terminated.<br>
In file included from ../../Saxon.C.API/SaxonCProcessor.h:4:0,<br>
from ../../Saxon.C.API/SaxonCXPath.h:4,<br>
from ../../Saxon.C.API/SaxonCXPath.c:1:<br>
../../Saxon.C.API/SaxonCGlue.h:11:10: fatal error: jni.h: Datei oder Verzeichnis nicht gefunden<br>
#include <jni.h><br>
^~~~~~~<br>
compilation terminated.<br>
g++: error: bin/SaxonCGlue.o: Datei oder Verzeichnis nicht gefunden<br>
g++: error: bin/SaxonCXPath.o: Datei oder Verzeichnis nicht gefunden<br>
g++: error: bin/SaxonCGlue.o: Datei oder Verzeichnis nicht gefunden<br>
g++: error: bin/SaxonCXPath.o: Datei oder Verzeichnis nicht gefunden<br>
g++: error: bin/SaxonCGlue.o: Datei oder Verzeichnis nicht gefunden<br>
g++: error: bin/SaxonCXPath.o: Datei oder Verzeichnis nicht gefunden<br>
g++: error: bin/SaxonCGlue.o: Datei oder Verzeichnis nicht gefunden<br>
g++: error: bin/SaxonCXPath.o: Datei oder Verzeichnis nicht gefunden</p>
</blockquote>
<p>I don't know how good your German is but "Datei oder Verzeichnis nicht gefunden" translates to "file or directory not found" - you might have guessed it ;-)</p>
<ol start="2">
<li>There is no trace of a python-saxon directory in Saxon.C.API as mentioned in the respective documentation or anywhere in the installation path.</li>
</ol>
<p>Any suggestions or help is very much appreciated. Thank you!</p>
<p>O'Neil Delpratt wrote:</p>
<blockquote>
<p>Hi Lars,</p>
<p>It looks like you have an old version of Saxon/C. The python extension was added in the Saxon/C 1.2 series release and is available for all the Saxon products (i.e. HE, PE and EE).</p>
<p>See the download page for the latest Saxon/C release: <a href="https://www.saxonica.com/download/c.xml" class="external">https://www.saxonica.com/download/c.xml</a></p>
</blockquote> SaxonC - Bug #4531: Saxon-HEC1.1.2 - issues with installation on linux64 (persistent jni errors) and question concerning python extensionhttps://saxonica.plan.io/issues/4531?journal_id=152772020-04-28T19:11:48ZO'Neil Delprattoneil@saxonica.com
<ul></ul><p>With Saxon/C 1.1.2 you can easily run into these issue. In this release you have to set the path to jni header files.</p>
<p>However in Saxon/C 1.2 you won't run into these issues as we now supply the jni header files with the product. Referencing is done locally in the C++ files so that you don't have to set it via the class path.</p> SaxonC - Bug #4531: Saxon-HEC1.1.2 - issues with installation on linux64 (persistent jni errors) and question concerning python extensionhttps://saxonica.plan.io/issues/4531?journal_id=152782020-04-29T06:41:00ZLars Möller
<ul></ul><p>How embarrassing - I repeatedly read 1.1.2 instead of 1.2.1 in your answers and in the link you provided yesterday.</p>
<p>My apologies! I'll try 1.2.1 now. Thanks</p>
<p>O'Neil Delpratt wrote:</p>
<blockquote>
<p>With Saxon/C 1.1.2 you can easily run into these issue. In this release you have to set the path to jni header files.</p>
<p>However in Saxon/C 1.2 you won't run into these issues as we now supply the jni header files with the product. Referencing is done locally in the C++ files so that you don't have to set it via the class path.</p>
</blockquote> SaxonC - Bug #4531: Saxon-HEC1.1.2 - issues with installation on linux64 (persistent jni errors) and question concerning python extensionhttps://saxonica.plan.io/issues/4531?journal_id=152792020-04-29T07:20:15ZLars Möller
<ul></ul><p>Ok, it worked out better this time. A few warnings were thrown, but I suppose it is nothing critical:</p>
<ul>
<li>running the sample build script:</li>
</ul>
<blockquote>
<p>../../Saxon.C.API/XdmValue.cpp: In constructor ‘XdmValue::XdmValue(jobject, bool)’:
../../Saxon.C.API/XdmValue.cpp:74:38: warning: unused parameter ‘arr’ [-Wunused-parameter]
XdmValue::XdmValue(jobject val, bool arr){
^~~
testXSLT30.cpp: In function ‘void exampleSimple_xmark(Xslt30Processor*, sResultCount*)’:
testXSLT30.cpp:674:64: warning: unused parameter ‘sresult’ [-Wunused-parameter]
void exampleSimple_xmark(Xslt30Processor <em>proc, sResultCount <em>sresult){
^~~~~~~
testXSLT30.cpp: In function ‘void testResolveUri(SaxonProcessor</em>, Xslt30Processor</em>, sResultCount*)’:
testXSLT30.cpp:808:38: warning: unused parameter ‘proc’ [-Wunused-parameter]
void testResolveUri(SaxonProcessor * proc, Xslt30Processor * trans, sResultCount * sresult) {
^~~~
testXSLT30.cpp: In function ‘void testPipeline(SaxonProcessor*, sResultCount*)’:
testXSLT30.cpp:920:57: warning: unused parameter ‘sresult’ [-Wunused-parameter]
void testPipeline(SaxonProcessor * proc, sResultCount * sresult){
^~~~~~~
testXPath.cpp: In function ‘void testXPathOnFile(SaxonProcessor*, XPathProcessor*)’:
testXPath.cpp:117:39: warning: unused parameter ‘processor’ [-Wunused-parameter]
void testXPathOnFile(SaxonProcessor * processor, XPathProcessor * xpath){
^~~~~~~~~</p>
</blockquote>
<ul>
<li>the ./buildhec-command.sh for commands</li>
</ul>
<blockquote>
<p>Transform.c: In function ‘checkForException’:
Transform.c:234:2: warning: format not a string literal and no format arguments [-Wformat-security]
printf(utfName);
^~~~~~
Query.c: In function ‘checkForException’:
Query.c:232:2: warning: format not a string literal and no format arguments [-Wformat-security]
printf(utfName);
^~~~~~</p>
</blockquote>
<ul>
<li>and I found something supposedly unwanted in the script ./testXSLT in cpp</li>
</ul>
<blockquote>
<p>Test: XsltProcessor with Saxon version=Saxon/C 1.2.1 running with Saxon-HE 9.9.1.5C from Saxonica</p>
</blockquote>
<blockquote>
<p>Error
I/O error reported by XML parser processing
<strong>/home/ond1/work/svn/latest9.9-saxonc/samples/php/catalog-test/test1.xsl:</strong> Datei oder
Verzeichnis nicht gefunden …</p>
</blockquote>
<p>Thanks for the guide! I propose we close this issue.</p> SaxonC - Bug #4531: Saxon-HEC1.1.2 - issues with installation on linux64 (persistent jni errors) and question concerning python extensionhttps://saxonica.plan.io/issues/4531?journal_id=152802020-04-29T07:24:32ZO'Neil Delprattoneil@saxonica.com
<ul></ul><p>Great that you got it working. It looks like you are running the C++ samples.
For python I suggest you follow the instructions given here: <a href="https://www.saxonica.com/saxon-c/documentation/index.html#!starting/installingpython" class="external">Installing Saxon/C Python extension</a></p> SaxonC - Bug #4531: Saxon-HEC1.1.2 - issues with installation on linux64 (persistent jni errors) and question concerning python extensionhttps://saxonica.plan.io/issues/4531?journal_id=152812020-04-29T07:44:30ZLars Möller
<ul><li><strong>File</strong> <a href="/attachments/48970">saxon-setup_build.log</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/48970/saxon-setup_build.log">saxon-setup_build.log</a> added</li></ul><p>That was only for testing - followed the instructions for python and it finished with a few warnings (see attachment) but again no critical error.</p>
<p>I try to implement it this afternoon - if you don't mind I'll get back to you if I get stuck somewhere.</p>
<p>Thanks again!</p> SaxonC - Bug #4531: Saxon-HEC1.1.2 - issues with installation on linux64 (persistent jni errors) and question concerning python extensionhttps://saxonica.plan.io/issues/4531?journal_id=152822020-04-29T07:45:51ZO'Neil Delprattoneil@saxonica.com
<ul><li><strong>Status</strong> changed from <i>AwaitingInfo</i> to <i>Closed</i></li></ul><p>Great! I will close this bug.</p>