This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Problems with compiling the bot

General support and discussion of Eggdrop bots.
j
jsl
Voice
Posts: 12
Joined: Wed Nov 01, 2006 9:38 pm

Problems with compiling the bot

Post by jsl »

When I'm trying to set up my eggdrop version 1.6.18, the first two steps ('./configure', 'make config') go fine. However when I then type 'make' I get this:
[3:35] koopa ~/eggdrop1.6.18 % make
This may take a while. Go get some runts.

cc -g -I.. -I.. -DHAVE_CONFIG_H -c bg.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c botcmd.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c botmsg.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c botnet.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c chanprog.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c cmds.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c dcc.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c dccutil.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c dns.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c flags.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c language.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c match.c
cc -g -I.. -I.. -DHAVE_CONFIG_H \
'-DCCFLAGS="cc -g -I.. -I.. -DHAVE_CONFIG_H "' \
'-DLDFLAGS="cc"' \
'-DSTRIPFLAGS="touch"' -c ./main.c
"./main.c", line 1104: warning: static function called but not defined: garbage_collect_tclhash()
cc -g -I.. -I.. -DHAVE_CONFIG_H -c mem.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c misc.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c misc_file.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c modules.c
"modules.c", line 1088: warning: assignment type mismatch:
pointer to function(int, pointer to char, int) returning void "=" pointer to function() returning void
"modules.c", line 1096: warning: assignment type mismatch:
pointer to function(pointer to struct userrec {pointer to struct userrec {..} next, array[10] of char handle, unsigned long flags, unsigned long flags_udef, pointer to struct chanuserrec {..} chanrec, pointer to struct user_entry {..} entries}, pointer to char) returning int "=" pointer to function() returning int
"modules.c", line 1155: warning: static function called but not defined: open_listen()
cc -g -I.. -I.. -DHAVE_CONFIG_H -c net.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c rfc1459.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c tcl.c
"tcl.c", line 741: warning: assignment type mismatch:
pointer to char "=" pointer to const char
cc -g -I.. -I.. -DHAVE_CONFIG_H -c tcldcc.c
"tcldcc.c", line 1161: warning: static function called but not defined: open_listen()
cc -g -I.. -I.. -DHAVE_CONFIG_H -c tclhash.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c tclmisc.c
"tclmisc.c", line 688: warning: assignment type mismatch:
pointer to char "=" pointer to unsigned char
cc -g -I.. -I.. -DHAVE_CONFIG_H -c tcluser.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c userent.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c userrec.c
cc -g -I.. -I.. -DHAVE_CONFIG_H -c users.c
cc -g -I. -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c md5c.c
cc -g -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c inet_aton.c
cc -g -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c snprintf.c
cc -g -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c memset.c
cc -g -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c memcpy.c
cc -g -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c strcasecmp.c
cc -g -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c strftime.c

---------- Yeah! That's the compiling, now the linking! ----------

Linking eggdrop (standard build).

