From owner-eggdrop@nando.sodrenet.com Fri May 31 15:05:27 1996
Return-Path: <owner-eggdrop@nando.sodrenet.com>
Received: from nando.sodrenet.com (majordom@sodrenet.com [204.253.7.66]) by mail6 (8.6.13/Netcom)
	id PAA09155; Fri, 31 May 1996 15:05:14 -0700
Received: (from majordom@localhost) by nando.sodrenet.com (8.7.1/8.7.1) id QAA07577 for eggdrop-outgoing; Fri, 31 May 1996 16:59:42 -0400
X-Authentication-Warning: nando.sodrenet.com: majordom set sender to owner-eggdrop using -f
Received: from osceola.gate.net (osceola.gate.net [199.227.0.18]) by nando.sodrenet.com (8.7.1/8.7.1) with ESMTP id QAA07571 for <eggdrop@sodrenet.com>; Fri, 31 May 1996 16:59:35 -0400
Received: from hopi.gate.net (cmwagner@hopi.gate.net [199.227.0.13]) by osceola.gate.net (8.7.5/8.7.3) with ESMTP id QAA57556 for <eggdrop@sodrenet.com>; Fri, 31 May 1996 16:55:30 -0400
From: Chad Wagner <cmwagner@gate.net>
Received: (from cmwagner@localhost) by hopi.gate.net (8.7.5/8.7.3) id QAA36114 for eggdrop@sodrenet.com; Fri, 31 May 1996 16:55:11 -0400
Message-Id: <199605312055.QAA36114@hopi.gate.net>
Subject: %Eggdrop eggdrop-compiling.faq
To: eggdrop@sodrenet.com
Date: Fri, 31 May 1996 16:55:11 -0400 (EDT)
X-Mailer: ELM [version 2.4 PL24]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: owner-eggdrop@sodrenet.com
Precedence: bulk
Reply-To: eggdrop@sodrenet.com
Status: RO

As a preface to this, I just want to say that I haven't come up with all
of these solutions, one I know for a fact is from this mailing list (don't
know the originator of it -- it is the net.o one), another is from the
eggdrop.doc (rephrased), and the others are solutions that I have come
up with for problems.  (TCL_DONT_WAIT was one that Robey recommend to
users using a 7.5 beta release of Tcl).  I will hopefully try to
give credit where credit is due, but essentially I have just claimed it
as contributors.  If anything is to be contributed I will place e-mail
addresses with it on future contributions.

---
EGGDROP AND TCL COMPILING ERRORS AND RESOLUTION FAQ
by Chad Wagner <cmwagner@gate.net> and contributors


1. UNDEFINED REFERENCES IN NET.O -- SunOS

   Undefined			first referenced
    symbol  			    in file
   socket                              net.o
   gethostbyname                       net.o
   accept                              net.o
   bind                                net.o
   setsockopt                          net.o
   gethostbyaddr                       net.o
   getsockname                         net.o
   gethostname                         net.o
   listen                              net.o
   connect                             net.o
   ld: fatal: Symbol referencing errors. No output written to eggdrop

This seems to be caused by a few libraries not being detected by the
auto-configure program, it is relatively easy to fix.  Edit your Makefile,
note that yours may be slightly different than this one when it comes to
the tcl library, but here is the way it probably is:

GMAKE = ${MAKE} 'CC=gcc' 'AWK=awk' 'OBJS=${OBJS}' 'TCLLIBFN=tcl.a'\
        'CFLAGS=${CFLAGS}' 'XREQ=${XREQ}' 'XLIBS= -L/usr/local/lib -ltcl -lm'\
        'TCLLIB=${TCLLIB}' 'RANLIB=:' 'STRIP='

And here is what you need to change:

GMAKE = ${MAKE} 'CC=gcc' 'AWK=awk' 'OBJS=${OBJS}' 'TCLLIBFN=tcl.a'\
        'CFLAGS=${CFLAGS}' 'XREQ=${XREQ}' 'XLIBS=-lsocket -ldl -lnsl -L/usr/local/lib -ltcl -lm'\
        'TCLLIB=${TCLLIB}' 'RANLIB=:' 'STRIP='

You are adding in three libraries to be linked in, socket, dl, and nsl.  This
will resolve the net.o errors.


2. COMPILE STOPS AT THE LAST MINUTE WITH "LD FATAL SIGNAL 11"! -- Linux

