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, Yandex, Yahoo!

Members: 0
Guests: 5
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 » Compile errors
Forum Rules | Mark all | Recent Posts

Compile errors
< Newer Topic :: Older Topic > Using FreeBSD

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

Merlineous

GroupMembers
Posts7
JoinedMay 23, 2003

I am having a problem compiling on FreeBSD. I was originally getting this:
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#
I looked at the soruce and moved the #include from in the IFDEF FREEBSD loop to the top of the file. Now when I compile websvr.c compiles and I then get:
carso# gmake
gmake -s afkmud
Compiling o/act_comm.o....
In file included from act_comm.c:25:
mud.h:572: syntax error before `pid_t'
mud.h:577: syntax error before `pid_t'
gmake[1]: *** [o/act_comm.o] Error 1
gmake: *** [all] Error 2
If anybody knows how to make it compile under FreeBSD I would be most grateful for help
Richard
       
Post is unread #2 May 23, 2003, 10:19 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

It's in the docs, but here ya go:

There's a Makefile.FreeBSD in the SRC directory.

Type:
mv Makefile Makefile.Linux
mv Makefile.FreeBSD Makefile

Note - Do an ls Makefile* to make sure my cases are right with the filename.

Should have no issues then...

You may want to re-extract the source and compile from that since you made modifications.
       
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,639
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, 1:00 pm
Go to the top of the page
Go to the bottom of the page

Merlineous

GroupMembers
Posts7
JoinedMay 23, 2003

See my reply in the other area, I am using the Makefile with the Freebsd line uncommented.
       
Post is unread #5 May 23, 2003, 2:18 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 23, 2003, 2:25 pm
Go to the top of the page
Go to the bottom of the page

Merlineous

GroupMembers
Posts7
JoinedMay 23, 2003

Fixed the problem with the arpa/inet.h...With FreeBSD you need to include the netinet/in.h BEFORE you include arap/inet.h

The webserver bit now compiles ok, but I am still getting the c_time error. I am going to try to move the includes around there as well...

Merlineous
       
Post is unread #7 May 25, 2003, 1:36 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Ok, now that I've had the chance to get to a FreeBSD machine - the following was needed to gain a clean compile and link:

1. Added $(FBSD) to the C_FLAGS. Heh, oops :P Thanks Merlineous

2. In websvr.c, the #ifdef FREEBSD portion in the includes needed to be moved above the include for arpa/inet.h. Thanks again Merlineous :P

3. calendar.c, the timezone #ifndef for WINDOZE needed to be changed into an #ifdef LINUX instead. Until we know how to make that work properly.

4. resolver.c, the FREEBSD/WINDOZE block needed to be moved above the include for netinet/in.h

Once that's done the code compiles clean and launches without a problem. All of this will be updated for the next release, whenever ( or if ever ) it comes out.
       
Post is unread #8 May 31, 2003, 12:25 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Update to the above reply:

Just grab 1.52. The fixes have all been applied to that and are a part of the patch to go from 1.51a to 1.52 as well.
       
Pages:<< prev 1 next >>