| View previous topic :: View next topic |
| Author |
Message |
Retro Voice
Joined: 14 Oct 2006 Posts: 10 Location: Canada
|
Posted: Sat Oct 13, 2007 4:22 am Post subject: Invalid path for adding ssl patch to eggdrop1.6.18 |
|
|
Operating System: Linux 2.6.18-5-686 with Debian 40r-i386
I am working with a new eggdrop1.6.18 directory and a new copy of the ssl patch
patch -p0 < eggdrop-1.6.18-ssl.patch <-- no errors
./configure --with-ssl=/usr/local/ssl <-- no errors
checking whether to include SSL support... yes
orion@orion2:~/eggdrop1.6.18$ make config
Checking for removed modules.................... done.
Detecting modules.................... done.
Calculating dependencies.................. done.
Building ./src/mod/Makefile... done.
make[1]: Entering directory `/home/orion/eggdrop1.6.18/src/mod'
Configuring module 'dns'.
configure: loading cache ../../../config.cache
checking for gcc... (cached) gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... (cached) o
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking for res_init... (cached) no
checking for res_init in -lresolv... (cached) no
checking for res_init in -lbind... (cached) no
checking for __res_init... (cached) yes
checking for res_mkquery... (cached) no
checking for res_mkquery in -lresolv... (cached) yes
checking build system type... (cached) i686-pc-linux-gnu
checking host system type... (cached) i686-pc-linux-gnu
configure: creating ./config.status
config.status: creating Makefile
make[1]: Leaving directory `/home/orion/eggdrop1.6.18/src/mod'
Building ./src/mod/Makefile... done.
You can now compile the bot, using "make".
----------------
make
orion@orion2:~/eggdrop1.6.18$ make
make[1]: Entering directory `/home/orion/eggdrop1.6.18/src'
This may take a while. Go get some runts.
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H -c bg.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H -c botcmd.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H -c botmsg.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H -c botnet.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H -c chanprog.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H -c cmds.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H -c dcc.c
dcc.c:38:25: error: openssl/md5.h: No such file or directory
dcc.c: In function âdcc_bot_digestâ:
dcc.c:302: error: âMD5_CTXâ undeclared (first use in this function)
dcc.c:302: error: (Each undeclared identifier is reported only once
dcc.c:302: error: for each function it appears in.)
dcc.c:302: error: expected â;â before âmd5contextâ
dcc.c:307: warning: implicit declaration of function âMD5_Initâ
dcc.c:307: error: âmd5contextâ undeclared (first use in this function)
dcc.c:308: warning: implicit declaration of function âMD5_Updateâ
dcc.c:310: warning: implicit declaration of function âMD5_Finalâ
dcc.c: In function âdcc_bot_check_digestâ:
dcc.c:508: error: âMD5_CTXâ undeclared (first use in this function)
dcc.c:508: error: expected â;â before âmd5contextâ
dcc.c:517: error: âmd5contextâ undeclared (first use in this function)
make[1]: *** [dcc.o] Error 1
make[1]: Leaving directory `/home/orion/eggdrop1.6.18/src'
make: *** [modegg] Error 2
orion@orion2:~/eggdrop1.6.18$
------------------------
Ok now when I check dcc.c it has this include:
/* Includes for botnet md5 challenge/response code <cybah> */
#ifndef EGG_SSL_EXT
#include "md5/md5.h"
#else
#include "openssl/md5.h"
#endif
It isn't going to find it there as the path is /include/openssl/md5.h from /usr/local/ssl
---------------
When I look at the patch itself - it appears to have the append for the include & lib directories. But that doesn't appear to be happening.
test -f $withval/include/openssl/ssl.h && SSL_INCLUDE="$withval/include"
test -f $withval/lib/libssl.a && SSL_LIB="$withval/lib"
test -f $withval/lib/libcrypto.a && CRYPTO_LIB="$withval/lib"
How do I fix this?
Retro
Wishing she'd taken programming lessons |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Sat Oct 13, 2007 5:12 am Post subject: |
|
|
You have a couple of choices.. You can edit the dcc.c file to point to the full path/filename like:
#include "usr/local/ssl/openssl/md5.h"
prolly the simpler method..
Or, set the configure environment variables relevant to compiling with ssl, something like:
export C_FLAGS="$C_FLAGS -I/usr/local/ssl/openssl"
export CC_FLAGS="$CC_FLAGS -I/usr/local/ssl/openssl"
export LD_FLAGS="$LD_FLAGS -L/usr/local/ssl/openssl/lib"
then run configure again. Check configure --help for the optional environment variables that you can specify. I assumed above that your ssl files are in /usr/local/ssl/openssl, change it to point to the right place on your system. |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Sat Oct 13, 2007 11:00 am Post subject: |
|
|
Keep in mind that md5 can be found at /usr/local/include/openssl/md5.h on some systems.
You are better off using the following to find it:
| Code: | | find /usr/local -name md5.h |
|
|
| Back to top |
|
 |