This seems to be caused by a non-ELF Tcl library binary, and the compiler
doesn't seem to like it.  The first thing you want to do is download and
compile tcl yourself.  And then follow this set of commands to help you
reconfigure eggdrop using the newly compiled Tcl library (all of this
should be done from your home directory):

cd
mkdir lib
mkdir include
find . -name libtcl*

The output from the find command should give you the location of the library,
take the output of that and do the next command with the output of find 
replacing $$find$$:

mv $$find$$ lib/libtcl.a

Now we continue with another find to help us locate tcl.h:

find . -name tcl.h

The output from the find command should give you the location of the header
file, take the output of that and do the next command with the output of
find replacing $$find$$:

mv $$find$$ include

Hopefully you know what shell you are using and can pick out which commands
to use, if the first two setenv commands give command not found then use
the next two, if not then don't use the next two.  First set are for csh/tcsh
users, following set is for bash/ksh users.

csh/tcsh:
setenv TCLLIB '$HOME/lib'
setenv TCLINC '$HOME/include'

bash/ksh:
export TCLLIB='$HOME/lib'
export TCLINC='$HOME/include'

And then finally run configure again for eggdrop and then make, and hopefully
it will work.


3. LD: -ltcl7.4: EXPECTED LIBX.SO(.MAJOR.MINOR.XXX)

   ld: -ltcl7.4: expected libx.so(.major.minor.xxx)
   collect2: ld returned 4 exit status
   *** Error code 1
   make: Fatal error: Command failed for target `eggdrop'


On some Unix boxes this seems to be caused by the linker, it is expecting
a specific filename format and when it doesn't live up to it's expectations
it usually barfs.  I always see this caused by when the library for Tcl is
called libtcl7.4.a or libtcl7.5.a, rename it to simply libtcl.a if you
installed Tcl yourself, if you didn't and your using the Tcl that the
system installed then do this:

View your Makefile, look for the line (should be close to the top) that says

XREQ = /usr/local/lib/libtcl7.4.a

And remember that FULL pathname.  Go to your home directory, and do the
following:

mkdir lib
cd lib
ln -s $$xreq$$ libtcl.a

Replace $$xreq$$ with the full pathname from the XREQ line from the Makefile.

And finally the next thing you want to do depending on what shell your
using is: (try the first one, if it gives bad command then use the second)

csh/tcsh:
setenv TCLLIB '$HOME/lib'

bash/ksh:
export TCLLIB='$HOME/lib'

Did I say finally?  Heh, finally run configure and then make again.


4. 'TCL_DONT_WAIT' UNDECLARED IN MAIN.C

   main.c: In function `main':main.c:864: `TCL_DONT_WAIT' undeclared (first use this function)
   main.c:864: (Each undeclared identifier is reported only once
   main.c:864: for each function it appears in.)
   make[1]: *** [main.o] Error 1


This seems to be caused by a beta release of Tcl 7.5 on eggdrop 1.0a and
later bots, the solution is relatively simple.  Edit your eggdrop.h file
and add in a line at the end or the beginning, or somewhere (preferrably
near other #define's and #undef's) in eggdrop.h that isn't in the middle
of a comment or struct:

#undef MODERN_TCL


5. STRIP TERMINATED WITH SIGNAL 6

   collect2: strip terminated with signal 6 [IOT/Abort trap]
   *** Exit 1
   Stop.
   *** Exit 1
   Stop.

I don't really know what the hell is causing this, but I find that if you
don't strip the binary you cut out the problem (obviously), edit your
Makefile and change this line from:

GMAKE = ${MAKE} 'CC=gcc' 'AWK=awk' 'OBJS=${OBJS}' 'TCLLIBFN=tcl.a'\
        'CFLAGS=${CFLAGS}' 'XREQ=${XREQ}' 'XLIBS= -L/usr/local/lib -ltcl -lm' \
        'TCLLIB=${TCLLIB}' 'RANLIB=ranlib' 'STRIP=-s'

To this line below:  (your lines may differ, but what you are doing is
changing 'STRIP=-s' to 'STRIP=')

GMAKE = ${MAKE} 'CC=gcc' 'AWK=awk' 'OBJS=${OBJS}' 'TCLLIBFN=tcl.a'\
        'CFLAGS=${CFLAGS}' 'XREQ=${XREQ}' 'XLIBS= -L/usr/local/lib -ltcl -lm' \
        'TCLLIB=${TCLLIB}' 'RANLIB=ranlib' 'STRIP='


-- 
Chad Wagner                                                  cmwagner@gate.net
cmwagner@sodrenet.com                                      cmwagner@eskimo.com

