Compiling Circle with Gnu Win32 Beta 18

From: Eric Jones (fpicard@INET.ATT.CO.KR)
Date: 07/11/97


I don't know if the message I sent last week ever made it to the list, but
just in case it didn't, I am resending detailed instructions on how to
compile Circle30bpl11 with gnu win32 beta 18.

This is an updated version from what is curerntly on the FTP site.

Here goes.  It is kinda long.

The GCC without Mingw32 Readme 2nd Edition (2 July 1997)
------------------------------------------

Ok, I've gotten my share of email about this since
I posted the instructions to the mailing list.  It seems
that a lot of people are having trouble making Circle
compile without numerous errors.

So, I've decided to expand on my instructions a bit and
start as if it was a clean installation of the compiler
and the Circle source code.

If you follow these instructions, Circle WILL compile
without errors (a few warnings, yes, but no errors).

Well here it goes, step by step detailed instructions.
-----

   Download `cdk.exe' from ftp.cygnus.com

   Run `cdk.exe' and follow the instructions to install the tools.  The
default install location is `<systemdrive>:\gnuwin32\b18'.  Future
examples will assume this location with <systemdrive> being the C drive.

   Next you must set four gnu-win32-related environment variables or the
tools will not function correctly.  You may prefer to do this outside
of bash so you can use the tools from the command.com as well as from
within bash.  This means using the `System' control panel in NT or
modifying the autoexec.bat under Windows 95.

   Assuming the `C:\gnuwin32\b18' install location, add the following
   to your autoexec.bat:

    set GCC_EXEC_PREFIX=C:\gnuwin32\b18\H-i386-cygwin32\lib\gcc-lib\
    set TCL_LIBRARY=c:/gnuwin32/b18/tcl/lib/tcl7.6
    set GDBTK_LIBRARY=c:/gnuwin32/b18/share/gdbtcl

   Add the following to your PATH statement:

    C:\gnuwin32\b18\H-i386-cygwin32\bin;C:\gnuwin32\b18\tcl\bin


   Various programs need to be able to find `/bin/sh'.  You should
create a `/bin' if one doesn't already exist and put a copy of `sh.exe'
there.  So by now you should have a directory called c:\bin which
contains a program called sh.exe.

   Many programs including bash and byacc need to be able to find a
`/tmp'.  This means, in your root directory (c:\), you should have a
directory named tmp.

You should now have a fully installed working copy of GCC on your hard
drive.  Now on to the CircleMUD installation portion...

Make sure you have a copy of the CircleMUD source on your computer.
Preferably the circle30bpl11.zip file from the FTP site.  Now, using
an unzip program (such as Winzip), unzip the archive so that you have
the files in a directory called \circle30bpl11.  If you are using
Winzip, extracting it to the C:\ directory will automatically create a
directory tree starting in \circle30bpl11 that contains the entire
distribution.

Now that we have that out of the way, CD to the circle30bpl11 directory
and create a directory called BIN.  Also, make sure you create the
following directories in the \circle30bpl11\lib directory:

A-E
F-J
K-O
P-T
U-Z
ZZZ

These directories are not created by WinZip because they are empty.
Without these, your players WILL NOT be able to save their objects
when they rent/quit/crash save/etc.

Ok, now on to the fun part, the actual compilation portion of this
guide.

This point should be the only place you need to ever use the BASH shell.

By the way, reboot the computer before doing this so that the GCC
environment variables and the path will be updated.

(excuse me while I lose my mind :))

Alrighty then...  on to the good stuff.  Ok, from the MSDOS prompt
within Windows, type 'bash' (without the quotes).  You should now see
this prompt: bash$

Enter these commands (one ping only please :))

cd /circle30bpl11
./configure

If you followed the instructions to this point, the configure script
included with Circle should now run, and create the conf.h and makefile.

After configure completes its run, exit BASH by typing 'exit'.  You should
now see the normal MSDOS prompt.  Now change directories to the
c:\circle30bpl11\src directory.  The rest of the changes will be made here.

Once you are within the src directory, you will want to edit the makefile,
config.c, comm.c, and conf.h

Open the makefile (using the Win95 EDIT program is good for this, as it
preserves the tabs in the file)

Find this line:

MYFLAGS = -Wall -fno-strict-prototypes

and change it to:

MYFLAGS = -Wall

Save the makefile.

Next file we will be working on is conf.h
Find this line:

#define HAVE_CRYPT 1

and change it to:

/* #define HAVE_CRYPT 1 */

Save conf.h

Next file is config.c
Find this line:

int nameserver_is_slow = NO;

and change it to:

int nameserver_is_slow = YES;

And last but not least, comm.c
Find this function:

void signal_setup(void)

it should be around line 1540.

Delete this function and replace it with the following:

void signal_setup(void) {
    my_signal(SIG_USR1, reread_wizlists);
    my_signal(SIG_USR2, unrestrict_game);

    my_signal(SIGHUP, hupsig);
    my_signal(SIGINT, hupsig);
    my_signal(SIGTERM, hupsig);
    my_signal(SIGPIPE, SIG_IGN);
    my_signal(SIGALRM, SIG_IGN);

#ifdef CIRCLE_OS2
#if defined(SIGABRT)
    my_signal(SIGABRT, hupsig);
#endif
#if defined(SIGFPE)
    my_signal(SIGFPE, hupsig);
#endif
#if defined(SIGILL)
    my_signal(SIGILL, hupsig);
#endif
#if defined(SIGSEGV)
    my_signal(SIGSEGV, hupsig);
#endif
#endif
}

Save comm.c

Now, the moment you have all been waiting for!!!  If everything is
set up as planned, you can now type 'make' and CIRCLE.EXE program
should now be created.  You will see this a few times while the
compile is running:

warning: subscript has type 'char'

ignore this.  The program will compile just fine.  After make has
completed its run (hopefully without any errors that cause it to stop),
the CIRCLE.EXE will be located in the c:\circle30bpl11\bin directory.

You may now start the mud by changing to the c:\circle30bpl11 directory
and typing 'bin\circle'.  You should see the messages indicating the mud
is booting and after a minute or so, you will see 'No connections.  Going
to sleep.'  At this point you can minimize the window and from the desktop,
use your favorite MUD client or telnet program (just don't use the
telnet.exe that is included with Win95, it doesn't work with Circle
correctly), and connect to 'localhost 4000' or '127.0.0.1 4000', whichever
happens to work for you.

And, voila! One ready to run stock CircleMUD running under Windows95.

Questions can be mailed to me directly at the following addresses:

fpicard@inet.att.co.kr (if this address bounces, try the next one)
   or
jonese@cs51.osan.af.mil


      +-----------------------------------------------------------+
      | Ensure that you have read the CircleMUD Mailing List FAQ: |
      |   http://cspo.queensu.ca/~fletcher/Circle/list-faq.html   |
      +-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST