egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problems with compiling the bot
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
jsl
Voice


Joined: 01 Nov 2006
Posts: 12

PostPosted: Wed Nov 01, 2006 9:43 pm    Post subject: Problems with compiling the bot Reply with quote

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:

Quote:
[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? Sad


Last edited by jsl on Thu Nov 02, 2006 2:01 am; edited 1 time in total
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu Nov 02, 2006 1:24 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
jsl
Voice


Joined: 01 Nov 2006
Posts: 12

PostPosted: Thu Nov 02, 2006 2:04 am    Post subject: Reply with quote

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"

Quote:
And are you using the source archive from eggheads.org?


Yes.

Quote:
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...
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu Nov 02, 2006 9:53 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
jsl
Voice


Joined: 01 Nov 2006
Posts: 12

PostPosted: Sat Nov 04, 2006 2:15 am    Post subject: Reply with quote

Alchera wrote:
Refer to the COMPILE-GUIDE in ~/eggdrop1.6.18/doc regarding compiling eggdrop on SunOS.

All it says is:

Quote:
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:

Quote:
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 Shocked
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sat Nov 04, 2006 9:49 am    Post subject: Reply with quote

Did you try what I suggested about adding proto.h to the main.h file?
Back to top
View user's profile Send private message
jsl
Voice


Joined: 01 Nov 2006
Posts: 12

PostPosted: Sat Nov 04, 2006 11:57 am    Post subject: Reply with quote

rosc2112 wrote:
Did you try what I suggested about adding proto.h to the main.h file?

Yes... Still gives the same error Sad
Back to top
View user's profile Send private message
jsl
Voice


Joined: 01 Nov 2006
Posts: 12

PostPosted: Sat Nov 04, 2006 3:41 pm    Post subject: Reply with quote

I just get this:

Quote:
[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 %
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sat Nov 04, 2006 4:13 pm    Post subject: Reply with quote

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.)
Back to top
View user's profile Send private message
jsl
Voice


Joined: 01 Nov 2006
Posts: 12

PostPosted: Sun Nov 05, 2006 2:03 pm    Post subject: Reply with quote

During the 'make config' I sometimes get messages like this:

Quote:
./config.status: fork: Resource temporarily unavailable


For example:
Quote:

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'?
Back to top
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Sun Nov 05, 2006 2:17 pm    Post subject: Reply with quote

Looks like a memory problem
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sun Nov 05, 2006 4:52 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
jsl
Voice


Joined: 01 Nov 2006
Posts: 12

PostPosted: Sun Nov 05, 2006 10:14 pm    Post subject: Reply with quote

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:

Quote:
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 Crying or Very sad
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Mon Nov 06, 2006 1:09 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Mon Nov 06, 2006 1:38 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber