Installation

From FetchWiki

Jump to: navigation, search

This page describes the steps required to install Fetch. If you upgrade from an earlier Fetch release, only apply the Fetch download, installation and configuration step again.

Contents

[edit] Requirements

Please ensure that the following requirements are satisfied. As a research tool, we have not been restrictive about dependencies, hence the rather extensive list:

  • Unix tools -- required for several shell scripts. While Fetch is intended to be run on a Unix platform (Linux, Solaris, OSx, ...), the tool chain should also work on Windows (via Cygwin), given that the bin directory of Cygwin is in the PATH environment variable. In case a download site overview is not given, we suggest ftp://ftp.easynet.be. For Cygwin, install the additional packages Devel\patchutils (merely in case you would not install SourceNavigator NG), Interpreters\python and Interpreters\perl.
  • Python >= 2.4 -- required for dbdump, snavtofamix, CDIF2RSF. Windows users: a python package is available in the Cygwin installation, see instructions above.
  • Perl 5.x -- required for additional parsing scripts complementing Source Navigator. Windows users: a perl package is available in the Cygwin installation, see instructions above.
  • Bash -- several scripts use bash-isms. Windows users: this is included in your Cygwin installation.
  • Java JRE >=1.5 -- required for Guess and javancss. Guess requires JRE >=1.5, javancss needs JRE > 1.4.1. IBM JDKs work fine too.

Optionally, install:

  • Xvfb -- required to run Fetch on a headless (i.e. no running X) environment. Xvfb is part of X11 and Xorg. Windows users: this is included in your Cygwin installation.
  • R -- for statistical post-processing. We have tested our R scripts on R version 2.3.1.
  • Graphviz package for graph visualization purposes. Some Fetch RML queries generate .dot input. Download [here]

[edit] Source Navigator Download and Installation

There exist two different Source Navigator distributions: the original, unmaintained Source Navigator distribution, and Source Navigator NG. From Fetch 0.7 on, we favor Source Navigator NG for its improvements and ease of configuration. However, Fetch remains compatible with the original Source Navigator as well.

[edit] Binary Releases

Unpack the zip-file at a convenient location and remember the installation path for future configuration of the SN_HOME environment variable.

[edit] From Source

[edit] Source Navigator NG

  • Download sources at the Berlios website
  • In case of the source distribution, apply the stereotypical ./configure; make; make install. You need gcc, libc6-dev and libx11-dev. Some platform/operations system combinations give trouble:
  • Additional instructions for SourceNavigatorX86OSXTiger

[edit] Source Navigator original

  • You need to download Source Navigator (5.2b2) separately; either the source for Linux/Unix/OSX systems.
  • Apply the stereotypical ./configure; make; make install. Beware, SN is picky about its environment, e.g. compiling on bash 3.0+ has been reported not to work. Look here for more information. Moreover, remove the "-fwritable-strings" option passed on to the compiler in the Makefiles. Check the SN forums for more build problems and their solution.
  • Apply this patch to fix the generation of the xref tables (.to and .by) in SN's batch mode. Use the following procedure to do so:
    • In case you wish to apply the patch automatically: ensure that you have the patch command at your disposal. E.g., for Windows-users, add the patchutils package in your Cygwin installation.
    • Locate the file share/sourcenav/gui/misc.tcl in your SourceNavigator distribution.
    • Execute the following command: patch misc.tcl <location of file SN-xref_batchmode-20070423.patch>. When succesful, the message patching file misc.tcl is displayed.

[edit] Fetch

[edit] Download

Download the latest release on our Releases page

[edit] Installation

