Hi Christopher,

Attached are a set of patches for building the Matlab actor
on a Mac. Let me know if you have questions.

Thanks,

 --dan

Christopher Brooks wrote:
Hi Ilkay,

You might be able to change variables in ptII/mk/ptII.mk for MacOSX. You could also update configure, but that takes a little
doing.  If you tell me what variables you change, we can
iterate offline on getting configure.in updated.

I don't have a Mac on which to test the Matlab code.

In general, JNI is rather difficult to get working, so it could
be a big time sink.  How I would work on this is by looking at
the tests in $PTII/jni/test/. If you can get cd $PTII/jni/test;
    make
to work, then JNI will be working and you can focus on the Matlab
portion.

I'm dumbfounded that someone somewhere decided that Java should have a
different layout on the Mac than under Linux, Solaris and Windows.
The fact that Java files are in different locations on just MacOS
makes cross platform configuration difficult.  Maybe this critical
shortcoming in the port to MacOS has been solved, but last I looked it
was a mess.

_Christopher

Hi, I've just tried configuring Ptolemy in order to use the Matlab actor in Ptolemy II on a MacOSX version 10.4.11. It doesn't configure because of the different Java directory configuration on Mac Java. I was wondering if anyone tried rewriting the Matlab configuration script on MacOSX before to map the directories in the script to the MacOSX java directories. If not, do you think it's worth trying? Thanks!
    -ilkay
-- Ilkay ALTINTAS
    Lab Director, Scientific Workflow Automation Technologies (SWAT)
    San Diego Supercomputer Center(SDSC), UCSD
    9500 Gilman Drive, MC: 0505  La Jolla, CA  92093-0505
    phone: (858) 822-5453                        fax: (858) 534-8303
    web: http://users.sdsc.edu/~altintas
_______________________________________________
Kepler-dev mailing list
[EMAIL PROTECTED]
http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev

