[kepler-dev] Notes about building Kepler under Windows (Cygwin)

Christopher Brooks cxh at eecs.berkeley.edu
Tue Dec 6 12:35:51 PST 2005


Hi Dan,

Thanks, I had just realized that my ptII tree was out of date (How
embarrasing :-).  In my defense, perhaps there should be an ant target
that does cvs updates in ptII and kepler?

Anyway . . .
My bad.

The problem is with the bin/ant shell script under Cygwin with
Quicktime Java installed.  Ptolemy users that install Quicktime to use
the Java 3D actros that use Quicktime will have this problem.
Fortunately, the number of users in this category is small.
Unfortunately, Edward is one of them.

Apple messed up how they set the CLASSPATH under Windows.  They should
have used either backslashes or doublequotes, but not both.

If, under Cygwin, one has Quicktime Java installed,
  sh -x ../apache-ant-1.6.5/bin/ant full-clean ptolemy
returns some pretty odd stuff

ant --execdebug run-dev also looks funny, see the doublequotes 
at the end:

$ ant --execdebug run-dev
exec "/cygdrive/c/j2sdk1.4.2_08/bin/java" -classpath "c:/cxh/src/apache-ant-1.6. 5/lib/ant-launcher.jar" -Dant.home="c:/cxh/src/apache-ant-1.6.5" -Dant.library.dir="c:/cxh/src/apache-ant-1.6.5/lib" -Dcygwin.user.home="c:/cxh" org.apache.tools.ant.launch.Launcher -cp "./;c:/PROGRA~1/JMF21~1.1E/lib/sound.jar;c:/PROGRA~1/JMF21~1.1E/lib/jmf.jar;c:/PROGRA~1/JMF21~1.1E/lib;c:/WINDOWS/java/classes;./;"C;C:/cygwin/Program Files/Java/j2re1.4.2_08/lib/ext/QTJava.zip"" "run-dev"
Buildfile: build.xml

usage:
     [echo] You must set two environment variables before running this
     [echo] build.  Set KEPLER to the location of your kepler
     [echo] directory and set PTII to the location of your ptolemy
     directory.
     [echo] On Windows, still use forward slashes (/) in directory paths.

I think what is happening here is that ant is using the CLASSPATH and
failing to run the "run-dev" target.  This is a bug with ant, not with
Kepler. 

This could be reported as a bug to the ant maintainers, but I have
other bugs to fry.

I think I'm past this one now.

_Christopher

