1

I am trying to install Octave-4.0.0 from source following the instructions from the wiki page. I have installed every single dependency (optional too) mentioned on that page. In the configuration step I used

./configure CPPFLAGS=-I/usr/include/hdf5/serial \
            LDFLAGS=-L/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/hdf5/serial

as given there to avoid potential HDF5 library related problems. Doing this, I got (initially I was getting JAVA_HOME warning, which I then fixed):

configure: WARNING: Include file <jni.h> not found.  Octave will not be able to call Java methods.
configure: 
configure: NOTE: Libraries or auxiliary programs may be skipped if they are
configure: NOTE: not found OR if they are missing required features on your
configure: NOTE: system.

Thereafter, to fix this, I tried using how to add jni.h and adding libraries to ./configure path. But, if I follow that configure command with

./configure CPPFLAGS=-I/usr/lib/jvm/java-7-openjdk-amd64/include

or even use both the CPPFLAGS settings together (that is, in the same ./configure line), I get this:

configure: WARNING: HDF5 library not found.  Octave will not be able to save or load HDF5 data files.
configure: WARNING: Include file jni.h not found.  Octave will not be able to call Java methods. 
configure:   
configure: NOTE: Libraries or auxiliary programs may be skipped if they are
configure: NOTE: not found OR if they are missing required features on your
configure: NOTE: system.

How should I pass these warnings and install Octave-4.0.0 gracefully (target: image processing)?

devautor
  • 111
  • 4

1 Answers1

0

If you try to define multiple CPPFLAGS variables on the command line, only the last one will apply. Instead, you should be able to combine both include directives into a single variable as a quoted string:

CPPFLAGS="-I/usr/include/hdf5/serial -I/usr/lib/jvm/java-7-openjdk-amd64/include"

e.g.

./configure \
  CPPFLAGS="-I/usr/include/hdf5/serial -I/usr/lib/jvm/java-7-openjdk-amd64/include" \
  LDFLAGS=-L/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/hdf5/serial
steeldriver
  • 136,215
  • 21
  • 243
  • 336
  • Thanks, but still getting jni.h warning. Is there something wrong with my JAVA_PATH instead or something? My echo $JAVA_HOME gives /usr/lib/jvm/java-8-sun/bin (though I have had set it openjdk-7-amd64 many-a-times)! – devautor Jul 17 '15 at 14:58
  • If your $JAVA_HOME is /usr/lib/jvm/java-8-sun, then why try to build Octave with /usr/lib/jvm/java-7-openjdk-amd64? – Michael Miller Sep 16 '15 at 21:44