Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, Yandex

Members: 0
Guests: 19
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » Compile errors on OpenBSD 4.3
Forum Rules | Mark all | Recent Posts

Compile errors on OpenBSD 4.3
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jun 8, 2008, 12:38 am
Go to the top of the page
Go to the bottom of the page

John Smith
Fledgling
GroupMembers
Posts20
JoinedMay 8, 2008

Hi,


I get the following compile errors when compiling on OpenBSD 4.3 :

# make
"Makefile", line 36: Need an operator
"Makefile", line 39: Need an operator
"Makefile", line 50: Need an operator
"Makefile", line 52: Need an operator
"Makefile", line 69: Need an operator
"Makefile", line 83: Need an operator
Fatal errors encountered -- cannot continue
       
Post is unread #2 Jun 8, 2008, 1:11 pm
Go to the top of the page
Go to the bottom of the page

John Smith
Fledgling
GroupMembers
Posts20
JoinedMay 8, 2008

John Smith said:

Hi,


I get the following compile errors when compiling on OpenBSD 4.3 :

# make
"Makefile", line 36: Need an operator
"Makefile", line 39: Need an operator
"Makefile", line 50: Need an operator
"Makefile", line 52: Need an operator
"Makefile", line 69: Need an operator
"Makefile", line 83: Need an operator
Fatal errors encountered -- cannot continue


Allright, it seems that I need to run 'gmake' instead of 'make' on OpenBSD. Still, I get the following compilation error :

# cd src
# gmake
gmake -s smaug
Compiling o/imc.o....
Compiling o/act_comm.o....
Compiling o/act_info.o....
Compiling o/act_move.o....
Compiling o/act_obj.o....
Compiling o/act_wiz.o....
Compiling o/ban.o....
Compiling o/boards.o....
Compiling o/build.o....
Compiling o/calendar.o....
Compiling o/chess.o....
chess.c: In function `void do_chess(CHAR_DATA*, char*)':
chess.c:1169: warning: array size (1024) smaller than bound length (4096)
chess.c:1169: warning: array size (1024) smaller than bound length (4096)
gmake[1]: *** [o/chess.o] Error 1
gmake: *** [all] Error 2

       
Post is unread #3 Jun 8, 2008, 11:46 pm
Go to the top of the page
Go to the bottom of the page

Nick Gammon
Fledgling
GroupMembers
Posts20
JoinedMay 20, 2008

Well, looking at the code at that line,

               snprintf( arg, LGST, "move %d%d %d%d", x, y, dx, dy );


It is complaining about LGST compared to the size of arg.

See the start of the function, arg is MAX_INPUT_LENGTH.

void do_chess( CHAR_DATA * ch, char *argument )
{
   char arg[MAX_INPUT_LENGTH];


Check out the lengths:

mud.h:#define MAX_INPUT_LENGTH	 1024 /* arg */


imc.h:#define LGST 4096 /* Large String */


The compiler is right - the string is not large enough.

It isn't totally clear to me why you need 4096 bytes to hold a string like: move 42 36
       
Post is unread #4 Jun 9, 2008, 9:26 am
Go to the top of the page
Go to the bottom of the page

John Smith
Fledgling
GroupMembers
Posts20
JoinedMay 8, 2008

Nick Gammon said:


The compiler is right - the string is not large enough.

Well in that case, perhaps one of the developers should fix the code ?


Regards,

John Smith.
       
Post is unread #5 Jun 9, 2008, 2:22 pm
Go to the top of the page
Go to the bottom of the page

Nick Gammon
Fledgling
GroupMembers
Posts20
JoinedMay 20, 2008

No doubt Samson or someone else will notice this thread and fix it in due course. Meantime, if you want it to compile soon I would change it to read:

snprintf( arg, sizeof (arg), "move %d%d %d%d", x, y, dx, dy );

       
Post is unread #6 Jun 18, 2008, 11:34 pm   Last edited Jun 18, 2008, 11:35 pm by John Smith
Go to the top of the page
Go to the bottom of the page

John Smith
Fledgling
GroupMembers
Posts20
JoinedMay 8, 2008

Nick Gammon said:

No doubt Samson or someone else will notice this thread and fix it in due course. Meantime, if you want it to compile soon I would change it to read:

snprintf( arg, sizeof (arg), "move %d%d %d%d", x, y, dx, dy );



Thanks for all the help,


Regards,


John Smith.
       
Pages:<< prev 1 next >>