--------

    Christopher,
        Your errors at the end (regarding TokenSentListener) look like you 
    are not compiling against the latest checkout of Ptolemy (since the 
    Provenance stuff is in the PTII CVS, I think).
    
        Also, I had never looked at the QuickTime interface, but I think 
    Apple put it in the lib\ext\
    directory to make sure it gets into the classpath regardless of what the 
    classpath setting is. The Kepler ant scripts (like 'ant run-dev') set 
    the classpath in the java invocation, so they should be completely 
    independent of the $CLASSPATH environment variable.
    
    Dan
    
    
    
    
    Christopher Brooks wrote:
    
    >I was having the following problem building Kepler under Windows with
    >Cygwin.  Basically, not matter what I did, then when I ran ant I
    >got the list of targets.
    >
    >I downloaded ant-1.6.5 today and a clean kepler source tree.
    >
    >Anyway, here's what I did:
    >
    >--start--
    >bash-3.00$ echo $KEPLER
    >c:/cxh/src/kepler
    >bash-3.00$ echo $PTII
    >c:/cxh/ptII
    >bash-3.00$ echo $JAVA_HOME
    >c:/j2sdk1.4.2_08
    >bash-3.00$ echo $ANT_HOME
    >c:\cxh\src\apache-ant-1.6.5
    >bash-3.00$ ant full-clean ptolemy
    >Buildfile: build.xml
    >
    >usage:
    >     [echo] You must set two environment variables before running this
    >     [echo] build.  Set KEPLER to the location of your kepler
    >     [echo] directory and set PTII to the location of your ptolemy
    >     directory.
    >     [echo] On Windows, still use forward slashes (/) in directory
    >     paths.
    >
    >     [echo] Targets:
    >     [echo] --------
    >     [echo] ant install       -- builds and installs files in $PTII
    >     [echo] ant run           -- builds, installs, and runs the
    >     application
    >     [echo] ant ptolemy       -- builds the ptolemy source in $PTII
    >     [echo] ant vergil        -- runs the original vergil editor
    >     [echo] ant clean         -- deletes the temporary build files
    >     [echo] ant ptolemy-clean -- deletes the ptolemy build files
    >     [echo] ant full-clean    -- deletes the kepler and ptolemy build
    >     files
    >     [echo] ant javadoc       -- creates javadoc documentation in
    >     website/javadoc
    >     [echo] ant run-dev       -- run kepler without jarring
    >     anything...for development purposes
    >     [echo] ant run-jinidev   -- run kepler allowing for jini-based
    >     applications (eg. DistributedDirector)
    >     [echo] ant runQB         -- runs the standalone QueryBuilder 
    >     [echo] ant runDCV        -- runs the standalone DataCacheViewer 
    >     [echo] ant buildkarlib   -- builds the ksw library from the actor
    >     list moml file 
    >
    >BUILD SUCCESSFUL
    >Total time: 0 seconds
    >bash-3.00$ 
    >--end--
    >
    >It turns out that the problem was because the Apple Quicktime Java
    >interface adds to the CLASSPATH in a totally non-standard way!
    >
    >It adds "C:\Program Files\Java\j2re1.4.2_08\lib\ext\QTJava.zip"
    >to the classpath:
    >
    >$ echo $CLASSPATH
    >.;C:\PROGRA~1\JMF21~1.1E\lib\sound.jar;C:\PROGRA~1\JMF21~1.1E\lib\jmf.jar;
   C:\PR
    >GRA~1\JMF21~1.1E\lib;C:\WINDOWS\java\classes;.;"C:\Program Files\Java\j2re
   1.4.2
    >08\lib\ext\QTJava.zip"
    >
    >Which causes problems in shell scripts.
    >I had to hack up $PTII/bin/ptinvoke.in to attempt to handle this.
    >My fix was to unset CLASSPATH, which causes ant to work.
    >
    >Now, when I run "ant run-dev", I get:
    >
    > compile-dev:
    >    [javac] Compiling 795 source files to
    >    C:\cxh\src\kepler\build\classes
    >    [javac]
    >    C:\cxh\src\kepler\build\src\ptolemy\actor\ProvenanceExecutionListener.
   java:77:
    >    cannot resolve symbol
    >    [javac] symbol  : class TokenSentListener 
    >    [javac] location: class ptolemy.actor.ProvenanceExecutionListener
    >    [javac]	                    implements ExecutionListener,
    >    ChangeListener, TokenSentListener {
    >    [javac]
    >    ^
    >    [javac]
    >    C:\cxh\src\kepler\build\src\ptolemy\actor\ProvenanceExecutionListener.
   java:631:
    >    cannot resolve symbol
    >    [javac] symbol  : class TokenSentEvent 
    >    [javac] location: class ptolemy.actor.ProvenanceExecutionListener
    >    [javac]     public void tokenSentEvent(TokenSentEvent event) {
    >    [javac]                                ^
    >    [javac]
    >    C:\cxh\src\kepler\build\src\ptolemy\actor\ProvenanceExecutionListener.
   java:219:
    >    cannot resolve symbol
    >    [javac] symbol  : method addTokenSentListener
    >    (ptolemy.actor.ProvenanceExecutionListener)
    >    [javac] location: class ptolemy.actor.IOPort
    >    [javac]                     port.addTokenSentListener(this);
    >    [javac]                         ^
    >    [javac]
    >    C:\cxh\src\kepler\build\src\ptolemy\actor\ProvenanceExecutionListener.
   java:568:
    >    cannot resolve symbol
    >    [javac] symbol  : method removeTokenSentListener
    >    (ptolemy.actor.ProvenanceExecutionListener)
    >    [javac] location: class ptolemy.actor.IOPort
    >    [javac]
    >    port.removeTokenSentListener(this);
    >    [javac]                             ^
    >    [javac] Note: Some input files use or override a deprecated API.
    >    [javac] Note: Recompile with -deprecation for details.
    >    [javac] 4 errors
    >
    >I've made some minor mods to the INSTALL file to make it more clear for
    >people like myself.
    >
    >BTW - we have this test called the "Edward Test", where the ultimate
    >test of a piece of software is whether Edward can get it installed on
    >his laptop.  PtinyOS does not pass the Edward Test under Windows.  I'd
    >like to make sure that Kepler does :-)
    >
    >Let me know if my changes to INSTALL are inappropriate, feel free
    >to reverse them.
    >
    >Lately I've been trying to write installation instructions at two
    >levels, one for the gods of software, which include really terse
    >instructions, the other level for people that have questions.
    >
    >_Christopher
    >
    >_______________________________________________
    >Kepler-dev mailing list
    >Kepler-dev at ecoinformatics.org
    >http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
    >  
    >
    
    
    -- 
    *******************************************************************
    Dan Higgins                                  higgins at nceas.ucsb.edu
    http://www.nceas.ucsb.edu/    Ph: 805-893-5127
    National Center for Ecological Analysis and Synthesis (NCEAS) Marine Scienc
   e Building - Room 3405
    Santa Barbara, CA 93195
    *******************************************************************
    
--------


More information about the Kepler-dev mailing list