Index: configure.in
===================================================================
RCS file: /home/cvs/cvsanon/ptII/configure.in,v
retrieving revision 1.383
diff -r1.383 configure.in
2277,2284c2277
<       Darwin) PTJNI_ARCHITECTURE=darwin
<               PTJNI_DIR=
<               AC_MSG_WARN([
<    The Ptolemy JNI facilty is not supported on MacOS
<    because Apple laid out the Java directory differently
<    than the Windows, Solaris and Linux Java directories.
<    As a result, the Ptolemy JNI facility will not work.]);
<               ;;
---
>       Darwin) PTJNI_ARCHITECTURE=darwin;;
2292,2296c2285,2294
<         if test ! -d "$PTJAVA_HOME/../include/$PTJNI_ARCHITECTURE"; then 
<           AC_MSG_WARN(["$PTJAVA_HOME/../include/$PTJNI_ARCHITECTURE" was not 
found.
<     As a result, compilation of JNI actors will fail.])
<         else 
<           PT_MSG_RESULT([$PTJAVA_HOME/../include/$PTJNI_ARCHITECTURE])
---
>               if test $PTJNI_ARCHITECTURE = "darwin"; then
>               PTJNI_INCLUDE=$PTJAVA_HOME/../Headers
>       else
>               PTJNI_INCLUDE=$PTJAVA_HOME../include/$PTJNI_ARCHITECTURE
>       fi
> 
>       if test ! -d $PTJNI_INCLUDE; then 
>               AC_MSG_WARN([$PTJNI_INCLUDE was not found.  As a result, 
> compilation of JNI actors will fail.])
>       else 
>               PT_MSG_RESULT([$PTJNI_INCLUDE])
2316,2317c2314,2322
<         if test ! -d "$PTJAVA_HOME/lib/$PTJNI_LIB_ARCHITECTURE"; then 
<           AC_MSG_WARN(["$PTJAVA_HOME/lib/$PTJNI_LIB_ARCHITECTURE" was not 
found.
---
> 
>       if test $PTJNI_ARCHITECTURE = "darwin"; then
>               PTJNI_LIB="$PTJAVA_HOME/../Libraries"
>       else
>               PTJNI_LIB="$PTJAVA_HOME/lib/$PTJNI_LIB_ARCHITECTURE"
>       fi
> 
>         if test ! -d $PTJNI_LIB; then 
>           AC_MSG_WARN([$PTJNI_LIB was not found.
2320c2325
<           PT_MSG_RESULT([$PTJAVA_HOME/lib/$PTJNI_LIB_ARCHITECTURE])
---
>           PT_MSG_RESULT([$PTJNI_LIB])
2370a2376
>           Darwin)      PTJNI_SHAREDLIBRARY_SUFFIX=dylib;;
2528a2535,2537
> Darwin)
>       PTMATLAB_SUPPORTED=yes
>       ;;
2608c2617,2620
<                       MATLAB_LIBDIR=${MATLAB_DIR}/extern/lib/glnx86
---
>             MATLAB_LIBDIR=${MATLAB_DIR}/bin/glnx86
>             if ! test -d ${MATLAB_DIR}; then
>                           MATLAB_LIBDIR=${MATLAB_DIR}/extern/lib/glnx86
>             fi
2624a2637,2639
>               Darwin)
>                       MATLAB_LIBDIR=${MATLAB_DIR}/bin/maci
>                       ;;
2652c2667,2672
<                   PTMATLAB_LD_ARGS="-shared ptmatlab.cc -fno-exceptions -o 
${PTJNI_SHAREDLIBRARY_PREFIX}ptmatlab.${PTJNI_SHAREDLIBRARY_SUFFIX}        
-L\"${MATLAB_LIBDIR}\" ${PTJNI_SHAREDLIBRARY_LDFLAG} -lc -leng -lmx"
---
>                   if test $PTJNI_ARCHITECTURE = "darwin"; then
>                       PTMATLAB_LD_ARGS="ptmatlab.cc -fno-exceptions 
> -dynamiclib -o 
> ${PTJNI_SHAREDLIBRARY_PREFIX}ptmatlab.${PTJNI_SHAREDLIBRARY_SUFFIX}        
> -L\"${MATLAB_LIBDIR}\" ${PTJNI_SHAREDLIBRARY_LDFLAG} -leng -lmx"
>                   else
>                       PTMATLAB_LD_ARGS="-shared ptmatlab.cc -fno-exceptions 
> -o ${PTJNI_SHAREDLIBRARY_PREFIX}ptmatlab.${PTJNI_SHAREDLIBRARY_SUFFIX}    
> -L\"${MATLAB_LIBDIR}\" ${PTJNI_SHAREDLIBRARY_LDFLAG} -lc -leng -lmx"
>                   fi
> 
3738a3759,3761
> # set to jni include directory
> AC_SUBST(PTJNI_INCLUDE)
> 
Index: mk/ptII.mk.in
===================================================================
RCS file: /home/cvs/cvsanon/ptII/mk/ptII.mk.in,v
retrieving revision 1.200
diff -r1.200 ptII.mk.in
478a479,481
> # set to jni include directory
> PTJNI_INCLUDE =    @PTJNI_INCLUDE@
> 
Index: ptolemy/data/expr/UtilityFunctions.java
===================================================================
RCS file: /home/cvs/cvsanon/ptII/ptolemy/data/expr/UtilityFunctions.java,v
retrieving revision 1.156
diff -r1.156 UtilityFunctions.java
791,792c791,798
<             if (osName.startsWith("SunOS") || osName.startsWith("Linux")) {
<                 sharedLibrarySuffix = "so";
---
>             if (osName.startsWith("SunOS") || osName.startsWith("Linux") ||
>               osName.startsWith("Mac OS X")) {
> 
>               if(osName.startsWith("Mac OS X")) {
>                     sharedLibrarySuffix = "dylib";
>               } else {
>                     sharedLibrarySuffix = "so";
>               }
Index: ptolemy/matlab/makefile
===================================================================
RCS file: /home/cvs/cvsanon/ptII/ptolemy/matlab/makefile,v
retrieving revision 1.40
diff -r1.40 makefile
121c121
<               "-I$(PTJAVA_HOME)/../include" \
---
>               "-I$(PTJNI_INCLUDE)" \

Reply via email to