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:
Subject: Re: [Help-glpk] GLPK-Java JNI in Mac OS X 10.5.8
Date: Tue, 31 Jan 2012 09:24:16 +0100

Hi Xypron,

On 31 Jan 2012, at 07:34, glpk xypron wrote:

Hello Ricardo,

java.lang.UnsatisfiedLinkError means that the native library *.dylib either could not be loaded or did not contain the C function needed.

It is necessary that the *.dylib files are in the library search path. For glpk_java.dylib this can be achieved by setting java.library.path when invoking the Java runtime.

When compling you will have run
./configure
make
make check

Did you get the same error when executing "make check"?


Yes, sorry, I forgot to tell it the first time. This is the error I'm getting:

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)
        at org.gnu.glpk.GLPK.glp_term_hook(GLPK.java:721)
        at org.gnu.glpk.GlpkTerminal.<clinit>(GlpkTerminal.java:13)
        at Gmpl.solve(Gmpl.java:27)
        at Gmpl.main(Gmpl.java:12)
make: *** [check] Error 1

It's not *exactly* the same unsatisfied link error, it's in another function but it's the same issue I guess

By the way did you have to make any changes to the configuration script to get it running on OX X? I do not have access to an Apple myself.

:)
Yes, I've to force gcc to compile for 64 bits by setting -m64 option when invoking gcc compiler (CC, CPP variables), and I've to remove any reference to target/source specific when invoking JAVAC (i.e., I've removed the parameters -source 1.6 -target 1.6), because javac returns me an error when compiling:

javac: invalid source release: 1.6

My javac version is
$ javac -version
javac 1.6.0_26

Any idea for fixing it?

Best regards,
Ricardo

Best regards

Xypron
-------- Original-Nachricht --------
Datum: Mon, 30 Jan 2012 11:41:36 +0100
Betreff: [Help-glpk] GLPK-Java JNI in Mac OS X 10.5.8

Dear all,
I've some problems while testing the glpk-java for MacOS X 10.5.8.

I'm working with GLPK-4.47 and libglpk-java-1.0.19. I've downloaded
the latter and properly compile it for x86_64, to avoid the 'match-o,
but wrong architecture' error issue. Now, the library is compiled for
64 bits, and seems to be no problem when being loaded by Java VM.

The problem arises me when I try to invoke GLPK from Java:
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError:
org.gnu.glpk.GLPKJNI.glp_create_prob()J
        at org.gnu.glpk.GLPKJNI.glp_create_prob(Native Method)
        at org.gnu.glpk.GLPK.glp_create_prob(GLPK.java:65)
        at net.sf.javailp.SolverGLPK.solve(SolverGLPK.java:115)
(...)

It seems such a method is not defined in the JAR file, but I'm using
the glpk-java.jar and the JNI dynamic library, recently compiled from
libglpk-java-1.0.19 sources. Am I missing something? Any idea?

It's a pity that the tool I've developed is unavailable to run on
MacOS by this error :'(, it would be wonderful if you guys have some
idea to fix this!


Thanks in advance, regards
--
Ricardo J. Rodríguez
_______________________________________________
Help-glpk mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-glpk

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