Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Google, Yandex, Bing, DotBot

Members: 0
Guests: 7
Stats
Files
Topics
Posts
Members
Newest Member
481
3,734
19,366
618
Micheal64X
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Compiling AFKmud with FreeBSD
Forum Rules | Mark all | Recent Posts

Compiling AFKmud with FreeBSD
< Newer Topic :: Older Topic > Compile problems under FreeBSD

Pages:<< prev 1 next >>
Post is unread #1 May 23, 2003, 5:12 am
Go to the top of the page
Go to the bottom of the page

Merlineous

GroupMembers
Posts7
JoinedMay 23, 2003

I have downloaded AFKmud and have some problems compiling.
The first one is with the makefile. I had to comment out the line with machine -mcpu -march to make it get this far.

Now, when I compile I am getting this error:

carso# gmake
gmake -s afkmud
Compiling o/websvr.o....
websvr.c:317: variable `ZERO_TIME' has initializer but incomplete type
cc1: warnings being treated as errors
websvr.c:317: warning: excess elements in struct initializer
websvr.c:317: warning: (near initialization for `ZERO_TIME')
websvr.c:317: warning: excess elements in struct initializer
websvr.c:317: warning: (near initialization for `ZERO_TIME')
gmake[1]: *** [o/websvr.o] Error 1
gmake: *** [all] Error 2
carso# grep ZERO_TIME *
websvr.c:struct timeval ZERO_TIME = { 0, 0 };
websvr.c: select( max_fd+1, &readfds, NULL, NULL, &ZERO_TIME );
carso#

Does anyone know how to fix it?

Thanks in advance
Merlineous
       
Post is unread #2 May 23, 2003, 10:20 am
Go to the top of the page
Go to the bottom of the page

Xorith
The Null Value
GroupAFKMud Team
Posts254
JoinedFeb 23, 2003

I replied to this in the other forum, but here you go.

Use Makefile.FreeBSD
       
Post is unread #3 May 23, 2003, 10:36 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Heh, not quite. That was true for versions prior to 1.5x. Now all you need to do is make sure you've set the Makefile to the proper environment - there are 3 flags near the top. One for Linux, one for Cygwin, one for FreeBSD. Uncomment the appropriate one, and comment the other two and go from there.
       
Post is unread #4 May 23, 2003, 12:58 pm
Go to the top of the page
Go to the bottom of the page

Merlineous

GroupMembers
Posts7
JoinedMay 23, 2003

Heh, not quite. That was true for versions prior to 1.5x. Now all you need to do is make sure you've set the Makefile to the proper environment - there are 3 flags near the top. One for Linux, one for Cygwin, one for FreeBSD. Uncomment the appropriate one, and comment the other two and go from there.


I have done that, the error I quoted is what I get with the makefile with the freebsd line uncommented.

Merlineous
       
Post is unread #5 May 23, 2003, 2:01 pm
Go to the top of the page
Go to the bottom of the page

Merlineous

GroupMembers
Posts7
JoinedMay 23, 2003

In the Makefile there is a FBSD=FREEBSD which I have uncommented. Where abouts is this used, there isn't any other reference to FBSD in the Makefile.

I've added a $(FBSD) to the C Flags line. When I gmake I now get:


carso# gmake
gmake -s afkmud
Compiling o/websvr.o....
cc1: warnings being treated as errors
In file included from websvr.c:85:
/usr/include/arpa/inet.h:89: warning: parameter has incomplete type
/usr/include/arpa/inet.h:92: warning: parameter has incomplete type
/usr/include/arpa/inet.h:96: warning: parameter has incomplete type
gmake[1]: *** [o/websvr.o] Error 1
gmake: *** [all] Error 2
carso#

If I comment out the WEB=1 it compiles until it gets to Calendar.c and I get:

Compiling o/calendar.o....
cc1: warnings being treated as errors
calendar.c: In function `c_time':
calendar.c:135: warning: pointer to a function used in arithmetic
calendar.c:135: warning: assignment makes integer from pointer without a cast
gmake[1]: *** [o/calendar.o] Error 1
gmake: *** [all] Error 2
carso#

Any ideas? Anyone!?
       
Post is unread #6 May 24, 2003, 11:35 am
Go to the top of the page
Go to the bottom of the page

Guest - (Unregistered)

In the Makefile there is a FBSD=FREEBSD which I have uncommented. Where abouts is this used, there isn't any other reference to FBSD in the Makefile.
I've added a $(FBSD) to the C Flags line. When I gmake I now get:
carso# gmake
gmake -s afkmud
Compiling o/websvr.o....
cc1: warnings being treated as errors
In file included from websvr.c:85:
/usr/include/arpa/inet.h:89: warning: parameter has incomplete type
/usr/include/arpa/inet.h:92: warning: parameter has incomplete type
/usr/include/arpa/inet.h:96: warning: parameter has incomplete type
gmake[1]: *** [o/websvr.o] Error 1
gmake: *** [all] Error 2
carso#

This is possibly a missing header, an incomplete type is usually where it has been implicitly declared (i.e. prototyped, but it actually doesn't really know anything about it) so it rekons that is a warning as in the final link it may find it.. as your warnings are treated as errors.. it stops.

My BSD background is rather weak so without knowing more specifics I'm afriad I can't help you much with this one..

If I comment out the WEB=1 it compiles until it gets to Calendar.c and I get:
Compiling o/calendar.o....
cc1: warnings being treated as errors
calendar.c: In function `c_time':
calendar.c:135: warning: pointer to a function used in arithmetic
calendar.c:135: warning: assignment makes integer from pointer without a cast
gmake[1]: *** [o/calendar.o] Error 1
gmake: *** [all] Error 2
carso#
Any ideas? Anyone!?


Hrm... I get an odd sense of Deja-vu with this one on these forums, but it may be what I just ate..

The ctime() func is supposed to take a time_t* usually, for some reason it's being handed a void*() which it believes is a function, I'm guessing here its trying to accept time(NULL) which returns the time_t, but its taking the address of the time() func as opposed to using the address of the returned value of time(NULL). Performing the assignment of the result first and using the address of the assigned to variable would be the way to do things...

But I still get the nagging feeling Samson already posted something similar about this prob relating to Cygwin which was to do with a header setting or something... I'm sure he'll comment when he gets time
       
Post is unread #7 May 24, 2003, 11:39 am
Go to the top of the page
Go to the bottom of the page

Guest - (Unregistered)

Remind me to check the ENTIRE new posts list before I start posting...

This refs to the virtually identicle thread here in the AFK Snippets/Coding section, when some Forum admin comes on, I think you'd be best off closing this one off and joining to the other one, as the arpa/inet.h prob doesn't exist anymore

Edit: Can't spell... "here" usually has an "h" in it... except from where I come from aparantly...
       
Post is unread #8 May 24, 2003, 5:40 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Keep in mind, he said c_time, which isn't the classic ctime(). It's something we got from Aurora. I combined her stuff with the timezone code from someone else and it's the timezone part that's causing problems. The same error comes up in Cygwin as well. I had to stuff an #ifdef to keep Cygwin from processing it, so I'm assuming that the same problem is hanging up FreeBSD. I haven't had an opportunity yet to retest things under FreeBSD.
       
Post is unread #9 May 25, 2003, 2:05 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Since this is an AFKMud related topic, and there exists a similar, if not identical thread in the AFKMud section, we'll be closing this one off
       
Pages:<< prev 1 next >>