/[cvs]/eggdrop1.7/doc/COMPILE-GUIDE
ViewVC logotype

Contents of /eggdrop1.7/doc/COMPILE-GUIDE

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download)
Mon Nov 20 13:53:24 2006 UTC (12 years, 5 months ago) by tothwolf
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
* Updated copyright dates for 2006 (better late than never).

1 $Id: COMPILE-GUIDE,v 1.3 2005/01/21 01:43:37 wcc Exp $
2
3 Eggdrop Compile Guide and FAQ
4 Last revised: August 20, 2004
5 _____________________________________________________________________
6
7 Eggdrop Compile Guide and FAQ
8
9
10 This guide may help you successfully compile Eggdrop. Suggestions are by
11 various contributors. If you think something should be added, please send
12 an e-mail to bugs@eggheads.org. Note that in this document, text between
13 a '<' and a '>' should be replaced (without the '<' and '>').
14
15 NOTE: This is not a 'quick install' guide. See the INSTALL file for basic
16 setup information. This is intended to help you compile the bot on uncommon
17 operating systems, or work past problems encountered during compile.
18
19
20 Contents:
21 Compile Guide:
22 A. Standard compile process (Linux, FreeBSD, NetBSD, OpenBSD, etc)
23 B. HP-UX B.11.*
24 C. Ultrix
25 D. Mac OS X
26 E. AIX
27 F. IRIX
28 G. Cygwin / Windows
29 H. Tcl Detection and Installation
30
31 Frequently Asked Questions:
32 1. I get a lot of warnings.
33 2. I get a 'strip terminated with signal 6' error during compile/install,
34 or another error related to 'strip'.
35 3. 'DIR' undeclared (and a whole bunch of others) (AIX 4)
36 4. 'fd_set' undeclared (and a whole bunch of others) (AIX 4)
37 5. Unresolved or undefined symbols: ldclose, ldopen, ldnshread (AIX 3)
38 6. Unsatisfied symbols 'shl_findsym' and 'shl_load' (HP-UX 9)
39 7. Compile stops at the last minute with "ld fatal signal 11"! (Linux)
40 8. Undefined references in net.o (Sun OS)
41 9. I experience problems starting the configure script (AIX/various)
42 10. I get a 'make: Permission denied' error when I type 'make config'
43 or 'make' (FreeBSD / *BSD)
44
45
46 Compile Guide
47 This will tell you how to compile Eggdrop on various operating systems.
48 If you have gotten Eggdrop to compile on an operating system not listed
49 here, please let the development team know how, at eggdev@eggheads.org.
50 Please tell us what, if any, special steps were required to compile the
51 bot. Also, any compiler warnings/etc, and the 'config.log' and 'config.h'
52 files would be helpful. The development team does not have access to the
53 resources needed to test portability on uncommon operating systems, so
54 your help is greatly appreciated.
55
56 A. Standard compile process (32-bit Linux, FreeBSD, NetBSD, OpenBSD, etc.)
57 B. HP-UX B.11.*
58 C. Ultrix
59 D. Mac OS X
60 E. AIX
61 F. IRIX
62 G. Solaris / SunOS
63 H. Cygwin / Windows
64 I. Tcl Detection and Installation
65
66 A. Standard compile process (32-bit Linux, FreeBSD, NetBSD, OpenBSD, etc.)
67 1. Type './configure' from the Eggdrop directory. Some of the options
68 that can be given to ./configure are explained below.
69
70 --enable-strip
71 If you want to create a smaller binary, you can use this option.
72 HOWEVER, this will remove debugging symbols and make bug reports
73 almost completely useless, and is not recommended. If disk space
74 is very limited, however, it might help to enable this.
75
76 --disable-tcl-threads
77 This disables support for Tcl threads.
78
79 --with-tcllib
80 --with-tclinc
81 See 'E. Tcl Detection and Installation' below (at the end of this
82 compile guide).
83
84 2. Type either 'make config', or 'make iconfig' to determine which
85 modules will be compiled.
86
87 3. Type 'make' from the Eggdrop directory, or to force a statically
88 linked module bot, type 'make static'. Otherwise, the Makefile will
89 use whatever type of compile the configure script determined your
90 system will support. Dynamic is always the better way to go if
91 possible. You can force a dynamic build with 'make eggdrop'. There
92 are also the 'debug' and 'sdebug' (static-debug) options, which will
93 give more detailed output on a crash. This will help the development
94 team track down the crash and fix the bug. Debug and sdebug will take
95 a little longer to compile and will enlarge the binary a bit, but
96 it's worth it if you want to support Eggdrop development.
97
98 4. Eggdrop must be installed in a directory somewhere. This is
99 accomplished by typing 'make install'.
100
101 This will install the Eggdrop in your home directory in a directory
102 called 'eggdrop' (i.e. /home/user/eggdrop).
103
104 If you want to install to a different directory, use:
105
106 make install DEST=<directory>
107
108 For example:
109
110 make install DEST=/home/user/otherdir
111
112 B. HP-UX B.11.*
113 Follow the standard compile process in Section A. To compile dynamically
114 (with module support), use 'make eggdrop' instead of 'make'.
115
116 During a linking in a dynamic build, you may experience an error such as:
117
118 gcc -pipe -fPIC -shared -o ../eggdrop bg.o botcmd.o botmsg.o botnet.o
119 chanprog.o cmds.o dcc.o dccutil.o dns.o flags.o language.o match.o
120 main.o mem.o misc.o misc_file.o modules.o net.o rfc1459.o tcl.o
121 tcldcc.o tclhash.o tclmisc.o tcluser.o userent.o userrec.o users.o
122 -L/usr/local/lib -ltcl8.4 -lm -ldld -lnsl md5/md5c.o compat/*.o `cat
123 mod/mod.xlibs`
124 /usr/ccs/bin/ld: DP relative code in file bg.o - shared library must be
125 position independent. Use +z or +Z to recompile.
126 collect2: ld returned 1 exit status
127 *** Error exit code 1
128
129 If you know the cause of this error, please contact the Eggheads
130 Development Team at eggdev@eggheads.org.
131
132 Note that on HP-UX, the SHLIB_PATH environment variable should be used
133 instead of LD_LIBRARY_PATH.
134
135
136 C. Ultrix
137 There are some known problems with 'make' and Eggdrop on Ultrix systems.
138 We recomend using 'gmake' (GNU make) for this reason, as in the steps
139 below.
140
141 If your system does not have 'gmake', you can download it from:
142
143 http://ftp.gnu.org/pub/gnu/make/
144
145 It can be installed in your home directory, as with Tcl, but that is
146 beyond the scope of this document. Read the INSTALL file that comes with
147 gmake.
148
149 Following these steps should work:
150
151 1. Depending on what shell your using:
152
153 bash/ksh:
154 export LD_LIBRARY_PATH=<path to DIRECTORY containing Tcl library>:${LD_LIBRARY_PATH}
155
156 csh/tcsh/tclsh:
157 setenv LD_LIBRARY_PATH <path to DIRECTORY containing Tcl library>:${LD_LIBRARY_PATH}
158
159 2. Run the following command from your Eggdrop compilation directory
160 (this is all one command):
161
162 sh5 ./configure --with-tclinc='<full path to tcl.h>'
163 --with-tcllib='<full path to Tcl library>'
164
165 3. Type 'gmake config' or 'gmake iconfig' to configure modules.
166
167 4. Type 'gmake'. If you experience problems during linking, or while
168 building modules, try using 'gmake static', for a static build,
169 instead.
170
171 5. To install Eggdrop, type 'gmake install'.
172
173 This will install the Eggdrop in your home directory in a
174 directory called 'eggdrop' (i.e. /home/user/eggdrop).
175
176 If you want to install to a different directory, use:
177
178 gmake install DEST=<directory>
179
180 For example:
181
182 gmake install DEST=/home/user/otherdir
183
184
185 D. Mac OS X
186 Follow the standard compile process in Section A. To compile dynamically
187 (with module support), use 'make eggdrop' instead of 'make'.
188
189 To get third-party modules to compile, you may need to edit the module's
190 Makefile and add "$(XLIBS) $(MODULE_XLIBS)" to the end of the
191 ../../../MODULE.$(MOD_EXT) target's $(LD) line.
192
193 For example:
194
195 ../../../mymodule.$(MOD_EXT): ../mymodule.o
196 $(LD) -o ../../../mymodule.$(MOD_EXT) ../mymodule.o
197 $(STRIP) ../../../mymodule.$(MOD_EXT)
198
199 Would become:
200
201 ../../../mymodule.$(MOD_EXT): ../mymodule.o
202 $(LD) -o ../../../mymodule.$(MOD_EXT) ../mymodule.o $(XLIBS) $(MODULE_XLIBS)
203 $(STRIP) ../../../mymodule.$(MOD_EXT)
204
205 If you notice a module that requires these changes, it would probably be
206 a good idea to let the module's developer know, so it can be fixed.
207
208
209 Note that on Mac OS X, the DYLD_LIBRARY_PATH environment variable should
210 be used instead of LD_LIBRARY_PATH.
211
212
213 E. AIX
214 Follow the standard compile process in Section A. To compile dynamically
215 (with module support), use 'make eggdrop' instead of 'make'.
216
217 Note that on AIX, the LIBPATH environment variable should be used instead
218 of LD_LIBRARY_PATH.
219
220
221 F. IRIX
222 Follow the standard compile process in Section A. To compile dynamically
223 (with module support), use 'make eggdrop' instead of 'make'.
224
225 Note that on IRIX, the LD_LIBRARYN32_PATH and LD_LIBRARY64_PATH environment
226 variables should be used instead of LD_LIBRARY_PATH.
227
228
229 G. Solaris / SunOS
230 Follow the standard compile process in Section A. To compile dynamically
231 (with module support), use 'make eggdrop' instead of 'make'.
232
233 Note that on Solaris / SunOS, the LD_LIBRARY_PATH_32 and LD_LIBRARY_PATH_64
234 environment variables may need to be set instead of (or in addition to, to
235 be safe) LD_LIBRARY_PATH.
236
237
238 H. Cygwin / Windows
239 To compile and install Eggdrop on windows, preform the steps listed
240 below.
241
242 1. Download and install Cygwin (www.cygwin.com). Make sure to install
243 things like GCC, zlib, minires, autoconf, and automake. DO NOT
244 install the Tcl provided by Cygwin's installer. After installing,
245 open the Cygwin bash prompt.
246
247 2. Download and install TCL 8.4.1. You can get Tcl for Cygwin at
248 http://prdownloads.sourceforge.net/windrop/tcl-8.4.1.tar.gz.
249 Extract this to the Cygwin root directory:
250
251 cd /
252 tar -zxf tcl-8.4.1.tar.gz
253
254 3. Download Eggdrop from www.geteggdrop.com to your home directory.
255 This is usually something like 'C:\cygwin\home\<username>\'. After
256 downloading, extract the Eggdrop tarball:
257
258 tar -zxf eggdrop1.7.0.tar.gz
259
260 4. Run './configure --enable-strip'. Debugging information under
261 Windows is basically useless to the development team, and this will
262 reduce the size of your Eggdrop binary.
263
264 5. Type either 'make config', or 'make iconfig' to determine which
265 modules will be compiled.
266
267 6. Compile the bot using 'make eggdrop'.
268
269 7. Install the bot by typing 'make install DEST=<install path>'.
270 For example:
271
272 make install DEST='C:/eggdrop/'
273
274 Make sure to enclose the destination directory/folder in single
275 quotes (''), especially if it contains spaces.
276
277 8. Preform the following commands:
278
279 cd 'C:/<install path>/' (example: cd 'C:/eggdrop')
280 rm modules
281 rm eggdrop.exe
282 mv eggdrop.exe-1.7.0 eggdrop.exe
283 mv modules-1.7.0 modules
284
285 9. Create a 'lib' directory and copy needed libraries using the
286 following commands. This assumes that you installed your Eggdrop in
287 'C:\eggdrop'. If you chose a different installation path, replace
288 'C:/eggdrop' in the following steps with your installation
289 directory, replacing all '\'s with '/'s.
290
291 cp /bin/cygwin1.dll 'C:/eggdrop'
292 cp /usr/local/bin/tcl84.dll 'C:/eggdrop'
293 cp /usr/local/bin/tclpip84.dll 'C:/eggdrop'
294
295 mkdir C:/eggdrop/lib
296 cp -r /usr/local/lib/dde1.2 'C:/eggdrop/lib'
297 cp -r /usr/local/lib/reg1.1 'C:/eggdrop/lib'
298 cp -r /usr/local/lib/tcl8.4 'C:/eggdrop/lib'
299
300 cp /bin/cygz.dll 'C:/eggdrop' (if you selected compress.mod)
301
302 cp /bin/cygminires.dll 'C:/eggdrop' (if you selected dns.mod)
303
304
305 I. Tcl Detection and Installation
306 If ./configure does not correctly detect the location of your Tcl
307 library and header file, or if you experience errors related to Tcl
308 during linking, preform these steps:
309
310 1. Depending on what shell your using:
311
312 bash/ksh:
313 export LD_LIBRARY_PATH=<path to DIRECTORY containing Tcl library>:${LD_LIBRARY_PATH}
314
315 csh/tcsh/tclsh:
316 setenv LD_LIBRARY_PATH <path to DIRECTORY containing Tcl library>:${LD_LIBRARY_PATH}
317
318 Note that some OS's use a different environment variable to tell
319 ld where to look for a library. See the notes for your specific OS
320 above (if applicable).
321
322 2. Run the following command from your Eggdrop compilation directory
323 (this is all one command):
324
325 ./configure --with-tclinc='<full path to tcl.h>'
326 --with-tcllib='<full path to Tcl library>'
327
328 3. Continue compiling the bot as outlined in Section A., starting
329 with 'make config'.
330
331 If you do not have Tcl installed on your system, you can compile it in
332 your /home directory. Download Tcl from Tcl's SourceForge project page
333 at http://www.sourceforge.net/projects/tcl/, or from ActiveState at
334 ftp://tcl.activestate.com/pub/tcl/tcl8_4/. Read Tcl's README file for
335 help with compiling and installing it. After you compile Tcl, follow
336 the steps above to allow Eggdrop to detect Tcl.
337
338
339 Frequently Asked Questions
340 1. I get a lot of warnings.
341
342 Warnings do not necessarily mean anything bad. As long as the compile
343 completes, there is really nothing to worry about. Generally, we try to
344 avoid warnings. We try to fix the warnings we are aware of. If you
345 experience warnings, you can let us know by e-mailing bugs@eggheads.org.
346 If you feel like fixing them yourself, please do so and send us a patch
347 (as described in doc/PATCH_HOWTO). Thanks.
348
349
350 2. I get a 'strip terminated with signal 6' error during compile/install,
351 or another error related to 'strip'.
352
353 collect2: strip terminated with signal 6 [IOT/Abort trap]
354 *** Exit 1
355 Stop.
356 *** Exit 1
357 Stop.
358
359 Don't use the --enable-strip ./configure option.
360
361
362 3. 'DIR' undeclared (and a whole bunch of others) (AIX 4)
363
364 gcc -c -O2 -fno-strength-reduce -I.. -DHAVE_CONFIG_H filedb.c
365 filedb.c: In function `filedb_update':
366 filedb.c:209: `DIR' undeclared (first use this function)
367 filedb.c:209: (Each undeclared identifier is reported only once
368 filedb.c:209: for each function it appears in.)
369 filedb.c:209: `dir' undeclared (first use this function)
370 filedb.c:209: parse error before `*'
371 filedb.c:217: warning: assignment makes pointer from integer without a cast
372 filedb.c:218: `name' undeclared (first use this function)
373 filedb.c:218: dereferencing pointer to incomplete type
374 filedb.c:220: dereferencing pointer to incomplete type
375 filedb.c:220: dereferencing pointer to incomplete type
376 filedb.c:224: dereferencing pointer to incomplete type
377 filedb.c:224: dereferencing pointer to incomplete type
378 filedb.c:225: dereferencing pointer to incomplete type
379 filedb.c:230: `s' undeclared (first use this function)
380 filedb.c:231: `st' undeclared (first use this function)
381 filedb.c:232: `fdb' undeclared (first use this function)
382 filedb.c:232: `where' undeclared (first use this function)
383 filedb.c:237: `fdb1' undeclared (first use this function)
384 filedb.c:253: warning: assignment makes pointer from integer without a cast
385 make: The error code from the last command is 1.
386
387 The configure script didn't detect that this particular system had dirent.h
388 and sys/dir.h. The solution is to add -DHAVE_DIRENT_H -DHAVE_SYS_DIR_H to
389 the Makefile's CFLGS line:
390
391 CFLGS = -DHAVE_DIRENT_H -DHAVE_SYS_DIR_H
392
393
394 4. 'fd_set' undeclared (and a whole bunch of others) (AIX 4)
395
396 gcc -c -O2 -fno-strength-reduce -I.. -DHAVE_CONFIG_H -DHAVE_DIRENT_H -DHAVE_SYS_DIR_H net.c
397 net.c: In function `sockread':
398 net.c:390: `fd_set' undeclared (first use this function)
399 net.c:390: (Each undeclared identifier is reported only once
400 net.c:390: for each function it appears in.)
401 net.c:390: parse error before `fd'
402 net.c:396: `fd' undeclared (first use this function)
403 make: The error code from the last command is 1.
404
405 Again, this seems that one of configure's components (sed, awk,
406 or something along those lines) is broken, and configure failed to
407 detect that this system needed sys/select.h. The solution is to add
408 -DHAVE_SYS_SELECT_H to the Makefile's CFLGS line:
409
410 CFLGS = -DHAVE_DIRENT_H -DHAVE_SYS_DIR_H -DHAVE_SYS_SELECT_H
411
412
413 5. Unresolved or undefined symbols: ldclose, ldopen, ldnshread (AIX 3)
414
415 cc -s -o eggdrop chan.o chanprog.o chanset.o cmds.o dcc.o dccutil.o
416 filedb.o fileq.o files.o gotdcc.o hash.o main.o match.o mem.o misc.o
417 mode.o msgcmds.o msgnotice.o net.o tandcmd.o tandem.o tcl.o tclhash.o
418 userrec.o users.o -L/home2/f/foster/lib -ltcl7.5 -lm
419 0706-317 ERROR: Unresolved or undefined symbols detected:
420 Symbols in error (followed by references) are dumped to the load map.
421 The -bloadmap:<filename> option will create a load map.
422 .ldclose
423 .ldopen
424 .ldnshread
425 make: 1254-004 The error code from the last command is 8.
426
427 Apparently, what is happening is a library called ld is required. Either
428 configure doesn't know it is needed, it simply can't find it, or maybe
429 this is a unique case. The solution is to have ld linked in with the final
430 binary.
431
432 Edit your Makefile and find the line that looks something like this:
433
434 GMAKE = ${MAKE} 'CC=cc' 'AWK=awk' 'OBJS=${OBJS}' 'TCLLIBFN=tcl7.5.a'\
435 'CFLAGS=${CFLAGS}' 'XREQ=${XREQ}' 'XLIBS= -L/home2/f/foster/lib -ltcl7.5 -lm'\
436 'TCLLIB=${TCLLIB}' 'RANLIB=ranlib' 'STRIP=-s'
437
438 Add in -lld into the XLIBS assignment, like this:
439
440 GMAKE = ${MAKE} 'CC=cc' 'AWK=awk' 'OBJS=${OBJS}' 'TCLLIBFN=tcl7.5.a'\
441 'CFLAGS=${CFLAGS}' 'XREQ=${XREQ}' 'XLIBS=-lld -L/home2/f/foster/lib -ltcl7.5 -lm'\
442 'TCLLIB=${TCLLIB}' 'RANLIB=ranlib' 'STRIP=-s'
443
444
445 6. Unsatisfied symbols 'shl_findsym' and 'shl_load' (HP-UX 9)
446
447 gcc -s -o eggdrop chan.o chanprog.o chanset.o cmds.o dcc.o
448 dccutil.o filedb.o fileq.o files.o gotdcc.o hash.o main.o match.o
449 mem.o misc.o mode.o msgcmds.o msgnotice.o net.o tandcmd.o tandem.o
450 tcl.o tclhash.o userrec.o users.o -L/home/hltran/tcl/lib -ltcl7.5 -lm
451 /bin/ld: Unsatisfied symbols:
452 shl_findsym (code)
453 shl_load (code)
454 collect2: ld returned 1 exit status
455 *** Error code 1
456 Stop.
457
458 Upgrade to a later version of Tcl. The following should also work.
459
460 Edit your Makefile and find the line that looks something like this:
461
462 GMAKE = ${MAKE} 'CC=gcc' 'AWK=awk' 'OBJS=${OBJS}' 'TCLLIBFN=tcl7.5.a'\
463 'CFLAGS=${CFLAGS}' 'XREQ=${XREQ}' 'XLIBS= -L/usr/local/lib -ltcl7.5 -lm'\
464 'TCLLIB=${TCLLIB}' 'RANLIB=:' 'STRIP='
465
466 Add in -ldl into the XLIBS assignment, like this:
467
468 GMAKE = ${MAKE} 'CC=gcc' 'AWK=awk' 'OBJS=${OBJS}' 'TCLLIBFN=tcl7.5.a'\
469 'CFLAGS=${CFLAGS}' 'XREQ=${XREQ}' 'XLIBS=-ldl -L/usr/local/lib -ltcl7.5 -lm'\
470 'TCLLIB=${TCLLIB}' 'RANLIB=:' 'STRIP='
471
472
473 7. Compile stops at the last minute with "ld fatal signal 11"! (Linux)
474
475 This seems to be caused by a non-ELF Tcl library binary, and the compiler
476 doesn't seem to like it. Download and install Tcl in your home directory
477 using the steps in 'E. Tcl Detection and Installation' in the Compile
478 Guide above.
479
480
481 8. Undefined references in net.o (SunOS)
482
483 First
484 Undefined Referenced
485 Symbol In file
486
487 socket net.o
488 gethostbyname net.o
489 accept net.o
490 bind net.o
491 setsockopt net.o
492 gethostbyaddr net.o
493 getsockname net.o
494 gethostname net.o
495 listen net.o
496 connect net.o
497 ld: fatal: Symbol referencing errors. No output written to eggdrop
498
499 This seems to be caused by a few libraries not being detected by the
500 auto-configure script; it is relatively easy to fix. Edit your Makefile.
501 Note that yours may be slightly different than this one when it comes to
502 the Tcl library, but here is the way it probably is:
503
504 GMAKE = ${MAKE} 'CC=gcc' 'AWK=awk' 'OBJS=${OBJS}' 'TCLLIBFN=tcl.a'\
505 'CFLAGS=${CFLAGS}' 'XREQ=${XREQ}' 'XLIBS= -L/usr/local/lib -ltcl -lm'\
506 'TCLLIB=${TCLLIB}' 'RANLIB=:' 'STRIP='
507
508 Here is what you need to change it to:
509
510 GMAKE = ${MAKE} 'CC=gcc' 'AWK=awk' 'OBJS=${OBJS}' 'TCLLIBFN=tcl.a'\
511 'CFLAGS=${CFLAGS}' 'XREQ=${XREQ}' 'XLIBS=-lsocket -ldl -lnsl -L/usr/local/lib -ltcl -lm'\
512 'TCLLIB=${TCLLIB}' 'RANLIB=:' 'STRIP='
513
514 You are adding three libraries to be linked in: socket, dl, and nsl. This
515 will resolve the net.o errors.
516
517
518 9. I experience problems starting the configure script (AIX/various)
519
520 If you receive file descriptor or bad interpreter errors when attempting
521 to run the configure script, try running 'sh configure' or 'bash configure'
522 instead of './configure'. This problem seems to show up on many AIX
523 machines.
524
525
526 10. I get a 'make: Permission denied' error when I type 'make config' or
527 'make' (FreeBSD / *BSD)
528
529 This is caused by a bug in FreeBSD (and possibly other BSDs as well).
530 A simple 'cd .', or changing to a different directory and then changing
531 back, usually fixes this.
532 _____________________________________________________________________
533
534 Copyright (C) 1997 Robey Pointer
535 Copyright (C) 1999 - 2006 Eggheads Development Team

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23