Marrakech Express has arrived to Tru64

I wanted to present something on the International Women’s Day
and the timing was perfect. Today I have finished the compilation
experiment on the Tru64 Unix and Dopewars.

One would ask, what is Dopewars and why the hell should it be
compiled on Tru64 ?

Dopewars is a turn-based strategy computer game in which the player
assumes the role of a drug dealer engaged in arbitrage. The object
of the game is to deal the most drugs to pay off the “loan shark”
(who charges interest) by the end of the game and make a profit.

https://en.wikipedia.org/wiki/Drugwars

Some notable QueenPins

– Sandra Ávila Beltrán (La Reina del Pacífico, Queen of the Pacific)
– Griselda Blanco (La Madrina, the Black Widow)

There seems to be no build of Dopewars for Tru64 Alpha available on
the internet. I wonder if anybody tried to build this little gem in
the past.

So lets get our hands dirty and start this exercise !

My original config does not provide enough disk space, so I had
to add an extra SCSI emulated drive for the build environment.

Adding a new disk to our Tru64 virtual environment

First create an empty disk2.dsk   file on the host (2GB)

   dd if=/dev/zero of=disk2.dd bs=1024 count=2M

Add disk2.dd info to alphavm.config

   scsi_disk dka1 {
   scsi_bus = 0;
   scsi_id = 2;
   scsi_lun = 0;
   file = 'disk2.dd';
   caching = no;
   write_through = yes;
   }

Once Tru64 booted scan for the new scsi device (note the new device)

   hwmgr scan scsi
   hwmgr -view device

Get the new DISK ready

   disklabel -rw dsk2c
   disklabel -r dsk2c
   mkfdmn dsk2c devel_domain
   mkfset devel_domain data
   mkdir /data

edit /etc/fstabt and add entry relevant to fstab

   devel_domain#data /data advfs rw 0 2

Mount the disk

   mount /data

Install some RPMs that we will need (make life easier and the CPU cooler)

   mkdir -p /cdrom0
   mount -t cdfs /dev/disk/cdrom0c /cdrom
   rpm -ivh /cdrom/RPMS/alpha/gtar-1.13-4.alpha.rpm
   rpm -ivh /cdrom/RPMS/alpha/gmake-3.79.1-4.alpha.rpm

Dude, you wanna compile libiconv ?

We are gonna use the native Tru64 cc compiler

Download libiconv from http://www.gnu.org/software/libiconv/libiconv-1.8
copy the file to /data and uncompress it there. Let’s assume that the extracted files are in /data/libiconv-1.8

   cd /data/libiconv-1.8
   env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
   make
   make install

Dude, you wanna compile pkg-config ?

Download pkg-config from https://pkgconfig.freedsktop.org/releases/pkg-config-0.21.tar.gz
Uncompress the file under a directory in /data. Let’s assume that the extracted files are in /data/pkg-config-0.21/

make sure to use gtar

   cd /data/pkg-config-0.21/
   env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
   make
   make install

Dude, you wanna compile gettext ?

Download gettext from http://ftp.gnu.org/pub/gnu/gettext/gettext-0.14.3.tar.gz
Uncompress the file under a directory in /data. Let’s assume that the extracted files are in /data/gettext-0.14.3/

make sure to use gtar

   cd /data/gettext-0.14.3/
   env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
   make
   make install

Dude, you wanna compile ncurses ?

Before you do the following step, make sure you have compiled GCC (ncures dont build via native CCC)

– > Compile GCC 4.1.1  (optional for experiments)

Install glib from GNU-TOOLS ISO for Tru64  (will remove later when we build newer glib with gcc)

    rpm -ivh /cdrom/RPMS/alpha/glib-1.2.10-4.alpha.rpm

Note: You should use GNU make (gmake) version 3.79 or higher to build gcc.
gmake is located on the GNU-TOOLS ISO for Tru64

   rpm -ivh /cdrom/RPMS/alpha/gmake-3.79.1-4.alpha.rpm

Download gcc 4.1.1 from http://gcc.gnu.org
Uncompress the file under a directory in /data. Let’s assume that the extracted files are in /data/gcc-4.1.1/
Note: You should use gtar to untar the file, otherwise you will get some errors
Configure GCC build

  cd /data/gcc-4.1.1/
   ./configure --prefix=/data/gcc --enable-languages=c,c++ --with-libiconv-prefix=/usr/local

This step takes a long time, usually a few hours!

  gmake install

Now we are ready to build ncurses :)

Download ncurses from https://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.8.tar.gz
Uncompress the file under a directory in /data. Let’s assume that the extracted files are in /data/ncurses-5.8/

make sure to use gtar

   cd /data/ncurses-5.8
   env CPPFLAGS=-I/usr/local/include LDFLAGS=-s CXX=/data/gcc/bin/c++ ./configure --with-shared --without-normal --without-debug
   make
   make install
   rpm -ivh /cdrom/RPMS/alpha/glib-1.2.10-4.alpha.rpm   (needed for Dope Wars)

Dude, you wanna compile  GTK+ ?

Download GTK+ from https://ftp.gtk.org/pub/gtk/1.2/gtk+-1.2.10.tar.gz
Uncompress the file under a directory in /data. Let’s assume that the extracted files are in /data/gtk+-1.2.10/

make sure to use gtar

   cd /data/gtk+-1.2.10
   env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
   make
   make install

Dude, you wanna compile  DOPEWARS ?

Download dopewars from https://downloads.sourceforge.net/project/dopewars/dopewars/1.5.12/dopewars-1.5.12.tar.gz
Uncompress the file under a directory /data. Let’s assume that the extracted files are in /data/dopewars-1.5.12

Note: dopewars builds fine on Tru64, but curses option -t is broken  currently so we use GTK instead

   cd /data/dopewars-1.5.12
   ./configure --with-libiconv-prefix=/usr/local --enable-gtk-client
   gmake
   gmake install

Finally start the game

   /usr/local/bin/dopewars -w

Server only Dopewars version running on Tru64 (clients connecting)

GTK+ client version running on Tru64

When I figure out how to build the DOPEWARS package for Tru64 I will post a link :)

Final greetz to all the ladies !

Compile GCC 4.1.1  (optional for experiments)

Install glib from GNU-TOOLS ISO for Tru64  (will remove later when we build newer glib with gcc)

    rpm -ivh /cdrom/RPMS/alpha/glib-1.2.10-4.alpha.rpm

Note: You should use GNU make (gmake) version 3.79 or higher to build gcc.
gmake is located on the GNU-TOOLS ISO for Tru64

   rpm -ivh /cdrom/RPMS/alpha/gmake-3.79.1-4.alpha.rpm

Download gcc 4.1.1 from http://gcc.gnu.org
Uncompress the file under a directory in /data. Let’s assume that the extracted files are in /data/gcc-4.1.1/
Note: You should use gtar to untar the file, otherwise you will get some errors
Configure GCC build

  cd /data/gcc-4.1.1/
   ./configure --prefix=/data/gcc --enable-languages=c,c++ --with-libiconv-prefix=/usr/local

This step takes a long time, usually a few hours!

  gmake install
Advertisements
Gallery | This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s