Brooknet Web Log

[Previous entry: "Christmas night"] [Main Index] [Next entry: "Last chance..."]

15-Jan-2008: "Compiling SIMH"

I recently tried compiling the SIMH application on my Ubuntu 7.10 box. I needed to make a few modifications to get it to compile with network support, and I'm listing them here in case anyone else has the same issues. These instructions may contain errors - in fact they probably, almost certainly, contain errors - lots.

The first thing to do is get the latest version of SIMH, which you'll find at http://simh.trailing-edge.com/

I have simhv37-3.zip. All of the source files are DOS-formatted, but this doesn't seem to affect the compilation.

You'll need the latest libpcap, which you can get at http://www.tcpdump.org
I'm using version 0.9.8.

Unpack libpcap to a separate directory and do a ./configure, adding a --prefix argument to install to a non-system directory, e.g. /home/lex/libpcap-install. You'll probably need to install flex, m4 and bison.

Do a 'make ; make install'.

SIMH expects include files in /usr/local/include/ and lib archives in /usr/local/lib. I added symlinks for these, instead of editing the source code (please replace '/home/lex/libpcap-install' with wherever you compiled libpcap).

cd /usr/local/lib
for a in /home/lex/libpcap-install/lib/*; do
ln -s ${a}
done

cd /usr/local/include
for a in /home/lex/libpcap-install/include/*; do
ln -s ${a}
done

Then, change dir back to the SIMH compile directory. Before you start compiling, a minor edit to the Makefile needs to be made. Edit 'makefile' and find the line that starts: 'CC =' in the 'ifeq ($(OSTYPE),macos' statement. After the 'else' line, edit the CC line and add '-lrt' somewhere (I added it after '-lm'). Then, rtlib will be linked in, instead of just for MacOS.

Do 'make USE_NETWORK=1'. SIMH should compile without errors. After it's done, you can delete the symlinks.

That's all!


Home
Archives
Mail

Ben's blog
My WordPress blog
Brooknet homepage
Brooknet webcam

Greymatter