Cygwin Crypt Errors - Revisited

Posted by Seifz on Thu 19 Feb 2004 08:00 AM — 6 posts, 21,105 views.

#0
Yes, I know that many people have posted similar topics... I have tried searching for an answer to my problem but I cannot find one. Anyways, I'm using Cygwin 3.3.1 and WinXP Pro SP1, if that matters.

When I try to compile SMAUG 1.4a w/ MXP, I don't have any problems. But when I try to compile SMAUG 1.4a, I get those annoying _crypt errors. So, I tried using the Makefile.Cygwin (renamed to Makefile, of course) that's packaged with the MXP version and I still get these errors. I also tried to add the following to act_info.c to see if it would fix the problem for that file:

#if defined(__CYGWIN__)
#include <crypt.h>
#endif

but it did not work. Crypt.h is in my include directory. Are there other files that I might be missing? I tried to download everything that had 'crypt' or 'devel' in the name/description.

Thanks in advance,
Seifz
Australia Forum Administrator #1
This is a link error, not a compile one?

Try removing all .o files and then compiling again. Changing the makefile alone won't help if you don't recompile everything.
#2
Yeah, still no go. I checked the Cygwin installer and I definitely have the Crypt library. Are there any other changes I need to make to the source? I'm not sure if you changed something in the MXP version that I'm not seeing.

Thanks again,
Seifz
Australia Forum Administrator #3
I suggest getting the file smaug14afuss.tgz from the Downloads area. This is the Fixed Up Smaug Source. Using that, and fixing the Makefile for Cygwin:

#Uncomment to compile in Cygwin
#CYGWIN = -DCYGWIN

(remove the # in bold)

It then compiled without any errors.
#4
The problem with FUSS SMAUG is that is changes some things I'd like to leave unchanged... Plus, I don't like the new colour module. Thanks for the suggestion, though. :)

Now, after playing with some things, I did get rid of the _crypt error in act_info.c in do_password. It was rather simple... I added a "#define NOCRYPT" to mud.h outside of the Win32 ifdef and then added the following to mud.h in the OS-dependant variables section:

#if defined(__CYGWIN__)
char * crypt args( ( const char *key, const char *salt ) );
#endif

I still get the other _crypt errors, though, and I can't see why. The next one on the list appears in act_wiz.c in do_form_password... Strange, because that file wasn't changed at all in the MXP version.

I'll keep working on it and if I get it running, I'll let you know.

Thanks again,
Seifz
#5
D'oh, silly mistake. I forgot to delete the other .o files before I did another make. Everything's working perfectly now. Thanks for your help. :)

-Seifz

PS: It would be great if you could add that small bit to your walkthrough on compiling and making changes to SMAUG even though it's not the MXP version. I know that quite a few people have mentioned similar errors already. I fixed the re_exec problem as well, though I don't remember how. If I do remember, I'll post that here.