Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ Dawn of Time ➜ Installing/compiling the server ➜ Here goes

Here goes

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


Posted by Viruz   (19 posts)  Bio
Date Tue 05 Feb 2002 01:37 AM (UTC)

Amended on Tue 05 Feb 2002 01:48 AM (UTC) by Viruz

Message
Well got this piece of what i would have thought would have been great code
trying to compile. did the config thing and all (not a complete idiot)

then


bash-2.05$ make
c++ -c -Wall -g -O  com_time.cpp -o obj/com_time.o
c++: com_time.cpp: No such file or directory
c++: No input files
*** Error code 1

Stop in /home/mud/dawn (line 44 of /home/mud/dawn/makefile).

bash-2.05$ ls -l com*
-rw-r--r--  1 mud  mud    2246 Dec 29 08:36 com_time.cpp
-rw-r--r--  1 mud  mud   16048 Dec 29 08:36 comedit.cpp
-rw-r--r--  1 mud  mud    1850 Dec 29 08:36 comedit.h
-rw-r--r--  1 mud  mud  114538 Dec 29 16:00 comm.cpp
-rw-r--r--  1 mud  mud   12029 Dec 29 08:36 comm.h
bash-2.05$


so I know I have the file

Looking in makefile



	dawn: $(sort $(O_FILES))
>>>> LINE 44>>>>       	$(CPP) -c $(C_FLAGS) com_time.cpp -o $(OBJDIR)/com_time.o
	        -rm -f ../dawn
	        $(CPP) $(L_FLAGS) $(LIBS) -o ../dawn \
	                $(addprefix $(OBJDIR)/,$(O_FILES)) $(OBJDIR)/com_time.o


the line looks ok to me
So i look at the bottom of the makefile and see a blurb about openbsd and using gmake,
which is what I use and honestly I think everyone should use :) (security is precious)

and I get this error


c++ -c -Wall -g -O  comm.cpp -o obj/comm.o
comm.cpp: In function `int main(int, char **)':
comm.cpp:613: implicit declaration of function `int closesocket(...)'
gmake: *** [comm.o] Error 1



So I compile it again so see if i get more errors using the ignore error option

bash# gmake -i
c++ -c -Wall -g -O  comm.cpp -o obj/comm.o
comm.cpp: In function `int main(int, char **)':
comm.cpp:613: implicit declaration of function `int closesocket(...)'
gmake: [comm.o] Error 1 (ignored)

******
more code going ok
******

descript.cpp: In method `void descriptor_data::dclose()':
descript.cpp:211: implicit declaration of function `int closesocket(...)'
gmake: [descript.o] Error 1 (ignored)

******
more code going ok
******

hreboot.cpp: In function `void hotreboot_game_environment_transfer()':
hreboot.cpp:528: implicit declaration of function `int closesocket(...)'
gmake: [hreboot.o] Error 1 (ignored)

******
more code going ok
******

save.cpp: In function `void fwrite_char(char_data *, FILE *)':
save.cpp:318: passing `long int *' as argument 1 of `ctime(const time_t *)'
save.cpp:436: warning: long int format, int arg (arg 3)
gmake: [save.o] Error 1 (ignored)



so the culprit is closesocket.



Well heres a little background
OpenBSD 3.0
tried both dawnsrc1.69o and dawnsrc1.69p
No problems compiling anything including smaug
tried the same code in cygwin (fresh install and freshly untarred code unix style) no luck in cygwin

I noticed in another post someone mentioned build 1.69q, haven't been able to find it



I probably won't get an answer but it's worth a try
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 06 Feb 2002 01:53 AM (UTC)
Message
You would have got different errors in Cygwin? I got it to compile after making a couple of changes, as documented in one of my recent posts.

Meanwhile, to compile under OpenBSD, which I have just done (dawnsrc1.69p) ...

1. Change makefile, line 7 to read:

C_FLAGS = -Wall $(PROF) $(NOCRYPT) -Dunix

This works around the closesocket problem by defining the "unix" define.

2. Change save.cpp, line 333, to read:

sprintf( time_buf,"%s", (char *) ctime((time_t *) &ch->id));

Basically this casts the ch->id to the correct type for ctime.

This should then compile and link (just type gmake) however I also get errors compiling the resolver which I haven't investigated yet. However I believe you can run without that. :)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Viruz   (19 posts)  Bio
Date Reply #2 on Wed 06 Feb 2002 08:16 AM (UTC)
Message
Nick I thank you for the reply. and will try that asap.

you are always on the ball. :)

Anyway is my understanding that resolver is just an ip to domain resolver of those connecting to you ?

if so is there just a simple way to just not have it at all compile(I hate seeing errors) since i really don't care either way if i see an ip or domain of those connected to me?
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #3 on Thu 07 Feb 2002 02:02 AM (UTC)
Message
Quote:

Anyway is my understanding that resolver is just an ip to domain resolver of those connecting to you ?


Yes, I believe so.

Quote:

if so is there just a simple way to just not have it at all compile


You may as well fix the actual error. :) I didn't have time to investigate yesterday, but it is related to the need for the "unix" define. Edit the file "makefile" and add the extra bit in bold at around lines 50 to 51.


../resolver: extras/resolver.cpp
    $(CPP) -o ../resolver  $(C_FLAGS) extras/resolver.cpp




- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


15,929 views.

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

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.