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

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

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


Revision 1.16 - (show annotations) (download)
Sun Oct 2 20:51:31 2011 UTC (9 years, 4 months ago) by pseudo
Branch: MAIN
CVS Tags: HEAD
Changes since 1.15: +14 -18 lines
Updated instructions for compilation under Cygwin. Updated space requirements a bit.

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

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23