Retro Voice
Joined: 14 Oct 2006 Posts: 10 Location: Canada
|
Posted: Sun Oct 14, 2007 12:03 pm Post subject: |
|
|
It is at /usr/local/ssl/include/openssl/md5.h
Other files apparently being looked for are :
/usr/local/ssl/include/openssl/ssl.h
/usr/local/ssl/include/openssl/err.h
/usr/local/ssl/include/openssl/rand.h
The following reference these in one form or another:
configure -for ac_header in "openssl/ssl.h"
This looks right in config.status
s,@SSL_LIBS@,-lssl -lcrypto -L/usr/local/ssl/lib -L/usr/local/ssl/lib,;t t
s,@SSL_INCLUDE@,/usr/local/ssl/include,;t t
This looks right in config.lob
SSL_INCLUDE='/usr/local/ssl/include'
SSL_LIBS='-lssl -lcrypto -L/usr/local/ssl/lib -L/usr/local/ssl/lib'
/src/tclmisc.c - include "openssl/md5.h"
/src/net.h - include "openssl/ssl.h"; include "openssl/err.h"; include "openssl/rand.h"
/src/net.c - include "openssl/ssl.h"; include "openssl/err.h"; include "openssl/rand.h"
/src/modules.c - include "openssl/md5.h"
Makefile looks correct:
XSSL_LIBS = -lssl -lcrypto -L/usr/local/ssl/lib -L/usr/local/ssl/lib
XSSL_INCLUDE = /usr/local/ssl/include
/src/dcc.c - include "openssl/md5.h"
/src/md5/md5c.c - include "openssl/md5.h" <-- no md5c.c in that directory but is in /src/md5
Interesting enough, the Ircd compiles with no issues.
I tried altering the path in dcc.c to both include/openssl/md5.h & usr/local/ssl/include/openssl/md5.h - both resulted in directory or file not found error.
The exports have me stumped as to where to add and the proper syntax.
Retro |
|
| Back to top |
|
 |
Retro Voice
Joined: 14 Oct 2006 Posts: 10 Location: Canada
|
Posted: Sun Oct 14, 2007 12:21 pm Post subject: |
|
|
Tried adding md5c.c to /usr/local/ssl/include/openssl - with only the include for md5.h
Does it have to use md5.h from ssl?
I did go back and once again verify that it would compile without the ssl patch and that was successful.
Retro |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Sun Oct 14, 2007 1:47 pm Post subject: |
|
|
I forgot the leading / in my example above, should be:
#include "/usr/local/ssl/include/openssl/md5.h"
If you set the enviroment variables correctly to point to your include files you won't need to edit the .c files. |
|
| Back to top |
|
 |
Retro Voice
Joined: 14 Oct 2006 Posts: 10 Location: Canada
|
Posted: Sun Oct 14, 2007 10:44 pm Post subject: |
|
|
Problem appears to be in the openssl app itself - when a call is made to a module there, it in turn calls other modules and at that point loses itself.
Editing the modules in /usr/local/ssl/include/openssl and the ones in eggdrop which make the call to include the full path allows the compile to finish. Trying to sort out the linking now for /usr/local/ssl/lib.
Retro |
|
| Back to top |
|
 |
Retro Voice
Joined: 14 Oct 2006 Posts: 10 Location: Canada
|
Posted: Tue Oct 16, 2007 9:30 pm Post subject: |
|
|
I appreciate your effort to assist in getting this patch to work. If I go and manually edit the related files in the eggdrop and ssl directory, adding the full path, I can get it to compile. But that means having root access and the time to edit 70+ files. Which is fine on my test system, but the above isn't either practical or portable.
It isn't having any issues finding files in the eggdrop directories or system directories unrelated to the files in the ssl directory. Just everything in /usr/local/ssl such as /lib & /include/openssl
I apologize for my lack of knowledge in this. I understand pathing. But a programmer I am not. Adding exports so a program knows the paths to look in is beyond me as I've no clue which files to add to, where in the files they would be added, and what if anything would need to be excluded. I'm totally lost in that regard.
Retro |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Oct 16, 2007 10:04 pm Post subject: |
|
|
As a bit of curiosity on my part, by any chance did you install eggdrop from the Debian repository? _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
Retro Voice
Joined: 14 Oct 2006 Posts: 10 Location: Canada
|
Posted: Wed Oct 17, 2007 1:11 am Post subject: |
|
|
No, I downloaded it and the patch from Eggdrop files here. My openssl is from openssl.org. We weren't able to compile our Ircd with the openssl in the Debian repository.
Retro |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Wed Oct 17, 2007 3:11 am Post subject: |
|
|
| Retro wrote: | No, I downloaded it and the patch from Eggdrop files here. My openssl is from openssl.org. We weren't able to compile our Ircd with the openssl in the Debian repository.
Retro |
Okies! You just blew a theory of mine.  _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
Retro Voice
Joined: 14 Oct 2006 Posts: 10 Location: Canada
|
Posted: Thu Oct 18, 2007 1:09 am Post subject: |
|
|
Found it.
It was the openssl install, which apparently needs to be installed twice, once for the static libraries, and once to get the shared ones. Followed by copying the include files to a number of locations. Worked for both the eggdrop and the ircd compiles.
Thank you Alchera, your question nudged a memory on adding path exports to the user's bash.profile.
Retro |
|
| Back to top |
|
 |
mikeyakame Voice
Joined: 11 Dec 2007 Posts: 1
|
Posted: Tue Dec 11, 2007 4:34 am Post subject: |
|
|
ive actually got a different approach which also works, patch, run configure, then edit Makefile.
find the line
XSSL_INCLUDE = /usr/local/ssl/include
change it to
XSSL_INCLUDE = -I/usr/local/ssl/include
damn patch doesn't patch the configure or makefile correctly.
then furthermore if you have the openssl/md5.h error, simply.
find / -name md5.h
it'll probably reside in /usr/local/ssl/include/openssl/md5.h or /usr/include/openssl/md5.h
anywho in your eggdrop source dir just do
cp -R /path/to/openssl openssl
problem solved, and requires no code modifications
hope this helps someone. |
|
| Back to top |
|
 |
Retro Voice
Joined: 14 Oct 2006 Posts: 10 Location: Canada
|
Posted: Tue Dec 11, 2007 10:18 pm Post subject: |
|
|
Thanks mikeyakame,
Every bit helps, especially to those of us that fumble our way through. And I admit to a whole lot of fumbling with this one.
Retro |
|
| Back to top |
|
 |
|