[kepler-dev] questions about matlab actor in 64 bit window 7.

Christopher Brooks cxh at eecs.berkeley.edu
Tue Apr 27 18:04:45 PDT 2010


Hi Jianwu,
Hmm, I don't have a Windows 64 platform on which to try Matlab.

However, the problem below looks to be something to do with gcc?
The message:
 > gcc: installation problem, cannot exec 'cc1plus': No such file or directory
is suspect

BTW - Cygwin under Windows is rather pathetic these days.
- Christopher Faylor broke GNU make under Cygwin, see
http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII7.0/limitations.htm

- When I install Cygwin, the c: file system is mounted in such
a way that shell scripts don't work, see
https://lists.eecs.berkeley.edu/sympa/arc/ptolemy-hackers/2010-04/msg00017.html

In addition using JNI under Cygwin has been difficult.  It has been best
to invoke a C binary and then invoke Java, see $PTII/jni/launcher.

That said, under Cygwin under Windows, I've found it easiest to work with the code
in $PTII/jni and get those tests working first as the tests are simple.

Another issue is that every version of Matlab might require a different
share library.  In addition, we have the 32bit vs 64bit issue.   Fortunately
most platforms are moving towards 64 bit, so this will go away in the future.
However, if we are to support Mac OS X, Windows and Linux, then we may need
32 bit and 64 bit versions for each platform (total 6).  Also, there could be JDK
version dependencies, so if we want to support JDK 1.5 and 1.6 then we could have
12 files.  If we want to support the most recent version of Matlab and one version
back, then that is 24 files, or at least as many 24 different tests that we
should do.

Sigh.

I'm traveling this week and off the network on Wednesday.


_Christopher






