Error while compiling smaug in Cygwin

Posted by Raeyu on Mon 31 Mar 2003 02:12 PM — 4 posts, 19,113 views.

#0
When I try to 'make' smaug in Cygwin, I keep getting the following:

Adam1@Adam ~/dist/src
$ make
make smaug
make[1]: Entering directory `/home/Adam1/dist/src'
rm -f smaug
gcc -o smaug act_comm.o act_info.o act_move.o act_obj.o act_wiz.o boards.o
build.o clans.o comm.o comments.o const.o db.o deity.o fight.o handler.o hashstr
.o ibuild.o ident.o interp.o magic.o makeobjs.o mapout.o misc.o mpxset.o mud_com
m.o mud_prog.o player.o polymorph.o requests.o reset.o save.o shops.o skills.o s
pecial.o tables.o track.o update.o grub.o stat_obj.o ban.o services.o planes.o i
mm_host.o colorize.o
act_comm.o(.text+0x88df): In function `is_profane':
/home/Adam1/dist/src/act_comm.c:3347: undefined reference to `_re_exec'
act_info.o(.text+0xb364): In function `do_password':
/home/Adam1/dist/src/act_info.c:3474: undefined reference to `_crypt'
act_wiz.o(.text+0x12416): In function `do_form_password':
/home/Adam1/dist/src/act_wiz.c:5441: undefined reference to `_crypt'
build.o(.text+0x67c7): In function `do_mset':
/home/Adam1/dist/src/build.c:1692: undefined reference to `_crypt'
comm.o(.text+0x3d38): In function `nanny':
/home/Adam1/dist/src/comm.c:1663: undefined reference to `_crypt'
comm.o(.text+0x4069):/home/Adam1/dist/src/comm.c:1750: undefined reference to `_
crypt'
comm.o(.text+0x4162):/home/Adam1/dist/src/comm.c:1771: more undefined references
to `_crypt' follow
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make[1]: Leaving directory `/home/Adam1/dist/src'
make: *** [all] Error 2

Adam1@Adam ~/dist/src
$

How do I make it actually work and to stop getting those errors?
USA #1
What I would suggest you do is to get this copy of SMAUG, which has all the bug fixes that have been reported to the SMAUG mailing list and from the SMAUG team. You can get it at www.mudplanet.org/files/smaug14aSam.tgz

I'd also suggest getting the crypt libraries for Cygwin. They will be needed to compile it. I don't know how old your copy is, so you should get the latest setup.exe from Cygwin.com.

If you still have problems post again and I'll see what I can do.
Australia Forum Administrator #2
Search this forum for "crypt" and "re_exec" - I am certain that this has been covered in some depth before.
USA #3
In the Makefile there is two lines that will help you. Uncomment the NEED_CRYPT and that should solve your problem.

[code]
#Uncomment the line below if you are getting undefined re_exec errors
NEED_REG = -lgnuregex

#Uncomment the line below if you are getting undefined crypt errors
#NEED_CRYPT = -lcrypt
[/code]