Known Issues


Compiling m5sim

During the compilation, you might encounter the following problems.

GCC version problem

The m5sim can be compiled with gcc 4.3.x. Some earlier version of gcc may also work. Newer Linux distributions (e.g. Ubuntu 9.10, Fedora 11) use gcc 4.4.1 as the default compiler. It causes problems while compiling m5sim.

You can check which version of gcc you are using by running this command:
gcc --version

If your gcc version is 4.4.x, a workaround is to install an older version of gcc and g++. An alternative method is to patch the source code of m5sim 2.0 beta 6.

Option 1: Use older version of gcc

For Ubuntu 9.10, you can install gcc-4.3 and g++-4.3 by running the following command:
sudo apt-get install gcc-4.3 g++-4.3
For Fedora 11, the gcc 4.3 is not in default repositories. I did not find a reliable repository to provide gcc 4.3 for Fedora 11. One solution is to manually build gcc 4.3.x from the source. Another solution is to use crosstool NG / crosstool to automatically build it. It may be possible to use alien to convert gcc-4.3.x.deb into rpm and install it on Fedora, but you need to take your own risk.

After installing gcc-4.3 and g++-4.3, temporarily set the environment variables CC and CXX to gcc-4.3 and g++-4.3, respectively. In bash, you can do that by running the following commands:
export CXX=g++-4.3
export CC=gcc-4.3
Now you can start to compile m5sim.

Option 2: Patch m5sim 2.0 beta 6

An alternative way is to patch the source code of m5sim 2.0 beta 6, so that it can be compiled by gcc 4.4.1.
You can get the patch file from the attachment of this page. You should put the patch under your "m5-stable" directory.
cd /your/full/path/to/m5-stable/
wget -O m5sim2.0b6_gcc4.4.1.patch \

Make sure you have NOT touched the m5sim source code before patching. Otherwise you might need to fetch a clean version of the source code. To be safe, first do a dry run to test the patch. Do the dry run under to your "m5-stable" directory.
cd /your/full/path/to/m5-stable/
patch --dry-run -p0 -i m5sim2.0b6_gcc4.4.1.patch
If no error is reported, you can apply the patch under your "m5-stable" directory. You should only apply the patch once.
cd /your/full/path/to/m5-stable/ 
patch -p0 -i m5sim2.0b6_gcc4.4.1.patch

Now you can start to compile m5sim.

MySQL Error

You get errors like this:
"mysql.h: No such file or directory"

If you have installed mysql on your machine. You might encounter this problem. One solution is to simply turn it off.
scons USE_MYSQL=0 build/ALPHA_SE/m5.opt
scons USE_MYSQL=0 build/ALPHA_FS/m5.opt

Compiling SD-VBS 

During the compilation, you might encounter the following problems.

Stitch benchmark missing 'ifMtimes'

If you encounter this error, it is likely that you are using an old version of SD-VBS.
This bug was fixed by the SD-VBS group on 24 December 2009.
Please fetch a latest copy of the code.

The photon timer error in cross-compilation

You can either fix it manually, or download a 5md00 version of SD-VBS, which has fixed this problem.

Option 1: Fix it manually

Remove the photon timer files:
cd sd-vbs/common/c
rm photonEndTiming.c photonPrintTiming.c photonReportTiming.c photonStartTiming.c

Comment out these functions from the header file "sd-vbs/common/c/sdvbs_common.h".
/** Timing functions **/
// unsigned int* photonEndTiming();
// unsigned int* photonStartTiming();
// unsigned int* photonReportTiming(unsigned int* startCycles,unsigned int* endCycles);
// void photonPrintTiming(unsigned int * elapsed);

Remove the photon timers function call from the source code of each benchmarks.
For example, the disparity benchmark calls photon timers in "sd-vbs/benchmarks/disparity/src/c/script_disparity.c".
You may need to comment out these lines:
// start = photonStartTiming();
// endC = photonEndTiming();
// elapsed = photonReportTiming(start, endC);
// photonPrintTiming(elapsed);

You can perform similar modifications to other benchmarks.

Option 2: Download a 5md00 version of SD-VBS

You can download it here. The changes mentioned by option 1 have been done in the 5md00 version of sd-vbs. To reduce the size of the package, we exclude vga and wuxga data in the 5md00 version of sd-vbs. You can easily obtain them from the official repository of SD-VBS.

Zhenyu Ye,
15 Dec 2009, 04:21