[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  Compiling the server
. . -> [Subject]  Compiling Server

Compiling Server

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Acentric   (12 posts)  [Biography] bio
Date Tue 15 Jul 2003 05:17 AM (UTC)
Message
Ive compiled alot of different codebases so far, and the only one thats giving me alot of trouble is dystopia. This is the smaug board but this error is kind of like some of the ones that I had with smaug last night so here goes.

Near the end of the make, when it reaches comm.c, i get several implicit declarations. They are as follows.

comm.c:48:48: execinfo.h: No such file or directory
comm.c: In function 'lookup_address':
comm.c:1141: warning: implicit declaration of function 'gethostbyaddr_r'
comm.c: In function 'iBacktrace':
comm.c:1554: warning: implicit declaration of function 'backtrace'
comm.c:1556: warning: implicit declaration of function 'backtrace_symbols'
comm.c:1556: warning: assignment makes pointed from integer without a cast
make: *** [comm.o] Error 1

I had to hand type all of that (havent figured out how to copy paste yet) heh. Anyhow, my makefile is as follows.


CC = gcc
NOCRYPT = -DNOCRYPT
C_FLAGS = -Wall -g $(NOCRYPT)
L_FLAGS = -lz -lpthread -rdynamic

O_FILES = act_comm.o act_info.o act_move.o act_obj.o act_wiz.o kav_wiz.o \
kav_soundex.o kav_fight.o kav_info.o board.o build.o social-edit.o \
fight.o arena.o mccp.o db.o x-socials.o interp.o handler.o \
mem.o olc.o olc_act.o olc_save.o desc_map.o wizutil.o magic.o bit.o \
update.o const.o save.o special.o string.o jope.o msp.o comm.o \
jobo_quest.o jobo_update.o jobo_save.o jobo_comm.o jobo_fight.o \
jobo_act.o jobo_wiz.o jobo_util.o jobo_shop.o

merc: $(O_FILES)
rm -f dystopia
$(CC) -o dystopia $(O_FILES) $(L_FLAGS)
chmod g+w dystopia
chmod g+w $(O_FILES)

.c.o: merc.h
$(CC) -c $(C_FLAGS) $<

clean :
rm -f *.o

could anyone please help me figure out whats wrong? =P Thanks.

[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #1 on Tue 15 Jul 2003 05:33 AM (UTC)
Message
The problem is actually in comm.c, not your makefile. First problem is you either dont have the execinfo.h file, or more likely just dont have it where the code expects it to be. The warnings can be ignored pretty much unless you want to clean up the code so you dont get em anymore. What you need to fix so your code compiles is the defined path for execinfo.h because its not where the code expects to find it. I havent played with the dystopia codebase at all so Im not sure exactly where it thinks the file is supposed to be and can't help you much beyond pointing out the problem. Maybe Nick or another of the admins here will have better info on that part of the problem.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Acentric   (12 posts)  [Biography] bio
Date Reply #2 on Tue 15 Jul 2003 05:48 AM (UTC)
Message
I probalbly have to fix where it thinks it is then, because dystopia-1.4.tar.gz didn't come with any file called execinfo.h, the problem is i have no idea what to do with this, im semi new to compiling. Like you said hopefully nick or someone whos compiled dyst1.4 can help me out heh
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Tue 15 Jul 2003 06:11 AM (UTC)
Message
I haven't compiled it, however if you tell me where you found it I could try.

What system are you using? Cygwin? Linux?

In either case you should be able to copy and paste the errors. In Cygwin click on the icon in the very top-left corner, select Edit -> Mark and then click and drag to select the text you want. Then hit Enter.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Acentric   (12 posts)  [Biography] bio
Date Reply #4 on Tue 15 Jul 2003 07:08 AM (UTC)
Message
I got it from ftp.game.orc, its the only version of dystopia downloadable without going into the archive files. I heard those ones are all buggy so i got 1.4. Im using Cygwin. Thanks for telling me how to copy error messages, heh, helps alot. I can show you the whole thing now, so here goes...

$ make
gcc -c -Wall -g -DNOCRYPT act_comm.c
gcc -c -Wall -g -DNOCRYPT act_info.c
gcc -c -Wall -g -DNOCRYPT act_move.c
gcc -c -Wall -g -DNOCRYPT act_obj.c
gcc -c -Wall -g -DNOCRYPT act_wiz.c
gcc -c -Wall -g -DNOCRYPT kav_wiz.c
gcc -c -Wall -g -DNOCRYPT kav_soundex.c
gcc -c -Wall -g -DNOCRYPT kav_fight.c
gcc -c -Wall -g -DNOCRYPT kav_info.c
gcc -c -Wall -g -DNOCRYPT board.c
gcc -c -Wall -g -DNOCRYPT build.c
gcc -c -Wall -g -DNOCRYPT social-edit.c
gcc -c -Wall -g -DNOCRYPT fight.c
gcc -c -Wall -g -DNOCRYPT arena.c
gcc -c -Wall -g -DNOCRYPT mccp.c
gcc -c -Wall -g -DNOCRYPT db.c
gcc -c -Wall -g -DNOCRYPT x-socials.c
gcc -c -Wall -g -DNOCRYPT interp.c
gcc -c -Wall -g -DNOCRYPT handler.c
gcc -c -Wall -g -DNOCRYPT mem.c
gcc -c -Wall -g -DNOCRYPT olc.c
gcc -c -Wall -g -DNOCRYPT olc_act.c
gcc -c -Wall -g -DNOCRYPT olc_save.c
gcc -c -Wall -g -DNOCRYPT desc_map.c
gcc -c -Wall -g -DNOCRYPT wizutil.c
gcc -c -Wall -g -DNOCRYPT magic.c
gcc -c -Wall -g -DNOCRYPT bit.c
gcc -c -Wall -g -DNOCRYPT update.c
gcc -c -Wall -g -DNOCRYPT const.c
const.c:1095:5: warning: multi-line string literals are deprecated
const.c:1097:5: warning: multi-line string literals are deprecated
gcc -c -Wall -g -DNOCRYPT save.c
gcc -c -Wall -g -DNOCRYPT special.c
gcc -c -Wall -g -DNOCRYPT string.c
gcc -c -Wall -g -DNOCRYPT jope.c
gcc -c -Wall -g -DNOCRYPT msp.c
gcc -c -Wall -g -DNOCRYPT comm.c
comm.c:47:48: execinfo.h: No such file or directory
comm.c: In function `lookup_address':
comm.c:1140: warning: implicit declaration of function `gethostbyaddr_r'
comm.c: In function `iBacktrace':
comm.c:1553: warning: implicit declaration of function `backtrace'
comm.c:1555: warning: implicit declaration of function `backtrace_symbols'
comm.c:1555: warning: assignment makes pointer from integer without a cast
make: *** [comm.o] Error 1

It wasnt like this initially though. First at the end it gave me something about not being able to find -lcrypt, so i removed it from makefile (thats the error i got last night with smaug and i removed -lcrypt and smaug worked so i thought well why not with this) then it started giving me crypt errors.. so i added NOCRYPT = -DNOCRYPT to makefile, and now I cant figure out what to do with this new error thats come up, aka the one as shown above.
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Wed 16 Jul 2003 04:26 AM (UTC)

Amended on Wed 16 Jul 2003 04:27 AM (UTC) by Nick Gammon

Message
Quote:

I got it from ftp.game.orc


I presume you mean ftp.game.org - can you give the exact directory - I can't find it there.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Acentric   (12 posts)  [Biography] bio
Date Reply #6 on Wed 16 Jul 2003 03:59 PM (UTC)
Message
ftp://ftp.game.org/pub/mud/diku/merc/godwars/dystopia

file should be in that folder, sorry for the delayed response, was out all last night.

[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #7 on Wed 16 Jul 2003 10:42 PM (UTC)

Amended on Wed 16 Jul 2003 10:43 PM (UTC) by Nick Gammon

Message
Right, your major problems are the following 3 things:


comm.c:47:48: execinfo.h: No such file or directory
comm.c: In function `lookup_address':
comm.c:1140: warning: implicit declaration of function `gethostbyaddr_r'
comm.c: In function `iBacktrace':
comm.c:1553: warning: implicit declaration of function `backtrace'
comm.c:1555: warning: implicit declaration of function `backtrace_symbols'


If we look in comm.c we see that execinfo.h is included near the start:


#include <execinfo.h>   // internal backtraces.


This gives us a hint about the third error (the backtrace one) because without the header file it probably won't recognise things in it.

I commented that line out.

Next, I see there are problems in iBacktrace, however I notice that further up the call to iBacktrace is commented out:


/*    signal(SIGSEGV, iBacktrace); */


If we are not calling it, we hardly need the function itself, so you could remove it or comment it out. Here is one way of doing that ...



#if 0
/*
 * To do internal backtracs at crashes
 */
void iBacktrace(int iSignal)
{

... blah blah blah ...

}
#endif


The final problem is the gethostbyaddr_r one. I see from my Linux header file the following comments:


/* Reentrant versions of the functions above.  The additional
   arguments specify a buffer of BUFLEN starting at BUF.  The last
   argument is a pointer to a variable which gets the value which
   would be stored in the global variable `herrno' by the
   non-reentrant functions.  */
extern int gethostent_r (struct hostent *__restrict __result_buf,
                         char *__restrict __buf, size_t __buflen,
                         struct hostent **__restrict __result,
                         int *__restrict __h_errnop) __THROW;

extern int gethostbyaddr_r (__const void *__restrict __addr, __socklen_t __len,
                            int __type,
                            struct hostent *__restrict __result_buf,
                            char *__restrict __buf, size_t __buflen,
                            struct hostent **__restrict __result,
                            int *__restrict __h_errnop) __THROW;


I'm not sure you really need the re-entrant call to gethostbyaddr so let's change it to the non-re-entrant one and try that ...


  struct hostent *from = 0;
//  struct hostent ent;
//  char buf[16384]; // enough ??
//  int err;

  thread_count++;

//  gethostbyaddr_r( darg->buf, sizeof(darg->buf), AF_INET, &ent, buf, 16384, &from, &err);
    gethostbyaddr( darg->buf, sizeof(darg->buf), AF_INET);



That compiled OK - I didn't actually run it.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Acentric   (12 posts)  [Biography] bio
Date Reply #8 on Thu 17 Jul 2003 12:19 AM (UTC)
Message
Apparently it wants to scrap some more with me, but it dont want no part of you anymore nick, but blah i need help again, have no idea what this means

$ make
gcc -c -Wall -g -DNOCRYPT act_comm.c
gcc -c -Wall -g -DNOCRYPT act_info.c
gcc -c -Wall -g -DNOCRYPT act_move.c
gcc -c -Wall -g -DNOCRYPT act_obj.c
gcc -c -Wall -g -DNOCRYPT act_wiz.c
gcc -c -Wall -g -DNOCRYPT kav_wiz.c
gcc -c -Wall -g -DNOCRYPT kav_soundex.c
gcc -c -Wall -g -DNOCRYPT kav_fight.c
gcc -c -Wall -g -DNOCRYPT kav_info.c
gcc -c -Wall -g -DNOCRYPT board.c
gcc -c -Wall -g -DNOCRYPT build.c
gcc -c -Wall -g -DNOCRYPT social-edit.c
gcc -c -Wall -g -DNOCRYPT fight.c
gcc -c -Wall -g -DNOCRYPT arena.c
gcc -c -Wall -g -DNOCRYPT mccp.c
gcc -c -Wall -g -DNOCRYPT db.c
gcc -c -Wall -g -DNOCRYPT x-socials.c
gcc -c -Wall -g -DNOCRYPT interp.c
gcc -c -Wall -g -DNOCRYPT handler.c
gcc -c -Wall -g -DNOCRYPT mem.c
gcc -c -Wall -g -DNOCRYPT olc.c
gcc -c -Wall -g -DNOCRYPT olc_act.c
gcc -c -Wall -g -DNOCRYPT olc_save.c
gcc -c -Wall -g -DNOCRYPT desc_map.c
gcc -c -Wall -g -DNOCRYPT wizutil.c
gcc -c -Wall -g -DNOCRYPT magic.c
gcc -c -Wall -g -DNOCRYPT bit.c
gcc -c -Wall -g -DNOCRYPT update.c
gcc -c -Wall -g -DNOCRYPT const.c
const.c:1095:5: warning: multi-line string literals are deprecated
const.c:1097:5: warning: multi-line string literals are deprecated
gcc -c -Wall -g -DNOCRYPT save.c
gcc -c -Wall -g -DNOCRYPT special.c
gcc -c -Wall -g -DNOCRYPT string.c
gcc -c -Wall -g -DNOCRYPT jope.c
gcc -c -Wall -g -DNOCRYPT msp.c
gcc -c -Wall -g -DNOCRYPT comm.c
gcc -c -Wall -g -DNOCRYPT jobo_quest.c
gcc -c -Wall -g -DNOCRYPT jobo_update.c
gcc -c -Wall -g -DNOCRYPT jobo_save.c
gcc -c -Wall -g -DNOCRYPT jobo_comm.c
gcc -c -Wall -g -DNOCRYPT jobo_fight.c
gcc -c -Wall -g -DNOCRYPT jobo_act.c
gcc -c -Wall -g -DNOCRYPT jobo_wiz.c
gcc -c -Wall -g -DNOCRYPT jobo_util.c
gcc -c -Wall -g -DNOCRYPT jobo_shop.c
rm -f dystopia
gcc -o dystopia act_comm.o act_info.o act_move.o act_obj.o act_wiz.o k
kav_soundex.o kav_fight.o kav_info.o board.o build.o social-edit.o figh
.o mccp.o db.o x-socials.o interp.o handler.o mem.o olc.o olc_act.o olc
esc_map.o wizutil.o magic.o bit.o update.o const.o save.o special.o str
e.o msp.o comm.o jobo_quest.o jobo_update.o jobo_save.o jobo_comm.o job
jobo_act.o jobo_wiz.o jobo_util.o jobo_shop.o -lz -lpthread
chmod g+w dystopia
chmod: changing permissions of `dystopia': No such file or directory
make: *** [merc] Error 1
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #9 on Thu 17 Jul 2003 05:23 AM (UTC)
Message
I got that, but it still works. What happens is that under Cygwin it makes a file called dystopia.exe but the last thing in the make file tries to change the permissions on dystopia. You can change that to dystopia.exe in the make file, or just ignore it. You are now ready to run it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Acentric   (12 posts)  [Biography] bio
Date Reply #10 on Thu 17 Jul 2003 09:54 AM (UTC)
Message
Yup it did, just got home heh. Seems that every dystopia codebase works if you tweak the gethostbyaddr_r like you had me tweak it. Thanks for all your help.
[Go to top] top

Posted by Relikfealith   (3 posts)  [Biography] bio
Date Reply #11 on Sun 04 Jul 2004 02:21 AM (UTC)
Message
help me plz
$ make
gcc -c -Wall -g act_comm.c
In file included from act_comm.c:26:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g act_info.c
In file included from act_info.c:26:
merc.h:3090: warning: conflicting types for built-in function `logf'
act_info.c: In function `do_password':
act_info.c:2589: warning: implicit declaration of function `crypt'
act_info.c:2589: warning: passing arg 1 of `strcmp' makes pointer from integer w
ithout a cast
act_info.c:2605: warning: assignment makes pointer from integer without a cast
gcc -c -Wall -g act_move.c
In file included from act_move.c:25:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g act_obj.c
In file included from act_obj.c:25:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g act_wiz.c
In file included from act_wiz.c:25:
merc.h:3090: warning: conflicting types for built-in function `logf'
act_wiz.c: In function `do_resetpassword':
act_wiz.c:5400: warning: implicit declaration of function `crypt'
act_wiz.c:5400: warning: assignment makes pointer from integer without a cast
gcc -c -Wall -g kav_wiz.c
In file included from kav_wiz.c:25:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g kav_soundex.c
In file included from kav_soundex.c:18:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g kav_fight.c
In file included from kav_fight.c:25:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g kav_info.c
In file included from kav_info.c:25:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g board.c
In file included from board.c:26:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g build.c
In file included from build.c:32:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g social-edit.c
In file included from social-edit.c:31:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g fight.c
In file included from fight.c:25:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g arena.c
In file included from arena.c:25:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g mccp.c
In file included from mccp.c:41:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g db.c
In file included from db.c:26:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g x-socials.c
In file included from x-socials.c:25:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g interp.c
In file included from interp.c:27:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g handler.c
In file included from handler.c:25:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g mem.c
In file included from mem.c:40:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g olc.c
In file included from olc.c:39:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g olc_act.c
In file included from olc_act.c:40:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g olc_save.c
In file included from olc_save.c:47:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g desc_map.c
In file included from desc_map.c:33:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g wizutil.c
In file included from wizutil.c:28:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g magic.c
In file included from magic.c:25:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g bit.c
In file included from bit.c:47:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g update.c
In file included from update.c:26:
merc.h:3090: warning: conflicting types for built-in function `logf'
gcc -c -Wall -g const.c
In file included from const.c:24:
merc.h:3090: warning: conflicting types for built-in function `logf'
const.c:1095:5: missing terminating " character
const.c:1096: error: syntax error before "asylum"
const.c:1096:8: missing terminating " character
const.c:1097:5: missing terminating " character
const.c:1098:8: missing terminating " character
make: *** [const.o] Error 1
[Go to top] top

Posted by Nick Gammon   Australia  (22,975 posts)  [Biography] bio   Forum Administrator
Date Reply #12 on Tue 06 Jul 2004 10:26 PM (UTC)
Message
This thread is over a year old. I would prefer you started a new thread for a new set of errors. If you did you would have seen this request:

Please tell us:


  • Which version you are compiling (eg. SMAUG FUSS, SMAUG 1.4a with MXP)

  • Which operating system and compiler you are using (eg. Linux, Windows with Cygwin, Windows with Visual C++)


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] 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.


30,418 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] 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.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]