home | news | research | people | documentation | download | links | contact

INSTALLATION

The StreamIt packages are distributed as gziped tar files. Once downloaded, unpack the distributions in a directory of your choice (e.g., tar zxvf streamit-2.1.tar.gz).

Before using StreamIt, you need to setup your shell environment, configure, and build the compiler and libraries. Instructions are provided below, but first review the list of software requirements before proceeding.


1a) Setting the Shell Environment (Source Release)

In order to compile StreamIt, ensure that compiler for Java version 1.5 is installed and can compile Java programs on your system. Next, add the following commands to your shell startup files:

  • If you are using bash, add the following to your .bashrc
    ### Location of unpacked StreamIt tree
    STREAMIT_HOME=$HOME/streamit-src-2.1
    
    ### Location of ANTLR jar file (test: 'java antlr.tool')
    ANTLRJAR=/usr/share/java/antlr.jar
    
    ### Update CLASSPATH
    CLASSPATH=.:${CLASSPATH}
    CLASSPATH=${CLASSPATH}:${ANTLRJAR}     
    CLASSPATH=${CLASSPATH}:${STREAMIT_HOME}/src
    CLASSPATH=${CLASSPATH}:${STREAMIT_HOME}/3rdparty
    CLASSPATH=${CLASSPATH}:${STREAMIT_HOME}/3rdparty/JFlex/jflex.jar
    
    ### Update the shell path
    PATH=${PATH}:${STREAMIT_HOME}
    
    export STREAMIT_HOME CLASSPATH PATH
    	  
  • If you are using csh, add the following to your .cshrc
    ### Location of unpacked StreamIt tree
    setenv STREAMIT_HOME ${HOME}/streamit-src-2.1
    
    ### Location of ANTLR jar  file(test: 'java antlr.tool')
    setenv ANTLRJAR      /usr/share/java/antlr.jar
    
    ### Update CLASSPATH
    setenv CLASSPATH     .:${CLASSPATH}
    setenv CLASSPATH     ${CLASSPATH}:${ANTLRJAR}
    setenv CLASSPATH     ${CLASSPATH}:${STREAMIT_HOME}/src
    setenv CLASSPATH     ${CLASSPATH}:${STREAMIT_HOME}/3rdparty
    setenv CLASSPATH     ${CLASSPATH}:${STREAMIT_HOME}/3rdparty/JFlex/jflex.jar
    
    ### Update the shell path
    setenv PATH          ${PATH}:${STREAMIT_HOME}
    	  


1b) Setting the Shell Environment (Binary Release)

If you downloaded the binary release, setup your environment as follows:

  • If you are using bash, add the following to your .bashrc
    ### Location of StreamIt
    STREAMIT_HOME=$HOME/streamit-2.1        
    
    ### Update CLASSPATH
    CLASSPATH=.:${CLASSPATH}:${STREAMIT_HOME}/streamit.jar
    
    ### Update the shell path
    PATH=${PATH}:${STREAMIT_HOME}
    
    export STREAMIT_HOME CLASSPATH
    	  
  • If you are using csh, add the following to your .cshrc
    ### Location of StreamIt
    setenv STREAMIT_HOME $HOME/streamit-2.1
    
    ### Update CLASSPATH
    setenv CLASSPATH     .:${CLASSPATH}:${STREAMIT_HOME}/streamit.jar
    
    ### Update the shell path
    setenv PATH          ${PATH}:${STREAMIT_HOME}
    	  


2) Re-source Shell Startup Files

Re-source your shell startup file or re-login to register changes to your shell environment.


3) Configuring the Compiler

An autoconfiguration script is available in $STREAMIT_HOME. To configure the compiler, launch the script from the top level StreamIt directory as follows:

    cd $STREAMIT_HOME
    ./configure
    	  


4) Building the StreamIt Compiler

Once your system is configured, build StreamIt as follows (this is required for the binary release as well):

    cd $STREAMIT_HOME
    make
    	  


5) Testing the StreamIt Compiler

Once your system is built, run the following simple test (remember to setup your environment):

    cd /tmp
    cp $STREAMIT_HOME/apps/examples/misc/hello/HelloWorld.str .
    $STREAMIT_HOME/strc HelloWorld.str
    ./a.out -i 10
    	  
The a.out program should print the numbers 0 through 9, in order, on your screen.