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, Bing, Majestic-12, Yahoo!

Members: 0
Guests: 7
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » Coding » dbsc compile issue
Forum Rules | Mark all | Recent Posts

dbsc compile issue
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Sep 17, 2009, 8:42 pm
Go to the top of the page
Go to the bottom of the page

Chaumont
Fledgling
GroupMembers
Posts6
JoinedSep 17, 2009

I'm in the process of learning to code C/C++, and trying to get the db saga codebase
running so I can poke around and try to figure out what I can. I'm using cygwin to
try and set it up but I've run into this problem when I try to 'make'.

If I could copy and paste directly from cygwin I would, but this is the basic jist of
what I run into:

/home/username/dbsc/src/comm.c:1754: undefined reference to '_deflate'
comm.o: In Function 'compressStart' :
/home/username/dbsc/src/comm.c:5797: undefined reference to '_deflate_Init_'
comm.o: In Function 'compressEnd' :
/home/username/dbsc/src/comm.c:5832: undefined reference to '_deflate_Inti_'
/home/username/dbsc/src/comm.c:5838: undefined reference to '_deflateEnd'
collect2: ld returned 1 exit status
make[1]: *** [dbs] Error 1
make[1]: Leaving directory 'home/username/dbsc/src'
make[all] *** Error 2


I've already ran into a few problems compiling which I've managed to find solutions
to, but this one has me stumped and I can't find anything to clear things up.

I'm running cygwin 1.5.25 on Windows XP, and I have all the devel packages and
most of the libs. Like I said, I'm in the early learning phase of coding so if any
instruction could be given in baby steps, it would be greatly appreciated.
       
Post is unread #2 Sep 17, 2009, 9:13 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Make sure you have the zlib and zlib-devel packages installed, those undefined references are because it can't find the zlib stuff. You also need to be sure that -lz is added to the L_FLAGS line in your Makefile.
       
Post is unread #3 Sep 17, 2009, 9:45 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

This was crossposted to MudBytes; basically the same answer was given there.
       
Post is unread #4 Sep 17, 2009, 10:46 pm
Go to the top of the page
Go to the bottom of the page

Chaumont
Fledgling
GroupMembers
Posts6
JoinedSep 17, 2009

-lz is on the L_FLAGS, and I've installed all the zlib packages that came in the setup file
for cygwin. I've done the editing to the makefile that the readme instructs. Could there
be a simple step that I'm missing? I know a less-than-functional amount about Linux, so
all of my direction in cygwin is straight from forums and help files. I had problems with
the zlib.h until I reinstalled it with the proper packages. Now, it compiles
everything properly except for the comm.c file.

Is there a simple solution to this, or should I just wait till I'm a bit more experienced to
tackle this kind of practice?...Or does everyone start out this way?
       
Post is unread #5 Sep 18, 2009, 3:20 am
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

Well without getting into the fact that you can use mccp in cygwin just going by the Makefile itself
Makefile
change
#Uncomment if you wish to enable the Mud Client Compression Protocol
#Comment it out it if you are compiling with Cygwin
OPT_FLAG = -DMCCP

to
#Uncomment if you wish to enable the Mud Client Compression Protocol
#Comment it out it if you are compiling with Cygwin
#OPT_FLAG = -DMCCP

and it will compile (tested it on the DBSC 2.5.2 found here.

Don't currently have time to dig into why you must disable it for it to run in cygwin, but this will allow it to compile and all until you fix it to use mccp in cygwin.
       
Post is unread #6 Sep 18, 2009, 9:06 am
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

It seems that the issue was resolved on MudBytes.

Chaumont, when crossposting, it's generally polite to indicate as much, and if a solution is found on one of the places, to link there in the other threads so that it's clear that the problem was resolved (and so that people can find the solution).
       
Post is unread #7 Sep 18, 2009, 11:49 am
Go to the top of the page
Go to the bottom of the page

Chaumont
Fledgling
GroupMembers
Posts6
JoinedSep 17, 2009

I apologize. And thank you for indicating the crosspost for me, David. I'm not terribly familiar with forum etiquette, so constructive criticism is very welcome.
       
Post is unread #8 Sep 18, 2009, 12:08 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

No problem, we all start somewhere :smile:
It so happens actually that there's a fair bit of overlap in the people who post here and there; actually, MudBytes is probably a superset of the people here. Of course, some people pay far more attention to threads here, so it can be a good place to post as well.
       
Post is unread #9 Oct 19, 2010, 5:30 pm
Go to the top of the page
Go to the bottom of the page

emadel80
Fledgling
GroupMembers
Posts2
JoinedOct 19, 2010

Hello. I am a noob in MUD coding. I am gonna to start working with the codebase dbsc2.5.2. I would like to know which libraries from cygwin you need to install to have a clean build. Thank you.
       
Post is unread #10 Oct 21, 2010, 12:22 pm
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

       
Post is unread #11 Nov 13, 2010, 6:07 am
Go to the top of the page
Go to the bottom of the page

emadel80
Fledgling
GroupMembers
Posts2
JoinedOct 19, 2010

Hi everyone I am a noob about MUD coding. First time using cygwin and I am not sure how to copy and paste the compile issues, but it looks like almost all files of codebase returns the same warnings:

source_file: warning: subscript has type 'char'

Also, it produces an error at the end:

<PATH>/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make[1]: *** [dbs] Error 1
make: *** [all] Error 2

I installed cygwin with default packages and the ones written in the Windows Install.txt. Maybe I missed a package that I need. Any help and suggestions are welcome. Thank you for your help.


I
       
Pages:<< prev 1 next >>