This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Problems compiling Eggdrop using Cygwin (OpenSSL problem)

Discussion of Eggdrop's code and module programming in C.
Post Reply
Y
Yutani
Voice
Posts: 6
Joined: Wed Mar 18, 2009 5:04 pm

Problems compiling Eggdrop using Cygwin (OpenSSL problem)

Post by Yutani »

Hey everyone,

I'm currently trying to compile Eggdrop 1.6.19 (not ctcpfix, the older one) with tcl 8.5.7 and ssl support.

The ssl patch is called eggdrop-1.6.19-ssl_and_md5_and_thread-durex-patch and everything went fine patching.

However when I try to configure doing: ./configure --enable-strip it's giving back this error:

Code: Select all

configure: WARNING: openssl/ssl.h: present but cannot be compiled
configure: WARNING: openssl/ssl.h:     check for missing prerequisite headers?
configure: WARNING: openssl/ssl.h: see the Autoconf documentation
configure: WARNING: openssl/ssl.h:     section "Present But Cannot Be Compiled"
configure: WARNING: openssl/ssl.h: proceeding with the preprocessor's result
configure: WARNING: openssl/ssl.h: in the future, the compiler will take precede
nce
configure: WARNING:     ## -------------------------------- ##
configure: WARNING:     ## Report this to bugs@eggheads.org ##
configure: WARNING:     ## -------------------------------- ##
Tried to compile eggdrop without the ssl patch and everything worked fine so it has to be the patch.

Could someone please help me out and give me a few tips I can try out to get this working?

Your help would me much appriciated!

Thanks,
Erik
Y
Yutani
Voice
Posts: 6
Joined: Wed Mar 18, 2009 5:04 pm

Post by Yutani »

Got rid of the error with ./configure --with-ssl but gives an error later on in sha.h.

Error:

Code: Select all

$ make eggdrop
make[1]: Entering directory `/eggdrop1.6.19/src'

This may take a while. Go get some runts.

gcc -pipe -mwin32 -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c bg.c
gcc -pipe -mwin32 -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c botcmd.c
gcc -pipe -mwin32 -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c botmsg.c
gcc -pipe -mwin32 -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c botnet.c
gcc -pipe -mwin32 -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c chanprog.c
chanprog.c: In function `isowner':
chanprog.c:682: warning: subscript has type `char'
chanprog.c:682: warning: subscript has type `char'
gcc -pipe -mwin32 -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c cmds.c
cmds.c: In function `stripmodes':
cmds.c:1930: warning: subscript has type `char'
cmds.c: In function `cmd_pls_ignore':
cmds.c:2363: warning: subscript has type `char'
gcc -pipe -mwin32 -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c dcc.c
gcc -pipe -mwin32 -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c dccutil.c
In file included from /usr/include/openssl/x509.h:107,
                 from /usr/include/openssl/ssl.h:183,
                 from net.h:5,
                 from dccutil.c:36:
/usr/include/openssl/sha.h:177: error: parse error before "h"
/usr/include/openssl/sha.h:178: error: parse error before "Nl"
/usr/include/openssl/sha.h:180: error: parse error before "d"
/usr/include/openssl/sha.h:182: error: parse error before '}' token
/usr/include/openssl/sha.h:184: error: parse error before '}' token
/usr/include/openssl/sha.h:188: error: parse error before '*' token
/usr/include/openssl/sha.h:189: error: parse error before '*' token
/usr/include/openssl/sha.h:190: error: parse error before "SHA512_CTX"
/usr/include/openssl/sha.h:192: error: parse error before '*' token
/usr/include/openssl/sha.h:193: error: parse error before '*' token
/usr/include/openssl/sha.h:194: error: parse error before "SHA512_CTX"
/usr/include/openssl/sha.h:196: error: parse error before '*' token
make[1]: *** [dccutil.o] Error 1
make[1]: Leaving directory `/eggdrop1.6.19/src'
make: *** [modegg] Error 2
I've commented the code and now it seems to compile.

Code: Select all

#define SHA384_DIGEST_LENGTH	48
#define SHA512_DIGEST_LENGTH	64

#ifndef OPENSSL_NO_SHA512
/*
 * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64
 * being exactly 64-bit wide. See Implementation Notes in sha512.c
 * for further details.
 */
#define SHA512_CBLOCK	(SHA_LBLOCK*8)	/* SHA-512 treats input data as a
					 * contiguous array of 64 bit
					 * wide big-endian values. */
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
#define SHA_LONG64 unsigned __int64
#define U64(C)     C##UI64
#elif defined(__arch64__)
#define SHA_LONG64 unsigned long
#define U64(C)     C##UL
#else
#define SHA_LONG64 unsigned long long
#define U64(C)     C##ULL
#endif

/*
typedef struct SHA512state_st
	{
	SHA_LONG64 h[8];
	SHA_LONG64 Nl,Nh;
	union {
		SHA_LONG64	d[SHA_LBLOCK];
		unsigned char	p[SHA512_CBLOCK];
	} u;
	unsigned int num,md_len;
	} SHA512_CTX;
*/
#endif

/*
#ifndef OPENSSL_NO_SHA512
int SHA384_Init(SHA512_CTX *c);
int SHA384_Update(SHA512_CTX *c, const void *data, size_t len);
int SHA384_Final(unsigned char *md, SHA512_CTX *c);
unsigned char *SHA384(const unsigned char *d, size_t n,unsigned char *md);
int SHA512_Init(SHA512_CTX *c);
int SHA512_Update(SHA512_CTX *c, const void *data, size_t len);
int SHA512_Final(unsigned char *md, SHA512_CTX *c);
unsigned char *SHA512(const unsigned char *d, size_t n,unsigned char *md);
void SHA512_Transform(SHA512_CTX *c, const unsigned char *data);
#endif
*/
After compile I try and connect to a server and it said: DNS Lookup Failed

So I guess its a piece of code the bot needs to connect.

What can I do?
Post Reply