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!

Members: 0
Guests: 12
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
Evoru (32)
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » afkmud177 warning on compile
Forum Rules | Mark all | Recent Posts

afkmud177 warning on compile
< Newer Topic :: Older Topic > should I ignore this?

Pages:<< prev 1 next >>
Post is unread #1 Nov 25, 2006, 4:34 pm
Go to the top of the page
Go to the bottom of the page

desconocido

GroupMembers
Posts8
JoinedNov 21, 2006

Hi,

It's been a while since I've played around with my favorite codebase - afkmud - and after having a looking at my old mud, wich was based on afkmud163, I decided to go upgrade to 177.

Actually, upgrading the old mud is going to be too much work so I downloaded the latest version of the codebase and tried to get it to compile. After making the needed changes to the makefile - I'm using cygwin on a windows machine - I encountered a few problems:

comm.c: In function `void nanny(DESCRIPTOR_DATA*, char*)':
comm.c:3180: warning: unused variable `char*p'


I know I can ignore this and still run the mud, but I'd hate to find out later on that I should've fixed this problem from the start. I'm a bit of a noob when it comes to coding, so if anyone is able to point out what it means, or what to do atleast, it would be great.

Also, the first time I tried to compile I got the following error:

sha256.c:58:20: endian.h: No such file or directory
make[1]: *** [o/sha256.o] Error 1


I fixed this problem by changing the following line inside sha256.c
#include <endian.h>
into
#include "endian.h"

(I don't know if that's an actual bug, or just cygwin not being able to handle the code, thought I'd report this anyway.)
       
Post is unread #2 Nov 27, 2006, 12:35 am
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

That first one, the unused variable in comm.c, you can safely ignore, though it really just means that in comm.c you've got char * p declared but never actually used so you could just open comm.c and comment out or delete that declaration if you want to get rid of the warning.

The endian.h thing has been discussed here before, I think it's a cygwin only issue, but it could've been a problem elsewhere too, I don't recall anymore.
       
Post is unread #3 Nov 27, 2006, 7:43 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Try this for the endian.h issue:
#include <sys/endian.h>


I'm not in front of my PC right now so I don't have the code handy. Your change won't work since endian.h is a system file, not a mud source file.
       
Post is unread #4 Dec 2, 2006, 3:32 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

This is what the includes section for sha-256.c should look like:
#include <cstdio>
#include <cstring>
#include <sys/cdefs.h>
#include <sys/param.h>
#if defined(__FreeBSD__)
#include <sys/endian.h>
#else
#include <endian.h>
#endif
#include "sha256.h"


I have compiled this in Cygwin and had no trouble. Including the endian.h stuff. So if this isn't working then your situation does not fit and I need more information.

The comm.c warning was dealt with at some point and won't be an issue later.
       
Post is unread #5 Dec 6, 2006, 6:22 pm
Go to the top of the page
Go to the bottom of the page

desconocido

GroupMembers
Posts8
JoinedNov 21, 2006

Sorry for the late reply, I've been busy and forgot about my post on here.

Thanks for clearing that up, I feel a lot more comfortable knowing I can just ignore that warning.
As for the endian.h issue: I've tried for hours but it would not go through a compile, as far as I remember it did go through after I made that change. I'll go have a look at it asap and I'll post the outcome later on.

I'm also experiencing some trouble with the combat system and help files, as I'm unable to read those. Help files are displayed, but the actual text will not let itself be read. Combat messages are not showing up either, maybe because I made those changes trying to get it to compile and left out Endian.h? I'll go chance it back and try to re-compile the mud again.
       
Post is unread #6 Dec 6, 2006, 7:06 pm
Go to the top of the page
Go to the bottom of the page

desconocido

GroupMembers
Posts8
JoinedNov 21, 2006

Ok, this is the warning that Cygwin is giving me:

sha256.c:61:20: endian.h: No such file or directory
make[1]: *** [o/sha256.o] Error 1
make: *** [all] Error 2


Where or how do I add endian.h? I'm a bit of a noob and I have no idea what endian.h does. I've tried to just add a blank file to the src folder, and name it endian.h, but that doesn't change anything; I'm still getting the same error on compile. The mud won't compile untill I change that one line back to #include "endian.h"

I changed the includes section to what you said it should like:

#include <cstdio>
#include <cstring>
#include <sys/cdefs.h>
#include <sys/param.h>
#if defined(__FreeBSD__)
#include <sys/endian.h>
#else
#include <endian.h>
#endif
#include "sha256.h"


I'm getting the same error again again. :(
       
Post is unread #7 Dec 9, 2006, 7:10 am   Last edited Nov 25, 2007, 7:15 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

All I can say is that you've got something missing with your Cygwin install or it's too old or something. Go back here: http://www.smaugmuds.org/index.php?a=topic&t=1057 and check to make sure you've got everything listed. The dependencies will take care of getting the required parts. There's no reason to expect Cygwin to behave differently than it did for me.
       
Post is unread #8 Dec 18, 2006, 4:53 am
Go to the top of the page
Go to the bottom of the page

desconocido

GroupMembers
Posts8
JoinedNov 21, 2006

Thank you, that totally solved the problem.

The only problems I'm still experiencing are the combat messages not being displayed, although the combat system itself seems to be working fine. The same goes for certain help files not being readable. I'm beginning to believe I screwed up somewhere adding bug fixes, because I don't remember making any other changes to the code. Anyhow, I'm going to spend some time trying to solve this problem.

On another note, afkmud1.8 gave me a huge list of warnings but did go through the compile. I was able to connect afterwards but haven't had the time to see if everything was working the way it should. Is there anything known about compiling 1.8 in Cygwin and getting these warnings?

Thank you,

-D.
       
Post is unread #9 Dec 18, 2006, 6:44 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Ugh. Guess I forgot to compile in Cygwin and didn't notice that one of the warning flags I intended to take out was still there. In the Makefile, on the W_FLAGS line, get rid of: -Wextra

All it does is spam you to death on things that are not real problems.
       
Post is unread #10 Dec 22, 2006, 6:27 am
Go to the top of the page
Go to the bottom of the page

desconocido

GroupMembers
Posts8
JoinedNov 21, 2006

Yes, that worked, thank you.

I'm bug/error free atm, as far as I can see atleast, so I'm happy. :)
       
Pages:<< prev 1 next >>