[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] GLPK-Java JNI in Mac OS X 10.5.8
From: |
|
Subject: |
Re: [Help-glpk] GLPK-Java JNI in Mac OS X 10.5.8 |
Date: |
Wed, 1 Feb 2012 11:00:20 +0100 |
Dear Xypron,
OK, I've executed again the original ./configure and the original
Makefile without modifying anything.
/configure CPPFLAGS=-I/System/Library/Frameworks/
JavaVM.framework/Headers SWIGFLAGS=-I/System/Library/
Frameworks/JavaVM.framework/Headers JAVA_HOME=/System/Library/
Frameworks/JavaVM.framework/Versions/1.6.0/Home/
I've properly set JAVA_HOME avoiding the 'invalid source release',
thank you. I don't get why MacOS have all JavaVM installed by default
up to 1.6, and the 'Current' is linked to 1.5 by default ¿? anyway...
Setting all by default, as I said, without modifying anything, this is
the error I get when executing 'make check':
Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/
death/Downloads/libglpk-java-1.0.19/swig/.libs/libglpk_java.0.dylib:
no suitable image found. Did find: /Users/death/Downloads/libglpk-
java-1.0.19/swig/.libs/libglpk_java.0.dylib: mach-o, but wrong
architecture
I've been googling, and I found that it seems that Java is not able to
load a 32bit library, even it should be:
$ lipo -info /usr/bin/java
Architectures in the fat file: /usr/bin/java are: ppc7400 i386 x86_64
And the GLPK-java library is:
$ lipo -info libglpk-java-1.0.19/swig/.libs/libglpk_java.dylib
Non-fat file: libglpk-java-1.0.19/swig/.libs/libglpk_java.dylib is
architecture: i386
That's the reason I added the flag -m64. By compiling it with such a
flag, I get the error I commented before:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
org.gnu.glpk.GLPKJNI.glp_term_hook(JJ)V
at org.gnu.glpk.GLPKJNI.glp_term_hook(Native Method)
About the architecture, I think (please correct me if I'm wrong) that
MacOS X 10.5.8 is 32bit kernel only.
I've checked with the source codes you've given to me and the results
are:
GCC: Running in 32bit mode.
Java: 64
So... I'm running a JavaVM 64bits in a computer running in 32bit
environment... interesting
Any further idea?
Best regards,
Ricardo
- Re: [Help-glpk] GLPK-Java JNI in Mac OS X 10.5.8,
<=