help-glpk
[Top][All Lists]
Advanced

[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: glpk xypron
Subject: Re: [Help-glpk] GLPK-Java JNI in Mac OS X 10.5.8
Date: Wed, 01 Feb 2012 18:22:30 +0100

Hello Ricardo,

on a 64bit system you could install two different Java runtimes:
A 32bit runtime and a 64bit runtime.

A 64bit runtime can only load 64bit libraries.
A 32bit runtime can only load 32bit libraries.

Did you check the bitness of the GLPK library (glpk.dylib)?
The glpk_java.dylib will load glpk.dylib. The bitness must match.

For the bitness of GCC. Compile the proposed code with -m64 and check the 
output again.

Best regards

Xypron

-------- Original-Nachricht --------
> Datum: Wed, 1 Feb 2012 11:00:20 +0100
> Betreff: Re: [Help-glpk] GLPK-Java JNI in Mac OS X 10.5.8

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

-- 
Follow me at http://twitter.com/#!/xypron

Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]