Ubuntu 15.04 中的 Octave-4.0.0 配置步骤警告(未找到 HDF5/jni.h)

Ubuntu 15.04 中的 Octave-4.0.0 配置步骤警告(未找到 HDF5/jni.h)

我正在尝试按照以下说明从源代码安装 Octave-4.0.0维基页面我已经安装了该页面上提到的每个依赖项(也是可选的)。在配置步骤中,我使用了

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

如此处所述,以避免潜在的 HDF5 库相关问题。这样做,我得到了(最初我得到了 JAVA_HOME 警告,后来我修复了它):

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.

此后,为了解决这个问题,我尝试使用如何添加 jni.h将库添加到 ./configure 路径。但是,如果我按照该 configure 命令

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

甚至CPPFLAGS同时使用这两种设置(即在同一./configure行),我得到以下结果:

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.

我应该如何忽略这些警告并正常安装 Octave-4.0.0(目标:图像处理)?

答案1

如果你尝试CPPFLAGS在命令行上定义多个变量,则只有最后一个变量适用。相反,你应该能够组合两个都将指令纳入单身的变量作为引用的字符串:

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

例如

./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

相关内容