[Suif-talk] experience I install SUIF2 and MachSUIF

mimitics mimiti at sina.com
Tue Mar 16 18:12:36 PST 2004


Hello, everybody.

After a week's work, I have installed SUIF1, SUIF2 and MachSUIF. 
During this period of time, I often met compiling and running 
errors. At that moment, what I mostly wanted was a guidance, 
which could tell me what to do. Fortunately, there is Suif-Talk 
mailing list, where I could get infomation and ask for help. 
With help of some kind people in Suif-Talk, I solved most of 
the problems. (there are still some left). 

However, it would be great waste of time if everybody 
repeats this tedious way as I have done. With this thought, 
I decide to write a simple guidance according to my experience.  
I hope it can tell the SUIF beginners where to start.
Any correction and supplement and suggestion is welcome.

1. My Platform

I used to make Redhat 9 as my platform, but I receded when I found 
it a little difficult to install egcs-1.1.2. I turned to 
Redhat 7.3 which already had egcs-1.1.2 installed. 

The reason I chose egcs-1.1.2 as the compiler is that there 
*seems to* be less errors using egcs-1.1.2 than other compilers, 
especially gcc-3.*.*, which probably will report errors.
Of course, you may choose gcc-2.9.6 as you like. (see ref1)

2. Install SUIF1

Firstly, I downloaded the SUIF1 zip file into /suif.

Secondly, I unziped the basesuif-1.3.0.5.tgz:

    ***  #cd /suif
   /suif #tar xzf basesuif-1.3.0.5.tgz

As a reslt, a new directory ./suifhome appears.

Thirdly, I read the ./suifhome/README.suif and ./suifhome/src/
basesuif/README.basesuif. The latter one is more pratically 
important because it tells how to install this software step
by step.

I set up the environment variables as bellow:

    /suif #cd suifhome
 suifhome #export SUIFHOME=/suif/suifhome
 suifhome #export MACHINE=i386-redhat-linux

Because I used egcs as the compiler, I also needed to set:
 suifhome #export CC_OVERRIDE=egcs
 suifhome #export CXX_OVERRIDE=egcs
 suifhome #export COMPILER_NAME=egcs
(see ref2)

Attention: all the variables settings above depends on *my* 
situation.

Then, I changed the first line of $SUIFHOME/setup_suif from
"#!/usr/local/bin/perl -w" to "#! /usr/bin/perl -w" so as to 
indicate the right path to perl, and then,
I run the setup_suif.sh:

/suifhome #eval '$SUIFHOME/setup_suif -sh'
/suifhome #gmake setup
/suifhome #gmake install

That's OK.

3. Install SUIF2
Firstly, I downloaded SUIF2 gzip files into /suif. Besides basesuif,
I got suifversion1support and extras as well.

Secondely, I unzipped all the tar files.
          #cd /suif
    /suif #tar zxf basesuif-2.2.0-4.tar.gz
    /suif #tar zxf extras-2.2.0-4.tar.gz
    /suif #tar zxf suifversion1support-2.2.0-4.tar.gz

Thirdly, following /suif/nci/README, I set all the environment variables:

    /suif #cd /nci
      nci #export SUIFHOME=/suif/nci

Because I selected egcs-1.1.2 as the compiler, some variables should 
also be set: (see ref3)

     nci #export NCI_CC=egcs
     nci #export NCI_CXX=egcs++
     nci #export NCI_CXXLINK=egcs++
     nci #export COMPILER_NAME=egcs

Fourthly, I got the source files patched. I fetched one of the patch 
file nci-rh8or9.patch from (ref4), and another patch file extras.patch
from (ref5). Both of them were downloaded into /suif .

   /suif #cd ./nci
     nci #patch -p1 < ../nci-rh8or9.patch
     nci #patch -p1 < ../extras.patch
    
Fifthly, according to (ref6), I changed a mistake in one of the source
files: $SUIFHOME/suif/suif2b/extrastypes/bit_vector/bit_vector.cpp .
line 311, inside `void BitVector::operator=(const BitVector &other)'. 
I replaced the old line:

     _count = other._has_count;
by
     _count = other._count;

Sixthly, I added some lines into file: $SUIFHOME/suif/suif2b/extra_suif
_packages. Here is the result:

  # Add extra packages here
  #
  suifversion1support
  suifbrowser
  dataflow
  tclsuif

After all above had been done, I ran the commands as follows:
(see ref5)
    nci #sh ./install --with-TCL_LIBDIRS="-L/usr/X11R6/lib"
    nci #make setup
    nci #./nci_setup.sh
    nci #make
    nci #make test

As a result, SUIF2 was installed.

4. Install MachSUIF
I put machsuif-2.02.07.15.tar.gz into /suif directory, 
then unzipped it.

    /suif #tar zxf ../machsuif-2.02.07.15.tar.gz
    /suif #mv ./machsuif-2.02.07.15 ./machsuif
    /suif #cd ./machsuif

Then, I set the environment variables:
 machsuif #export MACHSUIFHOME=/suif/machsuif

At last,
 machsuif #gmake
 
Please refer to $MACHSUIFHOME/README.machsuif for more infomation.

5. Remaining Problems
(1). The front end files `pgcpp1' and `c2s' can not work properly. 
It *seems* that they are not compatable with stdio.h(see ref7).

(2). The patch files for SUIF1 and SUIF2 in `$MACHSUIFHOME/patches/' 
will report errors when patching. 

References:
1.http://suif.stanford.edu/pipermail/suif-talk/2003-August/001460.html
2.http://suif.stanford.edu/pipermail/suif-talk/2002-January/000949.html
3.http://suif.stanford.edu/pipermail/suif-talk/2002-January/000960.html
4.http://suif.stanford.edu/pipermail/suif-talk/2003-December/001541.html
5.http://suif.stanford.edu/pipermail/suif-talk/2002-September/001112.html
6. $MACHSUIFHOME/patches/basesuif-2.2.0-4.patch
7.http://suif.stanford.edu/pipermail/suif-talk/2004-March/001626.html


//===========================================================================
______________________________________

×¢²áÐÂÀË9Õ×Ãâ·ÑÓÊÏ䣨 http://mail.sina.com.cn/chooseMode.html £©

===================================================================
³©ÓÎÓ°Ïñд󽣬¼ÑÄÜ´ó½±»¶ÀÖËÍ£¡ (http://ad4.sina.com.cn/shc/zhuiyu_hprefresh.html)


More information about the Suif-talk mailing list