Cell/B.E. System Simulator Install on Fedora 44

IBM’s Cell System Simulator is old but it can still run on modern Linux. It was originally intended to run on a Fedora 9 (ppc64 or x86_64) platform and was packaged as rpm files easily installable via the rpm utility. In this tutorial I will show you how to get the simulator working in a Fedora 44 (x86_64) environment. If you are on a different distrobution, then you may need to alter this procedure to suit your own implementation.
1. Download and extract the simulator archive
wget https://ps3linux.net/ps3-filez/IBM_Full-System_Simulator_for_the_CBE_Processor.tar.bz2
tar xvf IBM_Full-System_Simulator_for_the_CBE_Processor.tar.bz2
cd IBM_Full-System_Simulator_for_the_CBE_Processor
2. Install sysroot rpm
Package sysroot_image-3.1-1.noarch.rpm has no dependencies and will install with no problem.
sudo rpm -ivh sysroot_image-3.1-1.noarch.rpm
3. Compile and install tcl 8.5
The simulator depends on tcl 8.5 which is not available in Fedora anymore, so we will compile and install it under a safe directory (/opt/tcltk). Run the following commands:
sudo mkdir /opt/tcltk
wget https://ps3linux.net/ps3-filez/tcl8.5.19-src.tar.gz
tar xf tcl8.5.19-src.tar.gz
cd tcl8.5.19/unix
CC="gcc -m64" CFLAGS="-O2 -march=native -std=gnu89 -D_GNU_SOURCE" ./configure --prefix=/opt/tcltk --libdir=/opt/tcltk/lib64 --enable-threads --enable-64bit
make
sudo make install-strip
sudo make install-private-headers
cd ../../
rm -rf tcl8.5.19
4. Compile and install tk 8.5
The simulator also depends on tk 8.5, so next we will compile and instal it under /opt/tcltk as well. This time we must first apply a patch I made, or else it won’t build. Run the following commands:
wget https://ps3linux.net/ps3-filez/tk8.5.19-src.tar.gz
wget https://ps3linux.net/ps3-filez/tk8.5.19-remove-strrchr-declaration.patch
tar xf tk8.5.19-src.tar.gz
cd tk8.5.19/unix
CC="gcc -m64" CFLAGS="-O3 -march=native -std=gnu89 -D_GNU_SOURCE" LDFLAGS=-L/opt/tcltk/lib64 CPPFLAGS=-I/opt/tcltk/include ./configure --prefix=/opt/tcltk --libdir=/opt/tcltk/lib64 --enable-threads --enable-64bit --with-tcl=/opt/tcltk/lib64 --with-x
make
sudo make install-strip
cd ../../
rm -rf tk8.5.19
5. Install the system simulator rpm package
Since your rpm utility does not know about the tcl and tk libs we compiled and installed, it will refuse to install the simulator rpm. We must force the install with the --force --no-deps options.
sudo rpm -ivh --force --no-deps systemsim-cell-3.1-25.f9.x86_64.rpm
6. Test out your new Cell CPU System Simulator
First we must set the environment variable SYSTEMSIM_TOP to systemsim’s top-level directory. You should set this variable in your .bashrc file so you don’t have to every time you want to run the simulator. Also, in the simulator’s command line we must set the LD_LIBRARY_PATH variable to the directory containing the tcl and tk libs we want the simulator to use. Do not set LD_LIBRARY_PATH in your .bashrc file, as this is considered to be sloppy and bad practice. Always set LD_LIBRARY_PATH in your systemsim command line.
export SYSTEMSIM_TOP=/opt/ibm/systemsim-cell
LD_LIBRARY_PATH=/opt/tcltk/lib64 systemsim -g -q
7. (Optional) Save the simulator documentation and clean up
cp -v SystemSim.Installation.pdf SystemSim.Users.Guide.pdf SystemSim.PerfAnalysis.Guide.pdf ~/Documents/
cd ../
sudo rm -rf IBM_Full-System_Simulator_for_the_CBE_Processor IBM_Full-System_Simulator_for_the_CBE_Processor.tar.bz2