[pHash-support] pHash + jni.h + Ubuntu

Sebastian Gallese sebastiangallese at gmail.com
Sat Jan 9 09:11:27 PST 2010


Howdy again,

Just got back from my winter vacation and looking at compiling pHash
again (I'll have a go on the Mac once I figure out how to update g++).
 Here is my current setup:

Ubuntu 9.10 (Karmic)
pHash 0.7.2
Sun Java 6 JDK (java-6-sun-1.6.0.15 installed from ports)

pHash compiles without java enabled, but when I try to turn java on,
it can't find the jni.h file.

make[3]: Entering directory `/home/kdge/pHash-0.7.2/bindings/java'
/bin/bash ../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H
-I. -I../.. -I../../src  -I/usr/local/include -DHAVE_IMAGE_HASH=1
-DHAVE_VIDEO_HASH=1 -DHAVE_AUDIO_HASH=1 -Dcimg_use_jpeg -Dcimg_use_png
 -O2 -ffast-math -O3 -MT pHash-jni.lo -MD -MP -MF .deps/pHash-jni.Tpo
-c -o pHash-jni.lo pHash-jni.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I../../src
-I/usr/local/include -DHAVE_IMAGE_HASH=1 -DHAVE_VIDEO_HASH=1
-DHAVE_AUDIO_HASH=1 -Dcimg_use_jpeg -Dcimg_use_png -O2 -ffast-math -O3
-MT pHash-jni.lo -MD -MP -MF .deps/pHash-jni.Tpo -c pHash-jni.cpp
-fPIC -DPIC -o .libs/pHash-jni.o
pHash-jni.cpp:2:17: error: jni.h: No such file or directory

Full output at http://gist.github.com/272981

Here is what my .profile looks like

export JAVA_HOME=/usr/lib/jvm/java-6-sun
export JDK_HOME=/usr/lib/jvm/java-6-sun
export JNI_INCLUDE_DIR=/usr/lib/jvm/java-6-sun/include
export JAVA_INCLUDE=/usr/lib/jvm/java-6-sun/include
export PATH=$PATH:$JAVA_HOME/bin

I assume something is wrong with the path class to the jni.h file.
For sh*** and giggles, I copied everything from
/usr/lib/jvm/java-6-sun/include into the pHash folder (only later to
delete all of them):
classfile_constants.h  jawt.h  jdwpTransport.h  jni.h  jvmti.h  linux

Thus, I'm wondering how I should set my class path?  I know this is
more of a jni.h question rather than a pHash problem; however, none of
the solutions online solved my situation.  I'd like to imitate your
setup.

Thanks,

Seb

--
Sebastian Gallese



More information about the pHash-support mailing list