简体   繁体   中英

UnsatisfiedLinkError when running SimGrid-Java example on Ubuntu

This question is addressed to people who are familiar with SimGrid . I've been puzzling out since yesterday, but I can't launch any example from simgrid-java. Each of them fail with an exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/simgrid-java455637045639603622/libsimgrid.so: libboost_context.so.1.55.0: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1851)
    at java.lang.Runtime.load0(Runtime.java:795)
    at java.lang.System.load(System.java:1062)
    at org.simgrid.NativeLib.loadLib(NativeLib.java:116)
    at org.simgrid.NativeLib.nativeInit(NativeLib.java:35)
    at org.simgrid.NativeLib.nativeInit(NativeLib.java:26)
    at org.simgrid.msg.Msg.<clinit>(Msg.java:115)
    at async.AsyncTest.main(AsyncTest.java:14)

How can I solve this problem?

Here are the detailed steps I followed to run examples of SimGrid-Java:

1) I downloaded zip-file from here

1a) I've installed libboost-context-dev , so it is libboost-context-dev is already the newest version.

2) In examples-java directory I run javac -classpath /home/ken/Downloads/simgrid.jar async/AsyncTest.java

3) Then I run java -classpath .:/home/ken/Downloads/simgrid.jar async/AsyncTest ../platforms/platform.xml ./async/asyncDeployment.xml

Note: I use java version "1.7.0_95"

This is a documented bug in the v3.12 release of SimGrid.

As noted by ysdx, you should install the boost-context library manually on your machine for this jar file to work. This library must be in version 1.55 precisely. If you have an Ubuntu or Debian, simply type this in a terminal: apt-get install libboost-context1.55.0

If your system complains that this package does not exist in your distribution, then this version of the jar file is not usable on your machine. If it happens, try downloading another version of the jar file from the nightly builds on Jenkins, as explained in the documentation .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM