ROM 2.4b6 Initial Compile

Posted by Faeral on Tue 12 Mar 2002 06:08 AM — 19 posts, 82,022 views.

#0
To start with the background:

PII 400, Windows XP with Cygwin (downloaded EVERYTHING on initial install of that).

I untar the file 'tar xzf Rom24b6.tar.gz', it unpacks, goto the src directory to do compile 'make -k' and get the following on my make.out:

db.c:56: conflicting types for 'srandom'
make: *** [db.o] Error 1
make: Target 'rom' not remade because of errors

Any suggestions or help would be appreciated
Australia Forum Administrator #1

There is a mention of fixing the random problem in another post on this forum (a little way down) - see ROM server with cygnus

#2
Fantastic!

Compiled well. Go to startup and receive:

$ bash: ./startup: /bin/csh: bad interpreter: No such file or directory

[1]+ Exit 126 ./startup

Bleh! The problems with learning. Appreciate the help though: input and insight most welcome!
Australia Forum Administrator #3
On my web page How to make changes, including compiling I mention that under Cygwin it appears that tcsh is the shell to use, not csh.

In other words, amend the startup script slightly to change csh into tcsh.

Amended on Tue 12 Mar 2002 10:47 AM by Nick Gammon
#4
I have some problems with startup for my rom24b6 also, anyway after i compiled and type:

startup &

It says...

[2] 32639
startup: Command not found.

..and after type something else ...

[2] Exit 1 startup

...pops up. Well, i got no clue atm what to do(only im sure of is that i dont have a startup file, obviously)... tryed the stuff you listed above but without any results.
Got any idea what I can try?
Australia Forum Administrator #5
It says "[2] Exit 1 startup " because you ran it "in the background". Leave off the "&" and you will run it at your terminal, which you may as well do while you debug.

In my copy of ROM the startup file was in the area directory. Did you change to that directory before typing "startup"?
#6
Cygwin is not a unix shell and most things that work on unix will not work with cygwin. With that being said to startup a mud with cygwin you need to copy rom.exe and paste it in the directory with area.lst which should be the same as the area directory. Next goto your area dir, cd rom24/area, and simply type ./rom
That should get the mud started, wait for it to say rom is ready to rock on port 4000 for conformation.
This was written because ppl that dont know cygwin will tell you things that just arent true.
Australia Forum Administrator #7
There is a danger you will forget to do the copy after recompiling. Just as easily, change directories, but execute from the source directory. eg.


cd ../area
../src/rom
#8
Even with tcsh installed in the Cygwin package, is it possible to run startup scripts at all?
USA #9
As long as you have tcsh installed, or something else that works, you won't have any problems. I've run my codebase in Cygwin before without a problem, and without it complaining about the shell not being there. I don't specifically recall installing tcsh, but apparently it must have been since it seems to work.

It may be worth considering an update to the more recent versions of Cygwin. Most of the complaints I see are lingering rumors and half-truths left over from the older b20 days. There simply isn't any truth to any of those anymore. Go over to www.cygwin.com and download the latest setup.exe they have and have at it.
#10
Well, I am having some problems getting the startup script running despite the presence of tcsh.

In the /rom24/area directory, where the script is located, I have this happening:

$ startup &
BASH: startup: command not found
[1] 495033
[1]+  Exit 127                startup


What am I missing here? The source has already been compiled(with GCC raising a stink about ambiguous if/elses).
USA #11
Try this:

./startup &

Note the "dot slash". It's generally necessary in *nix, and since Cygwin seeks to emulate this, it's necessary here too. :)
#12
Hmm..it seems to be running, according to ps:


$ ps
      PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
   138117       1  138117 4294829179  con  663 22:14:27 /usr/bin/BASH
   427169  138117  427169 4294698991  con  663 22:16:04 /usr/bin/TCSH
   438801  138117  438801 4294659975  con  663 22:16:22 /usr/bin/PS


However, when I attempt to connect to my own machine, it refuses the connection. The script itself is the default one included with ROM; no changes have been made to it.
#13
*bump*
Australia Forum Administrator #14
  1. When I do it under ps I see the ROM server itself, like this:

    
    $ ps
          PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
          193       1     193        193  con 1000 06:57:48 /usr/bin/bash
          224       1     224        224  con 1000 07:36:19 /usr/bin/bash
          277     193     277        273  con 1000 07:38:18 /usr/bin/tcsh
          249     277     277        255  con 1000 07:38:19 /home/nick/Rom24/src/rom
          271     224     271        279  con 1000 07:38:37 /usr/bin/ps
    

  2. You haven't said whether you have eliminated the message:

    
    $ startup &
    BASH: startup: command not found
    


    If not, I don't expect to be able to connect.
  3. In my startup file, I see the lines:

    
    # Set the port number.
    set port = 9000
    if ( "$1" != "" ) set port="$1"
    


    It seems it is defaulting to port 9000, not 4000, if you use the startup file without an argument. Have you tried connecting to port 9000?


Amended on Mon 29 Dec 2003 08:43 PM by Nick Gammon
#15
The line:
BASH: startup: command not found

did not appear when I ran the startup file.

      PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
   376175       1  376175 4294591121  con  663 11:50:50 /usr/bin/BASH
   447091  376175  447091 4294434265  con  663 11:51:04 /usr/bin/TCSH
   428403  376175  428403 4294509357  con  663 11:51:07 /usr/bin/PS

The shell's running at this particular moment, but ROM is nowhere to be seen.. my machine also refuses connections to ports 4000 and 9000.
Amended on Wed 25 Feb 2004 05:53 PM by Nanashi
Australia Forum Administrator #16
According to my version of ROM, the startup files starts like this:


#!/bin/csh
# Written by Furey.
# With additions from Tony and Alander.


So, it is looking for csh not tsch.

Does it start up OK, if you start manually? eg.


cd ../area
../src/rom

#17
This is what my current startup script looks like; the interpreter command was modified to find tcsh based on earlier advice in the forum.


#!/bin/tcsh.exe
# Written by Furey.
# With additions from Tony and Alander.

# Set the port number.
set port = 9000
if ( "$1" != "" ) set port="$1" 

# Change to area directory.
cd ../area

# Set limits.

while ( 1 )
    # If you want to have logs in a different directory,
    #   change the 'set logfile' line to reflect the directory name.
    set index = 1000
    while ( 1 )
	set logfile = ../log/$index.log
	@ index++
    end

    # Run rom.
    ../src/rom $port >&! $logfile


    # Restart, giving old connections a chance to die.
    if ( -e shutdown.txt ) then
	rm -f shutdown.txt
	exit 0
    endif
    sleep 15
end


I'm running this with a copy of the Windows ROM port.
Australia Forum Administrator #18
Can you please answer my earlier question "Does it start up OK, if you start manually?".

If the answer is Yes, then start up that shell:

/bin/tcsh.exe

Then, type in each of the commands manually. That is effectively the same as running the script. Then, see which one gives the error.

Don't bother with the comment lines, just the ones that don't start with "#".