The Eggdrop FAQ
Compiling the Bot

What do I need to apply a .patch file to the eggdrop's source?

You need to make sure you have the 'patch' utility, and that it is at least version 2.1. Type:

  patch -v 

to find this out. If you don't see the output of a version number, you probably have the wrong file. Take a look here and see if you find a proper 'patch' for your system.

Where do I find the latest eggdrop patches?

How do I apply a patch to my source?

Make sure that you are applying the patch file to the correct version of eggdrop.

  1. gzip -d the .patch file, if it ends with .gz
  2. enter your eggdrop's source root directory
  3. apply the patch with: patch -p1 < eggdrop1.3.xx+demo.patch
  4. find things that might have gone wrong:
    find . -name "*.rej" -print

If the patch utility asked you about "What file to patch", then you probably do not have the correct version of the patch utility. If you do, then it also may be that you are trying to apply the patch file to an incorrect version of eggdrop. Make sure the eggdrop source you have match the version of the patch file you are trying to apply.

What kind of shell am I using anyway?
For some things you do on your shell account you need to know what kind of shell you are using. The easiest way is to type:
echo $SHELL

If this do not work, use ps and see what processes are running. Find the one that starts with a dash '-', this is probably your login shell.

This shell can be: sh, bash, ksh, csh or tcsh (or others...).

How can I find TCL on my system?

To compile the bot you need the TCL libraries and header somewhere on your system. The ./configure script will try to find them for you. If this fails, you might try to search them on your own.

The library is called or libtclX.X.a. The "X.X" will be the version of the library. The extension '.so' means it is a "dynamically loadable lybrary" and the '.a' mean it will be "statically linked".

You can try to find it using: find /usr -name "libtcl*" -print This can take a HUGE amount of time. Do the same to find the header file: find /usr -name "tcl.h" -print

Once you've found them, you must tell the ./configure script where they are. This should be done setting the TCLLIB and TCLINC variables. Do this:

On sh/bash/ksh shells:

  export TCLLIB TCLINC              

On csh/tcsh shells:

  setenv TCLLIB /directory/of/the/library  
  setenv TCLINC /directory/of/the/header   

Next use ./configure again, and it should locate the files in the directories you specified.

Where do I find the TCL sources and what version should I take?

If your machine does not have TCL installed, you should get the sources and compile them by your own.

TCL 7.6p2

TCL 8.0p2

I would recommend you to use TCL 7.6, which has the most needed features you might want, and is stable enough not to compromise your bots functionality.

How do I compile my own TCL?

You can compile TCL 7.6 on your HOME directory, if you have the space for it. Or compile in /tmp, there you should have plenty of space. Do it like this:

  % mkdir /tmp/tcl          
  % cd /tmp/tcl             
  % ftp   
  Login: ftp                
  Password: your@email      
  ftp> cd /pub/tcl/tcl7_6   
  ftp> bin                  
  ftp> get tcl7.6p2.tar.gz  

..wait for the file to arrive. Then:

  % gzip -dc tcl7.6p2.tar.gz | tar xvf -                                   
  % cd tcl7.6/unix                                                         
  % ./configure --prefix=/tmp/tcl --exec-prefix=/tmp/tcl --disable-shared  

..wait for configure to run through... Then:

  % make            (and wait...)       
  % make install    (and wait more...)  

So now you have the TCL libraries in /tmp/tcl. Now tell eggdrop where to find it, by setting the environment:

On bash/sh/ksh shells:

  % TCLINC=/tmp/tcl/include  
  % TCLLIB=/tmp/tcl/lib      
  % export TCLINC TCLLIB     

On csh/tcsh shells:

  % setenv TCLINC /tmp/tcl/include  
  % setenv TCLLIB /tmp/tcl/lib      

After setting this, just run eggdrops ./configure script and make sure it detects the TCL version 7.6. If it does (and it should, if you followed all the steps carefully), you can compile the bot as usual, and it will include the TCL 7.6 libraries. After the bot is compiled, you can delete everything in /tmp/tcl, since it will already be included in your bot. Or leave it there, if your provider don't delete it you will be able to compile future bots using it, too. If you have space you could have done the whole /tmp thing somewhere in your $HOME directory.

© 1998-2000 by Ernst