VMware Cloud Community
PeterDKahn
Contributor
Contributor

Solaris JNI Failure and Pre-requisites question

Hi all,

Where can I find the requirements for a Solaris x64 jni build?  I have Solaris x64 with Sun's x64 compilers and gcc x86.  I believe I need x64 gcc given the ant scripts expect solaris to use gcc.  I'd like to find out which packages (gcc etc) are expected so I can efficiently build this library.

Please let me know where I can locate the list of build system requirements.  The building doc doesn't seem to cover this point. (http://support.hyperic.com/display/SIGAR/Home#Home-building).

Thanks

Peter

[cc] /hyperic-sigar/bindings/java/src/jni/javasigar.c:1: sorry, unimplemented: 64-bit mode not compiled in
[cc] /hyperic-sigar/bindings/java/src/jni/javasigar.c: In function `sigar_get_pointer':
[cc] /hyperic-sigar/bindings/java/src/jni/javasigar.c:273: warning: cast to pointer from integer of different size
[cc] /hyperic-sigar/bindings/java/src/jni/javasigar.c: In function `sigar_set_pointer':
[cc] /hyperic-sigar/bindings/java/src/jni/javasigar.c:382: warning: cast from pointer to integer of different size

Tags (3)
0 Kudos
1 Reply
PeterDKahn
Contributor
Contributor

The sunfreeware gcc package is x86/32 only.  To build x64 we must use the x64 gcc bundled with the os (/usr/sfw/bin)

e.g.,  export PATH=/usr/sfw/bin:/usr/local/bin:$PATH   (sun's x64 gcc,  sunfreeware's x86 gcc, rest-of-path)

Changing this allowed me to build properly.   FYI - /usr/sfw/bin contains ant as well so you may need to set ANT_HOME and place it at the front of the path.

Best of luck

Peter

0 Kudos