On 4/27/10 4:05 PM, Jianwu Wang wrote:
> Hi Christopher,
>
> I just tried your new make in 64bit window7. It doesn't work. In 64 bit
> matlab, I only have directory C:\Program Files\MATLAB\R2010a\bin\win64,
> no C:\Program Files\MATLAB\R2010a\bin\win32.
>
> In PATH, I have /cygdrive/c/Program
> Files/MATLAB/R2010a/runtime/win64:/cygdrive/c/Program
> Files/MATLAB/R2010a/bin:/cygdrive/c/Program Files/MATLAB/R2010a/bin/win64.
>
> I think the makefile needs to be updated, right? Thanks.
>
> $ make
> rm -f `basename Engine.java .java`.class
> CLASSPATH="../.." "/cygdrive/c/Program Files/Java/jdk1.6.0_20/bin/javac"
> -g -O Engine.java
> if [ "`uname -s`" = "Darwin" ]; then \
> if [ -d "c:/Program Files/MATLAB/R2010a/bin/win32" -a -d "" ]; then \
> echo "# Making 32 and 64 bit Universal Library ptmatlabUniversal.dll and
> then copying to ptmatlab.dll"; \
> make ptmatlabUniversal.dll; \
> mv ptmatlabUniversal.dll ptmatlab.dll; \
> else \
> if [ -d "c:/Program Files/MATLAB/R2010a/bin/win32" ]; then \
> echo "# Making ptmatlab32.dll and then copying to ptmatlab.dll"; \
> make ptmatlab32.dll; \
> mv ptmatlab32.dll ptmatlab.dll; \
> else \
> if [ -d "" ]; then \
> echo "# Big bucks! Congrats!! making ptmatlab64.dll and copying to
> ptmatlab.dll"; \
> make ptmatlab64.dll; \
> mv ptmatlab64.dll ptmatlab.dll; \
> else \
> echo "# MATLAB_LIBDIR 'c:/Program Files/MATLAB/R2010a/bin/win32' and/or
> MATLAB_64LIBDIR '' don't exist, try rerunning configure."; \
> exit 1; \
> fi; \
> fi; \
> fi; \
> echo "# The file command reports that ptmatlab.dll is: "; \
> file ptmatlab.dll; \
> else \
> CLASSPATH="../.." "/cygdrive/c/Program Files/Java/jdk1.6.0_20/bin/javah"
> -jni -o ptmatlab.h ptolemy.matlab.Engine; \
> "/usr/bin/gcc" -DPT_NO_ENGGETARRAY -DPT_NO_ENGPUTARRAY -DPT_NO_MXGETNAME \
> "-Ic:/Program Files/MATLAB/R2010a/extern/include" \
> "-IC:/Program Files/Java/jdk1.6.0_20/jre/../include" \
> "-IC:/Program Files/Java/jdk1.6.0_20/jre/../include/win32" \
> -shared ptmatlab.cc -fno-exceptions -o ptmatlab.dll -L"c:/Program
> Files/MATLAB/R2010a/bin/win32" -Wl,--add-stdcall-alias -lc -leng -lmx
> -lmex; \
> fi
> gcc: installation problem, cannot exec 'cc1plus': No such file or directory
> make: *** [ptmatlab.dll] Error 1
>
> Best wishes
>
> Sincerely yours
>
> Jianwu Wang
> jianwu at sdsc.edu
> http://users.sdsc.edu/~jianwu/
>
> Scientific Workflow Automation Technologies (SWAT) Laboratory
> San Diego Supercomputer Center
> University of California, San Diego
> San Diego, CA, U.S.A.
>
>
> On 4/26/2010 4:42 PM, Christopher Brooks wrote:
>> Hi Jianwu,
>> I just updated $PTII/ptolemy/ptolemy/makefile so that it will build
>> either
>> * 32bit
>> * 64bit
>> * Universal (32bit and 64bit).
>>
>> If you have a chance, please update your tree and rerun "make".
>>
>> Thanks,
>>
>> _Christopher
>>
>> On 4/26/10 4:01 PM, Jianwu Wang wrote:
>>> Hi Chistopher,
>>>
>>> My machine is snow leopard (10.6.3, 64 bit), matlab 2009b 64 bit, Java
>>> 1.6 64 bit. I tried to use 'make' command in ptII/ptolemy/matlab
>>> directory to generate libptmatlab file. But it has the following error.
>>> I think it is because my matlab installation do not have maci directory,
>>> only have maci64 directory. Do you think the problem is because of my
>>> installation or make file? Thanks.
>>>
>>> echo $DYLD_LIBRARY_PATH
>>> /Applications/MATLAB64/MATLAB_R2009b/MATLAB_R2009b.app/bin/maci64:/Applications/MATLAB64/MATLAB_R2009b/MATLAB_R2009b.app/sys/os/maci64
>>>
>>>
>>>
>>> kepler:matlab jianwu$ make
>>> if [ "`uname -s`" = "Darwin" ]; then \
>>> make libptmatlabUniversal.jnilib; \
>>> mv libptmatlabUniversal.jnilib libptmatlab.jnilib; \
>>> file libptmatlab.jnilib; \
>>> else \
>>> CLASSPATH="../.."
>>> "/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/javah"
>>>
>>> -jni -o ptmatlab.h ptolemy.matlab.Engine; \
>>> "/usr/bin/gcc" -DPT_NO_ENGGETARRAY -DPT_NO_ENGPUTARRAY
>>> -DPT_NO_MXGETNAME \
>>> "-I/Applications/MATLAB64/MATLAB_R2009b/MATLAB_R2009b.app/extern/include"
>>> \
>>> "-I/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/../Headers"
>>>
>>> \
>>> "-I/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/../include/darwin"
>>>
>>> \
>>> ptmatlab.cc -fno-exceptions -dynamiclib -o libptmatlab32.jnilib
>>> -L"/Applications/MATLAB64/MATLAB_R2009b/MATLAB_R2009b.app/bin/maci"
>>> -leng -lmx -lmex; \
>>> fi
>>> CLASSPATH="../.."
>>> "/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/javah"
>>>
>>> -jni -o ptmatlab.h ptolemy.matlab.Engine
>>> "/usr/bin/gcc" -DPT_NO_ENGGETARRAY -DPT_NO_ENGPUTARRAY
>>> -DPT_NO_MXGETNAME \
>>> "-I/Applications/MATLAB64/MATLAB_R2009b/MATLAB_R2009b.app/extern/include"
>>> \
>>> "-I/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/../Headers"
>>>
>>> \
>>> "-I/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/../include/darwin"
>>>
>>> \
>>> ptmatlab.cc -fno-exceptions -dynamiclib -o libptmatlab32.jnilib
>>> -L"/Applications/MATLAB64/MATLAB_R2009b/MATLAB_R2009b.app/bin/maci"
>>> -leng -lmx -lmex
>>> ld: warning: directory
>>> '/Applications/MATLAB64/MATLAB_R2009b/MATLAB_R2009b.app/bin/maci'
>>> following -L not found
>>> ld: library not found for -leng
>>> collect2: ld returned 1 exit status
>>> make[1]: *** [libptmatlab32.jnilib] Error 1
>>> mv: rename libptmatlabUniversal.jnilib to libptmatlab.jnilib: No such
>>> file or directory
>>> libptmatlab.jnilib: cannot open `libptmatlab.jnilib' (No such file or
>>> directory)
>>>
>>

-- 
Christopher Brooks, PMP                       University of California
CHESS Executive Director                      US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774
ph: 510.643.9841 fax:510.642.2718	      (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670


More information about the Kepler-dev mailing list