[pHash-support] Macports --enable-java error

Evan Klinger eklinger at phash.org
Wed Dec 15 08:51:16 PST 2010


George,
You must install a Java SDK in order to get the jni.h header file that is
required to build the Java bindings. You can download this from Sun's web
site.

Thanks
Evan

On Wed, Dec 15, 2010 at 7:44 AM, George George <tennis.ne1 at sbcglobal.net>wrote:

> I'm having problems getting macports to compile phash with java bindings
> enabled and don't how to fix this.  Here is the error log:
>
> :info:build Making all in bindings
> :info:build Making all in java
> :info:build /bin/sh ../../libtool --tag=CXX   --mode=compile
> /usr/bin/g++-4.2 -DHAVE_CONFIG_H -I. -I../.. -I../../src  -pipe -O2 -arch
> x86_64 -D_THREAD_SAFE  -Dcimg_use_jpeg  -pipe -O2 -arch x86_64 -ffast-math
> -O3 -MT pHash-jni.lo -MD -MP -MF .deps/pHash-jni.Tpo -c -o pHash-jni.lo
> pHash-jni.cpp
> :info:build libtool: compile:  /usr/bin/g++-4.2 -DHAVE_CONFIG_H -I. -I../..
> -I../../src -pipe -O2 -arch x86_64 -D_THREAD_SAFE -Dcimg_use_jpeg -pipe -O2
> -arch x86_64 -ffast-math -O3 -MT pHash-jni.lo -MD -MP -MF
> .deps/pHash-jni.Tpo -c pHash-jni.cpp  -fno-common -DPIC -o .libs/pHash-jni.o
> :info:build pHash-jni.cpp:26:17: error: jni.h: No such file or directory
> :info:build In file included from pHash-jni.cpp:27:
> :info:build pHash-jni.h:15: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.h:23: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.h:31: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.h:39: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.h:47: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.h:55: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.h:63: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.h:71: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.h:79: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.h:87: error: expected constructor, destructor, or
> type conversion before 'void'
> :info:build pHash-jni.h:95: error: expected constructor, destructor, or
> type conversion before 'void'
> :info:build In file included from pHash-jni.cpp:29:
> :info:build pHash_MVPTree.h:15: error: 'JNIEXPORT' does not name a type
> :info:build pHash_MVPTree.h:23: error: 'JNIEXPORT' does not name a type
> :info:build pHash_MVPTree.h:31: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.cpp:35: error: 'jfieldID' does not name a type
> :info:build pHash-jni.cpp:36: error: 'jfieldID' does not name a type
> :info:build pHash-jni.cpp:37: error: 'jfieldID' does not name a type
> :info:build pHash-jni.cpp:38: error: 'jfieldID' does not name a type
> :info:build pHash-jni.cpp:40: error: 'jfieldID' does not name a type
> :info:build pHash-jni.cpp:42: error: 'jclass' does not name a type
> :info:build pHash-jni.cpp:43: error: 'jclass' does not name a type
> :info:build pHash-jni.cpp:44: error: 'jclass' does not name a type
> :info:build pHash-jni.cpp:45: error: 'jclass' does not name a type
> :info:build pHash-jni.cpp:47: error: 'jmethodID' does not name a type
> :info:build pHash-jni.cpp:48: error: 'jmethodID' does not name a type
> :info:build pHash-jni.cpp:49: error: 'jmethodID' does not name a type
> :info:build pHash-jni.cpp:50: error: 'jmethodID' does not name a type
> :info:build pHash-jni.cpp:62: error: ISO C++ forbids declaration of
> 'jclass' with no type
> :info:build pHash-jni.cpp:62: error: expected ';' before '*' token
> :info:build pHash-jni.cpp:66: error: ISO C++ forbids declaration of
> 'jmethodID' with no type
> :info:build pHash-jni.cpp:66: error: expected ';' before '*' token
> :info:build pHash-jni.cpp:67: error: ISO C++ forbids declaration of
> 'jfieldID' with no type
> :info:build pHash-jni.cpp:67: error: expected ';' before '*' token
> :info:build pHash-jni.cpp:121: error: 'mhImClass' was not declared in this
> scope
> :info:build pHash-jni.cpp:121: error: 'mhImCtor' was not declared in this
> scope
> :info:build pHash-jni.cpp:121: error: 'mhImHash_hash' was not declared in
> this scope
> :info:build pHash-jni.cpp:122: error: 'dctImClass' was not declared in this
> scope
> :info:build pHash-jni.cpp:122: error: 'dctImCtor' was not declared in this
> scope
> :info:build pHash-jni.cpp:122: error: 'dctImHash_hash' was not declared in
> this scope
> :info:build pHash-jni.cpp:123: error: 'vidClass' was not declared in this
> scope
> :info:build pHash-jni.cpp:123: error: 'vidCtor' was not declared in this
> scope
> :info:build pHash-jni.cpp:123: error: 'vidHash_hash' was not declared in
> this scope
> :info:build pHash-jni.cpp:124: error: 'audioClass' was not declared in this
> scope
> :info:build pHash-jni.cpp:124: error: 'audioCtor' was not declared in this
> scope
> :info:build pHash-jni.cpp:124: error: 'audioHash_hash' was not declared in
> this scope
> :info:build pHash-jni.cpp:125: error: too many initializers for 'const
> jniHashes'
> :info:build pHash-jni.cpp:125: error: too many initializers for 'const
> jniHashes'
> :info:build pHash-jni.cpp:125: error: too many initializers for 'const
> jniHashes'
> :info:build pHash-jni.cpp:125: error: too many initializers for 'const
> jniHashes'
> :info:build pHash-jni.cpp:125: error: cannot convert 'ph_hashtype' to
> 'float (*)(DP*, DP*)' in initialization
> :info:build pHash-jni.cpp:125: error: cannot convert 'float (*)(DP*, DP*)'
> to 'jniHashType' in initialization
> :info:build pHash-jni.cpp:125: error: cannot convert 'ph_hashtype' to
> 'float (*)(DP*, DP*)' in initialization
> :info:build pHash-jni.cpp:125: error: cannot convert 'float (*)(DP*, DP*)'
> to 'jniHashType' in initialization
> :info:build pHash-jni.cpp:125: error: cannot convert 'ph_hashtype' to
> 'float (*)(DP*, DP*)' in initialization
> :info:build pHash-jni.cpp:125: error: cannot convert 'float (*)(DP*, DP*)'
> to 'jniHashType' in initialization
> :info:build pHash-jni.cpp:125: error: cannot convert 'ph_hashtype' to
> 'float (*)(DP*, DP*)' in initialization
> :info:build pHash-jni.cpp:125: error: cannot convert 'float (*)(DP*, DP*)'
> to 'jniHashType' in initialization
> :info:build pHash-jni.cpp:127: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.cpp:254: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.cpp:384: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.cpp:493: error: expected constructor, destructor, or
> type conversion before 'void'
> :info:build pHash-jni.cpp:515: error: expected constructor, destructor, or
> type conversion before 'void'
> :info:build pHash-jni.cpp:524: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.cpp:552: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.cpp:594: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.cpp:612: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.cpp:638: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.cpp:666: error: 'JNIEXPORT' does not name a type
> :info:build pHash-jni.cpp:690: error: 'JNIEXPORT' does not name a type
> :info:build make[3]: *** [pHash-jni.lo] Error 1
> :info:build make[2]: *** [all-recursive] Error 1
> :info:build make[1]: *** [all-recursive] Error 1
> :info:build make: *** [all] Error 2
> :info:build shell command " cd
> "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_multimedia_pHash/work/pHash-0.9.3"
> && /usr/bin/make -j2 all " returned error 2
> :error:build Target org.macports.build returned: shell command failed (see
> log for details)
> :debug:build Backtrace: shell command failed (see log for details)
>     while executing
> "command_exec build"
>     (procedure "portbuild::build_main" line 8)
>     invoked from within
> "$procedure $targetname"
> :info:build Warning: the following items did not execute (for pHash):
> org.macports.activate org.macports.build org.macports.destroot
> org.macports.install
> :notice:build Log for pHash is at:
> /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_multimedia_pHash/main.log
>
> _______________________________________________
> pHash-support mailing list
> pHash-support at lists.phash.org
> http://lists.phash.org/listinfo.cgi/phash-support-phash.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phash.org/pipermail/phash-support-phash.org/attachments/20101215/efd7e399/attachment-0002.htm>


More information about the pHash-support mailing list