System is Ubuntu 9.04 64-bits. The compiler version used is the recommended gcc 3.4.1.
mkdir ~/GEMS
Copy all the downloaded GEMS files into the GEMS directory. Now edit the .bashrc file and add the following:
GEMS=$HOME/GEMS
export SIMICS_INSTALL=/opt/virtutech/simics-3.0.31
export SIMICS_EXTRA_LIB=./modules
export PYTHONPATH=./modules
Restart the computer.
Now create a simics workspace:
cd $SIMICS_INSTALL/bin
./workspace-setup $GEMS/simics_workspace
Edit GEMS/scripts/makesymlinks.h to include the correct $SIMICS_INSTALL path:
echo "Making symlink for import directory.."
ln -s /opt/virtutech/simics-3.0.31/import import
Run makesymlinks from the simics workspace:
cd ~/GEMS/simics_workspace
../scripts/makesymlinks.h
Link your simics workspace to $GEMS/simics:
cd $GEMS
ln -s simics_workspace simics
Edit GEMS makefiles:
1) $GEMS/common/Makefile.common
A) Modify the CC for your chosen compiler to 3.4.1, only for amd64-linux, and the path to gcc
B) Set value to HOST_TYPE directly: HOST_TYPE=amd64-linux
C) After line ifeq ($(SIMICS_VERSION),3.0) modify lines:
SIMICS_ROOT := $(GEMS_ROOT)/simics
SIMICS_INCLUDE_ROOT := $(SIMICS_INSTALL)/src/include
2) $GEMS/ruby/module/Makefile
A) Modify the CC_version and the path to gcc
B) Set value to HOST_TYPE directly: HOST_TYPE=amd64-linux
3) $GEMS/opal/module/Makefile
A) Modify the CC_version and the path to gcc
B) Set value to HOST_TYPE directly: HOST_TYPE=amd64-linux
4) $GEMS/tourmaline/module/Makefile
A) Modify the CC_version and the path to gcc
B) Set value to HOST_TYPE directly: HOST_TYPE=amd64-linux
Now it's time to compile ruby:
cd $GEMS/ruby
make PROTOCOL=MOSI_SMP_bcast DESTINATION=MOSI_SMP_bcast
Next compile opal:
cd $GEMS/opal
make module DESTINATION=MOSI_SMP_bcast