The Dawn Of Time
The Official Forums for the Dawn Of Time Mud Codebase
 
Log in Register FAQ Memberlist Search The Dawn Of Time Forum Index Goto the Official Dawn Website

Error compiling stock codebase

 
Post new topic   Reply to topic    The Dawn Of Time Forum Index » Getting Started
View previous topic :: View next topic  
Author Message
Dandini8497



Joined: 23 Dec 2012
Posts: 4

PostPosted: Sun Dec 23, 2012 2:43 pm    Post subject: Error compiling stock codebase Reply with quote

I am getting the following when trying to do the make.

Code:

obj/connect.o: In function 'connection_data::write(char const*, int)':
/home/dan/dot/src/connect.cpp:113: undefined reference to 'deflate'
/home/dan/dot/src/connect.cpp:115: undefined reference to 'deflate'
obj/connect.o: In function 'connection_data::continue_compression()':
/home/dan/dot/src/connect.cpp:918: undefined reference to 'deflateInit_'
/home/dan/dot/src/connect.cpp:931: undefined reference to 'deflate'
obj/connect.o: In function 'connection_data::begin_compression()':
/home/dan/dot/src/connect.cpp:971: undefined reference to 'deflateInit_'
obj/connect.o: In function 'connection_data::end_compression()':
/home/dan/dot/src/connect.cpp:1022: undefined reference to 'deflate'
/home/dan/dot/src/connect.cpp:1028: undefined reference to 'deflateEnd'
collect2: ld returned 1 exit status
make: *** [dawn] Error 1


What do I have to do to get this to compile?

NOTE: I am running the MUD on my own private server thats in my basement. I did not have this issue on ubuntu server 10.04, this is new now that on 12.04.

Therefore, it is possible its a server issue, maybe missing a requisite package or something?


Back to top
View user's profile Send private message
derek



Joined: 23 Sep 2007
Posts: 125

PostPosted: Thu Dec 27, 2012 8:13 am    Post subject: Reply with quote

The culprit is likely a new, stricter version of gcc. Which version have you got installed over there?


Back to top
View user's profile Send private message
Dandini8497



Joined: 23 Dec 2012
Posts: 4

PostPosted: Thu Dec 27, 2012 9:09 am    Post subject: Reply with quote

derek wrote:
The culprit is likely a new, stricter version of gcc. Which version have you got installed over there?


The newest one, I know that much cuz update doesn't change it. I can't recall how to check current version but I will find out and let u know.


Back to top
View user's profile Send private message
derek



Joined: 23 Sep 2007
Posts: 125

PostPosted: Thu Dec 27, 2012 9:51 am    Post subject: Reply with quote

'gcc -v' will tell you which version you've got. It's probably 4.6.

If so, you might try installing an earlier version of it. 'apt-cache search gcc' should give you a list of the versions available to you in the repos. I think you've probably got 4.4 through 4.6 available to you.

Whatever your options are, if you install out of the repos, it will allow you to install those different versions in parallel. You'll then need to change your makefile.in or some other configure file (not sure how dawn is set up off the top of my head) to point to gcc-4.4 or whichever you choose to try.

If you've got 4.2 available to you, I'd try that one. Pretty sure that should work, not sure about any releases newer than that, so there will be a bit of trial and error involved.

And bear in mind this isn't so much of a fix as a workaround.


Back to top
View user's profile Send private message
Dandini8497



Joined: 23 Dec 2012
Posts: 4

PostPosted: Thu Dec 27, 2012 10:06 am    Post subject: Reply with quote

Sounds simple enough, I'll give that a try when I can. One of my builders is actively working and don't want to interrupt him to reboot server. (Ubuntu 10.04 on one partition, 12.04 on another lol)


Back to top
View user's profile Send private message
derek



Joined: 23 Sep 2007
Posts: 125

PostPosted: Thu Dec 27, 2012 10:12 am    Post subject: Reply with quote

nod. I recently put the version of mint based on 12.04 on one of our computers. I'll try to make some time this evening to fool with it and see if I can figure out what the easiest way to handle it is.


Back to top
View user's profile Send private message
derek



Joined: 23 Sep 2007
Posts: 125

PostPosted: Sun Dec 30, 2012 11:46 pm    Post subject: Reply with quote

I just installed ubuntu 12.04 on a new vps tonight and compiled 1.69Sbeta6 while I was at it. It compiled (complained on a few things, but no errors reported for connect.cpp) so you've got an issue elsewhere, I think.

If you've done any work in connect.cpp, double check and make sure you aren't missing some brackets or a semicolon somewhere.

--edit: did you install build-essential or did you install gcc, etc. individually? you might be missing a library or something, as well. if you did it manually, apt-get install build-essential and see if that doesn't solve your problem.


Back to top
View user's profile Send private message
Kalahn
Codebase Developer


Joined: 18 Jan 2003
Posts: 710
Location: New Zealand

PostPosted: Mon Dec 31, 2012 12:16 am    Post subject: Reply with quote

deflate relates to mud compression protocol - do you have zlib present?
Did you run the configure script?
You could rerunning it, alternatively disable mccp by defining DISABLE_MCCP somewhere... e.g. edit params.h and add "#define DISABLE_MCCP 1" on a blank line.

make clean
then make

- Kal



_________________
Kalahn
Developer of the Dawn of Time Codebase
http://www.dawnoftime.org/
Back to top
View user's profile Send private message Visit poster's website
superk



Joined: 19 Feb 2014
Posts: 3
Location: United States

PostPosted: Wed Feb 19, 2014 5:18 pm    Post subject: Reply with quote

The answer here is that for some reason GCC 4.x (on Ubuntu at least) expects the -lz flag to be declared at the end. So changing the makefile slightly solves the problem..

Line 40, from
Quote:
$(addprefix $(OBJDIR)/,$(O_FILES)) $(OBJDIR)/com_time.o

to
Quote:
$(addprefix $(OBJDIR)/,$(O_FILES)) $(OBJDIR)/com_time.o $(LIBS)


ps: I just made a separate posting documenting the changes I had to make to get DOT compiling on 12.04


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The Dawn Of Time Forum Index » Getting Started All times are GMT + 13 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2005 phpBB Group
Theme created by Vjacheslav Trushkin