cc -o ../eggdrop bg.o botcmd.o botmsg.o botnet.o chanprog.o cmds.o dcc.o dccutil.o dns.o flags.o language.o match.o main.o mem.o misc.o misc_file.o modules.o net.o rfc1459.o tcl.o tcldcc.o tclhash.o tclmisc.o tcluser.o userent.o userrec.o users.o -L/opt/tcl/lib -ltcl -lm -ldl -lnsl -lsocket md5/md5c.o compat/*.o `cat mod/mod.xlibs`
Undefined first referenced
symbol in file
open_listen modules.o
garbage_collect_tclhash main.o
expmem_mask userrec.o
ld: fatal: Symbol referencing errors. No output written to ../eggdrop
*** Error code 1
make: Fatal error: Command failed for target `../eggdrop'
Current working directory /home/k/l/klindste/eggdrop1.6.18/src
*** Error code 1
The following command caused the error:
cd src && make 'MAKE=make' 'CC=cc' 'LD=cc' 'STRIP=touch' 'RANLIB=ranlib' 'CFLGS=' 'TCLLIB=/opt/tcl/lib' 'TCLLIBFN=tcl.so' 'XREQS=/opt/tcl/lib/libtcl.so' 'XLIBS=-L/opt/tcl/lib -ltcl -lm -ldl -lnsl -lsocket' 'EGGEXEC=eggdrop' 'EGGBUILD=(standard build)' 'MODOBJS=' eggdrop
make: Fatal error: Command failed for target `modegg'
Any ideas? :(
Last edited by jsl on Thu Nov 02, 2006 2:01 am, edited 1 time in total.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

What options did you use for configure and what platform is this on?
And are you using the source archive from eggheads.org?

From a quick look at the src, the open_listen symbol is defined in src/proto.h, which is normally included in the src/Makefile.

"modules.c", line 1155: warning: static function called but not defined: open_listen()

"tcldcc.c", line 1161: warning: static function called but not defined: open_listen()

Undefined first referenced symbol in file open_listen modules.o

etc..

A quick fix would be to force including the proto.h file, in the file main.h:

#ifndef MAKING_MODS
# include "proto.h"
#endif

Comment that part above out and replace it with:

#include "proto.h"

I suspect your problem is more extensive tho, if the normal configure did not create the right definitions to begin with.

Ohh I also noticed this:

[3:35] koopa ~/eggdrop1.6.18 % make

Current working directory /home/k/l/klindste/eggdrop1.6.17/src

Do you have 2 different copies of the src?
j
jsl
Voice
Posts: 12
Joined: Wed Nov 01, 2006 9:38 pm

Post by jsl »

rosc2112 wrote:What options did you use for configure and what platform is this on?
Umm... The default options I guess, just ./configure and 'make config'.
About the platform, it's my ISP's unix server... I'm don't know more details... Does this answer to your question: "Sun Microsystems Inc. SunOS 5.10 Generic January 2005"
And are you using the source archive from eggheads.org?
Yes.
Ohh I also noticed this:

[3:35] koopa ~/eggdrop1.6.18 % make

Current working directory /home/k/l/klindste/eggdrop1.6.17/src

Do you have 2 different copies of the src?
Ignore that... I first copy-pasted that error report from 1.6.17, then I tried with 1.6.18 and got exact the same thing so I just edited 1.6.17 -> 1.6.18 to the copy-paste...
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Refer to the COMPILE-GUIDE in ~/eggdrop1.6.18/doc regarding compiling eggdrop on SunOS.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
j
jsl
Voice
Posts: 12
Joined: Wed Nov 01, 2006 9:38 pm

Post by jsl »

Alchera wrote:Refer to the COMPILE-GUIDE in ~/eggdrop1.6.18/doc regarding compiling eggdrop on SunOS.
All it says is:
G. Solaris / SunOS
Follow the standard compile process in Section A. To compile dynamically
(with module support), use 'make eggdrop' instead of 'make'.

Note that on Solaris / SunOS, the LD_LIBRARY_PATH_32 and LD_LIBRARY_PATH_64
environment variables may need to be set instead of (or in addition to, to
be safe) LD_LIBRARY_PATH.
and:
8. Undefined references in net.o (SunOS)

First
Undefined 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 script; 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='

Here is what you need to change it to:

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 three libraries to be linked in: socket, dl, and nsl. This
will resolve the net.o errors.
The first one doesn't help here. As for the second one, well, those things it tells me to add to Makefile, are already there when I check :shock:
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Did you try what I suggested about adding proto.h to the main.h file?
j
jsl
Voice
Posts: 12
Joined: Wed Nov 01, 2006 9:38 pm

Post by jsl »

rosc2112 wrote:Did you try what I suggested about adding proto.h to the main.h file?
Yes... Still gives the same error :(
j
jsl
Voice
Posts: 12
Joined: Wed Nov 01, 2006 9:38 pm

Post by jsl »

I just get this:
[21:39] koopa ~/eggdrop1.6.18 % make
This may take a while. Go get some runts.


---------- Yeah! That's the compiling, now the linking! ----------

Linking eggdrop (standard build).

cc -o ../eggdrop bg.o botcmd.o botmsg.o botnet.o chanprog.o cmds.o dcc.o dccutil.o dns.o flags.o language.o match.o main.o mem.o misc.o misc_file.o modules.o net.o rfc1459.o tcl.o tcldcc.o tclhash.o tclmisc.o tcluser.o userent.o userrec.o users.o -lsocket -ldl -lnsl -L/opt/tcl/lib -ltcl -lm md5/md5c.o compat/*.o `cat mod/mod.xlibs`
Undefined first referenced
symbol in file
open_listen modules.o
garbage_collect_tclhash main.o
expmem_mask userrec.o
ld: fatal: Symbol referencing errors. No output written to ../eggdrop
*** Error code 1
make: Fatal error: Command failed for target `../eggdrop'
Current working directory /home/k/l/klindste/eggdrop1.6.18/src
*** Error code 1
The following command caused the error:
cd src && make 'MAKE=make' 'CC=cc' 'LD=cc' 'STRIP=touch' 'RANLIB=ranlib' 'CFLGS=' 'TCLLIB=/opt/tcl/lib' 'TCLLIBFN=tcl.so' 'XREQS=/opt/tcl/lib/libtcl.so' 'XLIBS=-lsocket -ldl -lnsl -L/opt/tcl/lib -ltcl -lm' 'EGGEXEC=eggdrop' 'EGGBUILD=(standard build)' 'MODOBJS=' eggdrop
make: Fatal error: Command failed for target `modegg'
[21:39] koopa ~/eggdrop1.6.18 %
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Try adding -DMAKING_MODS to the CFLAGS environment variable, eg:

CFLAGS="$CFLAGS -DMAKING_MODS" ; ./configure

Beyond that, I dunno what to suggest, I'm not that familiar with SunOS (although I've heard a lot of complaints about its compiler not working well with GNU software.. Might be worth the bother to install GNU's development tools, gcc, gnu-make, libtool, autoconf, etc, if they are not installed already.)
j
jsl
Voice
Posts: 12
Joined: Wed Nov 01, 2006 9:38 pm

Post by jsl »

During the 'make config' I sometimes get messages like this:
./config.status: fork: Resource temporarily unavailable
For example:
checking for zlib.h... yes
.././compress.mod/configure: fork: Resource temporarily unavailable
updating cache ../../../config.cache
configure: creating ./config.status
./config.status: fork: Resource temporarily unavailable
./config.status: fork: Resource temporarily unavailable
./config.status: fork: Resource temporarily unavailable
: cannot create a temporary directory in .
.././compress.mod/configure: fork: Resource temporarily unavailable
.././compress.mod/configure: fork: Resource temporarily unavailable
What could cause that? It still continues the procedure and even finishes it "succesfully", but could that have something to do with the problems I get with 'make'?
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Looks like a memory problem
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Yes, that could be why your configure is not setting the right options, and the reason it's doing that is likely because your shell provider has such a restrictive quota.

Personally, I'd be looking for another shell provider.
j
jsl
Voice
Posts: 12
Joined: Wed Nov 01, 2006 9:38 pm

Post by jsl »

I cleared some space on my shell account, and now it doesn't give those fork errors anymore. However I still get the original error:
Linking eggdrop (standard build).

cc -o ../eggdrop bg.o botcmd.o botmsg.o botnet.o chanprog.o cmds.o dcc.o dccutil.o dns.o flags.o language.o match.o main.o mem.o misc.o misc_file.o modules.o net.o rfc1459.o tcl.o tcldcc.o tclhash.o tclmisc.o tcluser.o userent.o userrec.o users.o -L/opt/tcl/lib -ltcl -lm -ldl -lnsl -lsocket md5/md5c.o compat/*.o `cat mod/mod.xlibs`
Undefined first referenced
symbol in file
open_listen modules.o
garbage_collect_tclhash main.o
expmem_mask userrec.o
ld: fatal: Symbol referencing errors. No output written to ../eggdrop
*** Error code 1
make: Fatal error: Command failed for target `../eggdrop'
Current working directory /home/k/l/klindste/eggdrop1.6.18/src
*** Error code 1
The following command caused the error:
cd src && make 'MAKE=make' 'CC=cc' 'LD=cc' 'STRIP=touch' 'RANLIB=ranlib' 'CFLGS=' 'TCLLIB=/opt/tcl/lib' 'TCLLIBFN=tcl.so' 'XREQS=/opt/tcl/lib/libtcl.so' 'XLIBS=-L/opt/tcl/lib -ltcl -lm -ldl -lnsl -lsocket' 'EGGEXEC=eggdrop' 'EGGBUILD=(standard build)' 'MODOBJS=' eggdrop
make: Fatal error: Command failed for target `modegg'
I guess there's nothing more I can do then :cry:
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Contact your shell administrator and have him empty his tmp dirs; might fix the problem.

I ran an eggdrop under SunOS many moons ago and always would hit a glitz if the admin didn't clear the tmp dir regularly.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Undefined first referenced symbol in file open_listen modules.o

That is the essence of the problem, which means that proto.h file is not being included. The brute force method to get it included would be to edit the .c files and stick an #include "proto.h" line into the files that require it (eg, modules.c and then each other .c file that produces an error at the linking, you'll know which ones when you see errors naming the corresponding .o file; in other words since modules.o was named the corresponding .c file is modules.c)

A quick grep of the source shows the open_listen symbol named in these files:

modules.c
net.c
tcldcc.c

It may also be called in some of the files in the mods/ subdirs, I did not look at those.

Also, before recompiling, make sure you're doing a 'make clean' first to get rid of the old .o files that still have the errors.

Other suggestions: Ask your shell provider to compile the binary and make it available system-wide. Or, find another SunOS user with the same platform to compile it and give you a copy. Or, find someone with the resources for cross-compiling to make a binary for you. Last resort, find a better shell (not a fan of Sun personally.. =)

Good luck
Post Reply