[kepler-dev] [Bug 5346] Kepler 2.2r3 Mac OS 64-bit Matlab demo fails with 'no suitable image found'
bugzilla-daemon at ecoinformatics.org
bugzilla-daemon at ecoinformatics.org
Thu Mar 17 11:10:08 PDT 2011
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5346
--- Comment #8 from Christopher Brooks <cxh at eecs.berkeley.edu> 2011-03-17 11:10:07 PDT ---
Ok, I have my Matlab license situation fixed.
I'm running a 64bit Matlab R2009b with Mac OS 10.5.8 and
java.version = 1.6.0_22
Under Ptolemy, this command works, the plot appears
$PTII/bin/vergil
~/ptII/ptolemy/matlab/demo/MatlabExpression/MatlabExpression.xml
View -> JVM Properties says:
java.library.path =
/Users/cxh/ptII/lib:/Applications/MATLAB_R2009b.app/bin/maci64:/Applications/jprofiler5_2_4/bin/macos:.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
Note that /Applications/MATLAB_R2009b.app/bin/maci64 is in the path
Kepler devel run with "ant run" fails when
I do Help -> Kepler Documentation -> background information on Ptolemy
->Documentation -> Complete List of Demos -> SDF -> Matlab Expression.
The error is
ptolemy.kernel.util.IllegalActionException: There was a problem invoking the
Ptolemy II Matlab interface.
The interface has been tested under Linux, Mac OS X, and Windows.
The interface requires that Matlab be installed on the local machine and that
the ptmatlab shared library available.
* Under Linux, you must have the LD_LIBRARY_PATH environment variable set to
include the directories that contain libmx.so and libptmatlab.so.
* Under Mac OS X, you must have the DYLD_LIBRARY_PATH environment variable set
to include the directories that contain libmx.dylib and libptmatlab.jnilib.
* Under Windows, you must have your PATH set to include the Matlab bin/win32 or
equivalent directory so that libmex.dll is found and the directory that
contains libptmatlab.dll. In addition, if you are running under Windows from
the Cygwin bash prompt, then you must start Vergil with the -jni argument:
$PTII/bin/vergil -jni. For details, see $PTII/jni/package.html.
Refer to $PTII/ptolemy/matlab/makefile for more information.
in .MatlabExpression.MatlabExpression
Because:
/Users/cxh/src/kepler/common/lib/ptolemy/matlab/libptmatlab.jnilib: no
suitable image found. Did find:
/Users/cxh/src/kepler/common/lib/ptolemy/matlab/libptmatlab.jnilib: unknown
required load command 0x80000022
at ptolemy.matlab.Expression.preinitialize(Expression.java:263)
at ptolemy.actor.Director.preinitialize(Director.java:1010)
at ptolemy.actor.Director.preinitialize(Director.java:991)
at
ptolemy.domains.sdf.kernel.SDFDirector.preinitialize(SDFDirector.java:647)
at ptolemy.actor.CompositeActor.preinitialize(CompositeActor.java:1736)
at ptolemy.actor.Manager.preinitializeAndResolveTypes(Manager.java:983)
at ptolemy.actor.Manager.initialize(Manager.java:643)
at ptolemy.actor.Manager.execute(Manager.java:340)
at ptolemy.actor.Manager.run(Manager.java:1164)
at ptolemy.actor.Manager$3.run(Manager.java:1217)
Caused by: java.lang.UnsatisfiedLinkError:
/Users/cxh/src/kepler/common/lib/ptolemy/matlab/libptmatlab.jnilib: no
suitable image found. Did find:
/Users/cxh/src/kepler/common/lib/ptolemy/matlab/libptmatlab.jnilib: unknown
required load command 0x80000022
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1823)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1699)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1020)
at
ptolemy.data.expr.UtilityFunctions._loadLibrary(UtilityFunctions.java:1985)
at
ptolemy.data.expr.UtilityFunctions.loadLibrary(UtilityFunctions.java:847)
at ptolemy.matlab.Engine.<clinit>(Engine.java:176)
at ptolemy.matlab.Expression.preinitialize(Expression.java:260)
... 9 more
Caused by: java.lang.UnsatisfiedLinkError:
/Users/cxh/src/kepler/common/lib/ptolemy/matlab/libptmatlab.jnilib: no
suitable image found. Did find:
/Users/cxh/src/kepler/common/lib/ptolemy/matlab/libptmatlab.jnilib: unknown
required load command 0x80000022
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1823)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1699)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1020)
at
ptolemy.data.expr.UtilityFunctions._loadLibrary(UtilityFunctions.java:1985)
at
ptolemy.data.expr.UtilityFunctions.loadLibrary(UtilityFunctions.java:847)
at ptolemy.matlab.Engine.<clinit>(Engine.java:176)
at ptolemy.matlab.Expression.preinitialize(Expression.java:260)
at ptolemy.actor.Director.preinitialize(Director.java:1010)
at ptolemy.actor.Director.preinitialize(Director.java:991)
at
ptolemy.domains.sdf.kernel.SDFDirector.preinitialize(SDFDirector.java:647)
at ptolemy.actor.CompositeActor.preinitialize(CompositeActor.java:1736)
at ptolemy.actor.Manager.preinitializeAndResolveTypes(Manager.java:983)
at ptolemy.actor.Manager.initialize(Manager.java:643)
at ptolemy.actor.Manager.execute(Manager.java:340)
at ptolemy.actor.Manager.run(Manager.java:1164)
at ptolemy.actor.Manager$3.run(Manager.java:1217)
In this version of Kepler, the java.library.path does *not*
include the Matlab directory:
java.library.path =
/Users/cxh/src/kepler/r/lib:/Users/cxh/src/kepler/common/lib:/Users/cxh/src/kepler/common/lib/ptolemy/matlab
Interestingly, when I do
cp /Users/cxh/ptII/lib/libptmatlab.jnilib
/Users/cxh/src/kepler/common/lib/ptolemy/matlab/libptmatlab.jnilib
then
ant run-only
-Dworkflow=../ptolemy/src/ptolemy/matlab/demo/MatlabExpression/MatlabExpression.xml
works!
So, it looks like kepler/common/lib/ptolemy/matlab/libptmatlab.jnilib
does not work on my Mac OS X 10.5.8
>From the stacktrace above:
/Users/cxh/src/kepler/common/lib/ptolemy/matlab/libptmatlab.jnilib: no
suitable image found. Did find:
/Users/cxh/src/kepler/common/lib/ptolemy/matlab/libptmatlab.jnilib: unknown
required load command 0x80000022
Searching the net for "unknown required load command 0x80000022"
results in some possible issues with CFLAGS.
I'm not sure how kepler/common/lib/ptolemy/matlab/libptmatlab.jnilib
is generated, but that would be the place to start.
Kepler-2.2rc3
Help -> Kepler Documentation -> background information on Ptolemy
->Documentation -> Complete List of Demos -> SDF -> Matlab Expression.
I got basically the same stacktrace as above:
/Applications/Kepler-2.2rc3/Kepler.app/Contents/Resources/Java/common-2.2.0/lib/ptolemy/matlab/libptmatlab.jnilib:
no suitable image found. Did find:
/Applications/Kepler-2.2rc3/Kepler.app/Contents/Resources/Java/common-2.2.0/lib/ptolemy/matlab/libptmatlab.jnilib:
unknown required load command 0x80000022
One issue is that there are to libptmatlab.jnilib files in Kepler-2.2rc3:
59005405 128 -rw-r--r-- 1 cxh admin 61472 Feb 28 21:12
./Resources/Java/common-2.2.0/lib/ptolemy/matlab/libptmatlab.jnilib
59006098 120 -rw-r--r-- 1 cxh admin 58728 Feb 28 21:12
./Resources/Java/ptolemy-8.1.0/lib/ptolemy-lib/libptmatlab.jnilib
If I do:
cp ~/ptII/ptolemy/matlab/libptmatlab.jnilib
./Resources/Java/common-2.2.0/lib/ptolemy/matlab/libptmatlab.jnilib
Then the MatlabExpression demo works under Kepler-2.2rc3.
--
Configure bugmail: http://bugzilla.ecoinformatics.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the Kepler-dev
mailing list