Gammon Forum
Entire forum
SMAUG
Compiling the server
parse error before "_RE_ARGS"
parse error before "_RE_ARGS"
|
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Pages: 1 2
Posted by
| Psyon001
(8 posts) bio
|
Date
| Sun 27 Oct 2002 10:19 PM (UTC) Amended on Sun 27 Oct 2002 10:30 PM (UTC) by Psyon001
|
Message
| First off I am complete newb to all this but i am a quicklearner.I read through many, many posts and after a couple hours im now down to 1 last error that Im unsure of. Im nowhere close to a programmer so go easy on me. By the way im using Cygwin on WinXP. Ok heres whats goin on:
Quote:
$ make
make smaug
make[1]: Entering directory `/smaug/dist/src'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG -DREGEX act_comm.c
act_comm.c:36: parse error before "_RE_ARGS"
make[1]: *** [act_comm.o] Error 1
make[1]: Leaving directory `/smaug/dist/src'
make: *** [all] Error 2
Checked the acct.comm.c and and here is the line:
Quote:
#ifdef REGEX
extern int re_exec _RE_ARGS ((const char *));
#endif
Also thougth you may need to see this:
Quote:
}
int is_profane (char *what)
{
#if 0
int ret;
ret = re_exec(what);
if (ret==1)
return(1);
#endif
return(0);
}
I have went through several steps to remove the list of errors was recieving and im now down to this. any other info you need please let me know.
thanx in advance for any/all help
..:: trav ::.. | top |
|
Posted by
| Typhon
USA (112 posts) bio
|
Date
| Reply #1 on Sun 27 Oct 2002 10:48 PM (UTC) |
Message
| if you edit the Makefile you'll see some important information in there.. part of it pertains to your post here
:)
| top |
|
Posted by
| Psyon001
(8 posts) bio
|
Date
| Reply #2 on Sun 27 Oct 2002 11:07 PM (UTC) Amended on Mon 28 Oct 2002 12:53 AM (UTC) by Psyon001
|
Message
| Ya i did. In fact uncommenting "REG = -DREGEX" helped remove a lot of erros I was getting. There was also a line thta went like: #NEED_REG = -lgnuregex I tried to uncoomment, save and make but nothing changed. Is there something else in there I missed?
By the way you can check out my make file and acct.comm.c file by this:
http://psyonic-chaos.serveftp.com/makefile.txt
&
http://psyonic-chaos.serveftp.com/act_comm.txt | top |
|
Posted by
| Chris L
USA (57 posts) bio
|
Date
| Reply #3 on Mon 28 Oct 2002 01:07 AM (UTC) |
Message
| try commenting/uncommenting to the following in the makefile.. *shrug*
#REG = -DREGEX
NEED_REG = -lregex
NEED_CRYPT = -lcrypt
| top |
|
Posted by
| Psyon001
(8 posts) bio
|
Date
| Reply #4 on Mon 28 Oct 2002 01:34 AM (UTC) |
Message
| Well the things is.. if i comment the line:
#REG = -DREGEX
I get a whole long list of errors, but i tried your suggesion and also uncommented the others and this is what i get:
http://psyonic-chaos.serveftp.com/Chris_L_suggestion.txt
sorry for all the addy's I just didnt wanna spam out the forum with loads o code. thanx again for all advice here. | top |
|
Posted by
| Chris L
USA (57 posts) bio
|
Date
| Reply #5 on Mon 28 Oct 2002 02:44 AM (UTC) Amended on Mon 28 Oct 2002 02:51 AM (UTC) by Chris L
|
Message
| you want the makefile that way, there is really just one problem that is keeping it from compiling i believe
problem is when it tries to read/write the password, compiler doesnt deal with the encrypting well. you can probly just change it so it just puts the password into the charecter file without encrypting or add a
#define NOCRYPT
in mud.h (near top) ;)
i think that would fix problems if it doesnt try adding
#define crypt(s1, s2) (s1)
k? | top |
|
Posted by
| Psyon001
(8 posts) bio
|
Date
| Reply #6 on Mon 28 Oct 2002 02:49 AM (UTC) Amended on Mon 28 Oct 2002 02:53 AM (UTC) by Psyon001
|
Message
| sweet! Plz let me know. thanx again for the research and help. Either way will work ,the encryption part i dont too much care about... i mean what does it really do that will hurt so much if its changed? sorry like i said total newb at this. | top |
|
Posted by
| Chris L
USA (57 posts) bio
|
Date
| Reply #7 on Mon 28 Oct 2002 02:52 AM (UTC) Amended on Mon 28 Oct 2002 02:59 AM (UTC) by Chris L
|
Message
| i amended top so refer to that
without encryption just means that in charecter file it will flat out show the password so admin or something can view it.. its just kinda a security thing so it will show password instead of 'sahduachashca' or some other jiberish so people with shell access will basically be able to see anyones pw | top |
|
Posted by
| Psyon001
(8 posts) bio
|
Date
| Reply #8 on Mon 28 Oct 2002 03:22 AM (UTC) |
Message
| near top? hrm exactly where? i had i defined as:
#define REQWHOARG
#define NOCRYPT
#ifdef WIN32
#include <winsock.h>
#include <sys/types.h>
#pragma warning( disable: 4018 4244 4761)
#define index strchr
line 26 i believe.
then tried adding the #define crypt(s1, s2) (s1) and recieved same message:
$ make
make smaug
make[1]: Entering directory `/smaug/dist/src'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_comm.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_info.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_move.c
act_move.c:393:14: warning: trigraph ??> ignored
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_obj.c
act_obj.c: In function `can_layer':
act_obj.c:1389: warning: suggest explicit braces to avoid ambiguous `else'
act_obj.c: In function `do_auction':
act_obj.c:2651: warning: suggest explicit braces to avoid ambiguous `else'
act_obj.c:2675: warning: suggest explicit braces to avoid ambiguous `else'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_wiz.c
act_wiz.c:1637:49: warning: trigraph ??! ignored
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG boards.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG build.c
build.c: In function `fold_area':
build.c:6058: warning: suggest explicit braces to avoid ambiguous `else'
build.c:6061: warning: suggest explicit braces to avoid ambiguous `else'
build.c:6064: warning: suggest explicit braces to avoid ambiguous `else'
build.c:6070: warning: suggest explicit braces to avoid ambiguous `else'
build.c:6075: warning: suggest explicit braces to avoid ambiguous `else'
build.c:6078: warning: suggest explicit braces to avoid ambiguous `else'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG clans.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG comm.c
In file included from comm.c:60:
/usr/include/netinet/ip.h:167: parse error before "n_long"
/usr/include/netinet/ip.h:170: parse error before "n_long"
/usr/include/netinet/ip.h:172: parse error before '}' token
/usr/include/netinet/ip.h:173: parse error before '}' token
make[1]: *** [comm.o] Error 1
make[1]: Leaving directory `/smaug/dist/src'
make: *** [all] Error 2
*sigh* im still striking out. | top |
|
Posted by
| Chris L
USA (57 posts) bio
|
Date
| Reply #9 on Mon 28 Oct 2002 03:33 AM (UTC) |
Message
| since last error things in the url u gave it didnt have that problem while compiling comm.c, and all you added was the #define nocrypt? | top |
|
Posted by
| Psyon001
(8 posts) bio
|
Date
| Reply #10 on Mon 28 Oct 2002 03:36 AM (UTC) Amended on Mon 28 Oct 2002 03:39 AM (UTC) by Psyon001
|
Message
| oh wait i goofed, sorry man... i changed somethin while waiting on a reply...my bad. Corrected my error and heres what i get when making the file:
$ make
make smaug
make[1]: Entering directory `/smaug/dist/src'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_comm.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_info.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_move.c
act_move.c:393:14: warning: trigraph ??> ignored
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_obj.c
act_obj.c: In function `can_layer':
act_obj.c:1389: warning: suggest explicit braces to avoid ambiguous `else'
act_obj.c: In function `do_auction':
act_obj.c:2651: warning: suggest explicit braces to avoid ambiguous `else'
act_obj.c:2675: warning: suggest explicit braces to avoid ambiguous `else'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG act_wiz.c
act_wiz.c:1637:49: warning: trigraph ??! ignored
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG boards.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG build.c
build.c: In function `fold_area':
build.c:6058: warning: suggest explicit braces to avoid ambiguous `else'
build.c:6061: warning: suggest explicit braces to avoid ambiguous `else'
build.c:6064: warning: suggest explicit braces to avoid ambiguous `else'
build.c:6070: warning: suggest explicit braces to avoid ambiguous `else'
build.c:6075: warning: suggest explicit braces to avoid ambiguous `else'
build.c:6078: warning: suggest explicit braces to avoid ambiguous `else'
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG clans.c
gcc -c -O -g3 -Wall -Wuninitialized -DSMAUG comm.c
In file included from comm.c:60:
/usr/include/netinet/ip.h:167: parse error before "n_long"
/usr/include/netinet/ip.h:170: parse error before "n_long"
/usr/include/netinet/ip.h:172: parse error before '}' token
/usr/include/netinet/ip.h:173: parse error before '}' token
make[1]: *** [comm.o] Error 1
make[1]: Leaving directory `/smaug/dist/src'
make: *** [all] Error 2
REALLY SORRY BOUT THAT GOOF, I was just impatient.
| top |
|
Posted by
| Chris L
USA (57 posts) bio
|
Date
| Reply #11 on Mon 28 Oct 2002 03:45 AM (UTC) Amended on Mon 28 Oct 2002 03:47 AM (UTC) by Chris L
|
Message
| it is still that parse error in whatever is being included i think... im not sure what could have caused that if all you did was define nocrypt
btw the things like
build.c:6078: warning: suggest explicit braces to avoid ambiguous `else'
and
trigraph ??> ignored
warnings dont really affect anything u can ignore them, its the parse errors on something atm thats keeping it from compiling | top |
|
Posted by
| Psyon001
(8 posts) bio
|
Date
| Reply #12 on Mon 28 Oct 2002 03:55 AM (UTC) |
Message
| not sure if you looked at it before i changed, put i pasted and saved last post before i finished making the corrections that i goofed, after fixing all i amended that last post and its now the current error. sorry i thought i had changed everything back but I had forgot one other thing.. all changed back though, I was getting some help from someone else also and there suggestion didnt work and I forgot to change everythin back. but its as you saw before and yea the only thing i changed was added #define NOCRYPT on line 26 of mud.h. if your all out of ideas i understand, between me screin things up left and right and not putting things back in order before posting i prolly have you all confused. but anyway i still than ya for the effort, by the way this is a new install so if you know where i can get a clean version of the src files that will make correctly i will gladly download it instead, heck it would prolly be easier than trying to fiigure out my screwups. thanx man | top |
|
Posted by
| Nick Gammon
Australia (22,973 posts) bio
Forum Administrator |
Date
| Reply #13 on Mon 28 Oct 2002 08:33 AM (UTC) |
Message
| The only reference to re_exec in the entire source is in act_comm.c and that should be inactive because of the #if 0.
Thus, you should be able to get it to compile without any reference to RE_ARGS.
For instance, I would *not* have -DREGEX on the compile line, and fix whatever errors come up with that missing. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
Posted by
| Typhon
USA (112 posts) bio
|
Date
| Reply #14 on Mon 28 Oct 2002 01:45 PM (UTC) |
Message
| in responce to:
Well the things is.. if i comment the line:
#REG = -DREGEX
I get a whole long list of errors, but i tried your suggesion and also uncommented the others and this is what i get:
http://psyonic-chaos.serveftp.com/Chris_L_suggestion.txt
sorry for all the addy's I just didnt wanna spam out the forum with loads o code. thanx again for all advice here.
if you look at the end of the file it compiled all of the c/h files intot he object files.. it died on the linking.. all you have to do since your running windows is in makefile replace the word smaug in:
rm -f smaug
$(CC) $(L_FLAGS) $(USE_IMC) -o smaug $(O_FILES)
chmod g+w smaug
chmod a+x smaug
chmod g+w $(O_FILES)
with smaug.exe
then i believe in mud.h you have to change a variable exe_file and in startup you have to change smaug to smaug.exe
im not sure what you did after but it seemed to work okat that point.. maybe you can backtrace your steps and get it to compile completly | 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.
39,000 views.
This is page 1, subject is 2 pages long: 1 2
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.