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

Christopher Brooks cxh at eecs.berkeley.edu
Tue Dec 6 11:47:28 PST 2005


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\j2re1.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



More information about the Kepler-dev mailing list