Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ ROM
➜ Compiling the server
➜ Compiling Rom2.4 on Linux
Compiling Rom2.4 on Linux
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Krono
(5 posts) Bio
|
Date
| Wed 23 Jul 2003 08:24 PM (UTC) |
Message
| I am having a problem compiling Rom2.4 on linux but I got the same thing running on cygwin fine. Here is what I encounter:
gcc -c -Wall -O -ggdb -Dunix -DOLD_RAND -DNOCRYPT act_comm.c
act_comm.c: In function `do_push_drag':
act_comm.c:2099: warning: implicit declaration of function `do_look'
gcc -c -Wall -O -ggdb -Dunix -DOLD_RAND -DNOCRYPT act_enter.c
gcc -c -Wall -O -ggdb -Dunix -DOLD_RAND -DNOCRYPT act_info.c
act_info.c: In function `do_look':
act_info.c:1168: warning: suggest explicit braces to avoid ambiguous `else'
act_info.c:1177: warning: suggest explicit braces to avoid ambiguous `else'
gcc -c -Wall -O -ggdb -Dunix -DOLD_RAND -DNOCRYPT act_move.c
gcc -c -Wall -O -ggdb -Dunix -DOLD_RAND -DNOCRYPT act_obj.c
act_obj.c: In function `get_cost':
act_obj.c:2717: warning: suggest explicit braces to avoid ambiguous `else'
gcc -c -Wall -O -ggdb -Dunix -DOLD_RAND -DNOCRYPT act_wiz.c
gcc -c -Wall -O -ggdb -Dunix -DOLD_RAND -DNOCRYPT alias.c
gcc -c -Wall -O -ggdb -Dunix -DOLD_RAND -DNOCRYPT ban.c
gcc -c -Wall -O -ggdb -Dunix -DOLD_RAND -DNOCRYPT comm.c
comm.c:176: conflicting types for `getpeername'
/usr/include/sys/socket.h:127: previous declaration of `getpeername'
comm.c:177: conflicting types for `getsockname'
/usr/include/sys/socket.h:115: previous declaration of `getsockname'
comm.c: In function `process_output':
comm.c:1254: warning: suggest explicit braces to avoid ambiguous `else'
make: *** [comm.o] Error 1
This is my makefile:
CC = gcc
PROF = -O -ggdb
NOCRYPT =
C_FLAGS = -Wall $(PROF) $(NOCRYPT)
L_FLAGS = $(PROF)
O_FILES = act_comm.o act_enter.o act_info.o act_move.o act_obj.o act_wiz.o \
alias.o ban.o comm.o const.o db.o db2.o effects.o fight.o flags.o \
handler.o healer.o interp.o note.o lookup.o magic.o magic2.o \
music.o recycle.o save.o scan.o skills.o special.o tables.o \
update.o mob_cmds.o mob_prog.o olc.o olc_act.o olc_save.o bit.o \
mem.o string.o olc_mpcode.o
rom: $(O_FILES)
rm -f rom
$(CC) $(L_FLAGS) -o rom $(O_FILES)
.c.o: merc.h
$(CC) -c $(C_FLAGS) -Dunix -DOLD_RAND -DNOCRYPT $<
I don't know what i need to do cause it compiles fine on windows using cygwin =/ Thanks for helping =) | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #1 on Wed 23 Jul 2003 10:06 PM (UTC) |
Message
| I compiled that file OK. Exactly which version of ROM do you have? Where did you download it from? Which Linux are you using?
...
gcc -c -Wall -O -g -DNOCRYPT -DOLD_RAND -Dunix act_wiz.c
gcc -c -Wall -O -g -DNOCRYPT -DOLD_RAND -Dunix alias.c
gcc -c -Wall -O -g -DNOCRYPT -DOLD_RAND -Dunix ban.c
gcc -c -Wall -O -g -DNOCRYPT -DOLD_RAND -Dunix comm.c
gcc -c -Wall -O -g -DNOCRYPT -DOLD_RAND -Dunix const.c
gcc -c -Wall -O -g -DNOCRYPT -DOLD_RAND -Dunix db.c
gcc -c -Wall -O -g -DNOCRYPT -DOLD_RAND -Dunix db2.c
gcc -c -Wall -O -g -DNOCRYPT -DOLD_RAND -Dunix effects.c
gcc -c -Wall -O -g -DNOCRYPT -DOLD_RAND -Dunix fight.c
...
$ gcc --version
gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
dmesg | less
Linux version 2.4.20-13.9 (bhcompile@porky.devel.redhat.com) (gcc version 3.2.2
20030222 (Red Hat Linux 3.2.2-5)) #1 Mon May 12 10:55:37 EDT 2003
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Krono
(5 posts) Bio
|
Date
| Reply #2 on Thu 24 Jul 2003 02:38 AM (UTC) |
Message
| http://www.zone.ee/brigadir/rom2.4/rom2.4b4a(OLC1.71+coloUr1.2).zip
this is the one i got and i been working with it(adding push/drag, races, classes, etc..) a bit on windows with cygwin and i decided to upload it to a free mud host place at www.iflipout.com. And i did a rm *.o and make with cygwin just to make sure it still works and then i uploaded it to the linux mud server. and i got that error message =x even now on windows it runs perfectly fine =) maybe the one i downloaded was meant for windows only? anyways thanks for responding =) | Top |
|
Posted by
| Krono
(5 posts) Bio
|
Date
| Reply #3 on Thu 24 Jul 2003 02:43 AM (UTC) |
Message
| Oh ya and this is what im using:
gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Linux version 2.4.20-9 (bhcompile@stripples.devel.redhat.com) (gcc version 3.2.2
20030313 (Red Hat Linux 3.2.2-10)) #1 Wed Apr 2 13:42:50 EST 2003
hehe sorry i forgot to add that last post =) | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #4 on Thu 24 Jul 2003 03:14 AM (UTC) |
Message
| Near the start of comm.c, add a line:
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h> // add this line
A bit further down (line 168) comment out all of the definitions, like this:
#if defined(linux)
/*
Linux shouldn't need these. If you have a problem compiling, try
uncommenting accept and bind.
int accept args( ( int s, struct sockaddr *addr, int *addrlen ) );
int bind args( ( int s, struct sockaddr *name, int namelen ) );
int close args( ( int fd ) );
int getpeername args( ( int s, struct sockaddr *name, int *namelen ) );
int getsockname args( ( int s, struct sockaddr *name, int *namelen ) );
int gettimeofday args( ( struct timeval *tp, struct timezone *tzp ) );
int listen args( ( int s, int backlog ) );
int read args( ( int fd, char *buf, int nbyte ) );
int select args( ( int width, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds, struct timeval *timeout ) );
int socket args( ( int domain, int type, int protocol ) );
int write args( ( int fd, char *buf, int nbyte ) );
*/ // <---- move closing comment to here
#endif
Then it will compile OK.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Krono
(5 posts) Bio
|
Date
| Reply #5 on Thu 24 Jul 2003 04:47 AM (UTC) |
Message
| Thanks Nick =) worked perfectly!!! =D hehe wow much love haha | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
16,459 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top