To install Fetch, unzip and untar the tarball (e.g. tar zxf fetch-[version].tar.gz). Windows users can use a tool such as WinZip. We suggest to place Fetch in a path without spaces (else, an error in Windows occurs: dirname: extra operand `and'). No further installation is required beyond unpacking.

[edit] Configuration

The following variables need to be set (the scripts will tell you if you haven't yet):

  • The SN_HOME variable refers to the directory containing both the snavigator and dbdump binaries (provided by Source Navigator).
  • The FETCH variable refers to root directory of your Fetch installation.
  • The PMC variable refers to the pmccabe binary in fetch/bin that suits your platform.
  • The CROCO variable refers to the crocopat binary in fetch/bin that suits your platform.
  • (Add the python executable to your PATH environment variable if not already the case. Not for windows users.)

You can run the cppTest.sh and javaTest.sh tests to check your configuration. E.g., within the $FETCH/scripts directory, execute the following command:

./cpp2rsf.sh ../samples/teamspirit

In a successfull execution scenario, the last output line should look like (small deviations may occur as the parser is improving):

MO: 9 FI: 235 CL: 126 GV: 0 ME: 804 FU: 29 IN: 2557 AC: 2348 MT: 891

[edit] Remarks

  • cpp2rsf and java2rsf: Please note that both script need, due to their dependency on Source Navigator and its intrinsic composition, to be executed in an X (window) environment such as X11, Xorg (also when using Cygwin), despite the batch mode nature of these scripts. A VNC server/client configuration works as well.

[edit] Known Deployments

Development for Fetch happens on OSx/x86 and Linux/ppc. As such, OSx and Linux are the best supported operating systems. The full tool chain has however been deployed and used on Windows XP/Cygwin/x86 as well. Linux/x86_64 runs Fetch without a hitch as well.

[edit] Common Configuration Errors

  • cpp2rsfh/java2rsf does not run because it lacks a display (1)
    • When: in cpp2rsf/java2rsf, launching the batch mode of SN with /usr/bin/snavigator --batchmode --create
    • Error: "no display name and no $DISPLAY environment variable"
    • Reason: SN was not launched from within an X-session. Start an X-session (possibly VNC) first, then run SN.
  • cpp2rsf/java2rsf does not run because it lacks a display (2)
    • When: in cpp2rsf/java2rsf, when launching the batch mode of SN with /usr/bin/snavigator --batchmode --create
    • Error: "couldn't connect to display :"
    • Reason: SN was not launched because Xvfb failed to create a display. Either install Xvfb or execute the scripts in an X environment
  • Source Navigator fails on unknown encoding (OSX)
    • When: in cpp2rsf/java2rsf, launching the batch mode of SN with /usr/bin/snavigator --batchmode --create on OSX.
    • Error: "unknown encoding "iso8859-1" fail"
    • Reason: SN needs a configuration file $HOME/.sn/profile (no file extension) with following 2 lines:
      • language:english
      • encoding:utf-8
  • Guess does not launch
    • When: launching Guess
    • Error: Java Exception saying "Unsupported major.minor version"
    • Reason: The Java JRE version used to launch Guess is <= 1.5. Make sure you have a 1.5+ JRE and the PATH and JAVA_HOME environmental variables point to it.
  • Guess not loading graph
    • When: launching Guess
    • Error: Java Exception saying Exception in thread "main" java.lang.Error: java.sql.SQLException: Table not found in statement [SELECT * from nodes]
       at com.hp.hpl.guess.db.DBServer.fillSchemaInternal(DBServer.java:426)
       at com.hp.hpl.guess.db.DBServer.fillSchema(DBServer.java:365)
       at com.hp.hpl.guess.NodeSchema.<init>(NodeSchema.java:14)
       at com.hp.hpl.guess.Graph.<init>(Graph.java:166)
       at com.hp.hpl.guess.Guess.initUI(Guess.java:798)
       at com.hp.hpl.guess.Guess.init(Guess.java:700)
       at com.hp.hpl.guess.Guess.main(Guess.java:445)
    • Reason: Either (i) path does not exist, (ii) there is a space in the path name, or (iii) the file extension is not .gdf.
  • Shell scripts fail on '\r' errors
    • When: cpp2rsf.sh is launched
    • Error: something referring to '\r' errors (@@TODO@@)
    • Reason: conversions from unix to dos might require u2d to be ran on the shell-files
  • Crocopat runs out of memory
    • When: launching a query.
    • Error: "Error: BDD package out of memory."
    • Reason: model is of considerable size and/or script creates many additional relations: add a -m option with a certain amount of RAM, e.g. crocopat -m 512 ... .
  • ./configure fails for Source Navigator
    • When: during the first step of the compilation of Source Navigator, i.e. ./configure
    • Error: "checking system version (for dynamic loading)... ./configure: line 6046: syntax error near unexpected token `)' ./configure: line 6046: ` OSF*)'"
    • Reason: has to do with more recent versions of a.o. bash (>3.0). Try using Source Navigator NG instead.
Personal tools