| View previous topic :: View next topic |
| Author |
Message |
jlewing Voice
Joined: 17 Jan 2006 Posts: 5
|
Posted: Tue Jan 17, 2006 6:58 pm Post subject: Solaris 10, eggdrop 1.6.17, tcl 8.4.12 - undefined symbol |
|
|
A mysterious has popped up that I cannot seem to get rid of. This is eggdrop 1.6.17 being compiled on Solaris 10 using Sun Studio 11. I've submitted the output from compiling but the focus is only on these few lines:
...when compiling...
"./main.c", line 1104: warning: static function called but not defined: garbage_collect_tclhash()
"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()
...and when linking, of course...
Undefined first referenced
symbol in file
open_listen modules.o
garbage_collect_tclhash main.o
ld: fatal: Symbol referencing errors. No output written to ../eggdrop
*** Error code 1
Any ideas?
The complete output
---------------------------------------------------------------------------
This may take a while. Go get some runts.
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c bg.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c botcmd.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c botmsg.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c botnet.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c chanprog.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c cmds.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c dcc.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c dccutil.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c dns.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c flags.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c language.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c match.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H \
'-DCCFLAGS="cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -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 -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c mem.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c misc.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c misc_file.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -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 -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c net.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c rfc1459.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c tcl.c
"tcl.c", line 741: warning: assignment type mismatch:
pointer to char "=" pointer to const char
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c tcldcc.c
"tcldcc.c", line 1161: warning: static function called but not defined: open_listen()
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c tclhash.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c tclmisc.c
"tclmisc.c", line 688: warning: assignment type mismatch:
pointer to char "=" pointer to unsigned char
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c tcluser.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c userent.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c userrec.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I.. -I.. -DHAVE_CONFIG_H -c users.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I. -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c md5c.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c inet_aton.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c snprintf.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c memset.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c memcpy.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c strcasecmp.c
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c strftime.c
---------- Yeah! That's the compiling, now the linking! ----------
Linking eggdrop (standard build).
cc
cc -D_REENTRANT -xtarget=ultra -xarch=v9 -xO5 -xstrconst -Xa -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/eggheads.org/eggdrop/1.6.17/lib -ltcl8.4 -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
ld: fatal: Symbol referencing errors. No output written to ../eggdrop
*** Error code 1
make: Fatal error: Command failed for target `../eggdrop'
Current working directory /export/root/source/eggdrop1.6.17/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/eggheads.org/eggdrop/1.6.17/lib' 'TCLLIBFN=tcl8.4.so' 'XREQS=/opt/eggheads.org/eggdrop/1.6.17/lib/libtcl8.4.so' 'XLIBS=-L/opt/eggheads.org/eggdrop/1.6.17/lib -ltcl8.4 -lm -ldl -lnsl -lsocket' 'EGGEXEC=eggdrop' 'EGGBUILD=(standard build)' 'MODOBJS=' eggdrop
make: Fatal error: Command failed for target `modegg'
# |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Wed Jan 18, 2006 1:08 am Post subject: |
|
|
what did you do to your Makefile?
get rid of that -xO5, leave default optimization _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
jlewing Voice
Joined: 17 Jan 2006 Posts: 5
|
Posted: Wed Jan 18, 2006 11:21 am Post subject: |
|
|
I used our default profile, which is setup for applications that take can use the higher optimization. I meant to remove that.
So the flags set now are only -xtarget=ultra -xarch=v9 -Xa. The tcl library on this system is 64-bit so the xtarget and xarch have to stay. The Xa just forces the system to use it's default ANSI conformance (ask our head of programming because i don't understand that logic).
The only thing that's added to the Makefile is $(LDFLAGS) on the linking line which adds -xtarget=ultra -xarch=v9 -Xa so that it will link properly.
And the results:
You can now compile the bot, using "make".
This may take a while. Go get some runts.
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c bg.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c botcmd.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c botmsg.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c botnet.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c chanprog.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c cmds.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c dcc.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c dccutil.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c dns.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c flags.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c language.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c match.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H \
'-DCCFLAGS="cc -xtarget=ultra -xarch=v9 -Xa -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 -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c mem.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c misc.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c misc_file.c
cc -xtarget=ultra -xarch=v9 -Xa -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 -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c net.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c rfc1459.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c tcl.c
"tcl.c", line 741: warning: assignment type mismatch:
pointer to char "=" pointer to const char
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c tcldcc.c
"tcldcc.c", line 1161: warning: static function called but not defined: open_listen()
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c tclhash.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c tclmisc.c
"tclmisc.c", line 688: warning: assignment type mismatch:
pointer to char "=" pointer to unsigned char
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c tcluser.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c userent.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c userrec.c
cc -xtarget=ultra -xarch=v9 -Xa -I.. -I.. -DHAVE_CONFIG_H -c users.c
cc -xtarget=ultra -xarch=v9 -Xa -I. -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c md5c.c
cc -xtarget=ultra -xarch=v9 -Xa -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c inet_aton.c
cc -xtarget=ultra -xarch=v9 -Xa -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c snprintf.c
cc -xtarget=ultra -xarch=v9 -Xa -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c memset.c
cc -xtarget=ultra -xarch=v9 -Xa -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c memcpy.c
cc -xtarget=ultra -xarch=v9 -Xa -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c strcasecmp.c
cc -xtarget=ultra -xarch=v9 -Xa -I../.. -I../.. -I../../src -DHAVE_CONFIG_H -c strftime.c
---------- Yeah! That's the compiling, now the linking! ----------
Linking eggdrop (standard build).
cc
cc -xtarget=ultra -xarch=v9 -Xa -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/eggheads.org/eggdrop/1.6.17/lib -ltcl8.4 -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 /export/root/source/eggdrop1.6.17/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/eggheads.org/eggdrop/1.6.17/lib' 'TCLLIBFN=tcl8.4.so' 'XREQS=/opt/eggheads.org/eggdrop/1.6.17/lib/libtcl8.4.so' 'XLIBS=-L/opt/eggheads.org/eggdrop/1.6.17/lib -ltcl8.4 -lm -ldl -lnsl -lsocket' 'EGGEXEC=eggdrop' 'EGGBUILD=(standard build)' 'MODOBJS=' eggdrop
make: Fatal error: Command failed for target `modegg'
# |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Thu Jan 19, 2006 1:02 am Post subject: |
|
|
I don't use Solaris but I'd guess that problem has something to do with inlining; the Sun C compiler might be somehow confused by that; try to remove all inline specifiers in eggdrop sources (or use gcc)
I might be wrong but still, give it a try _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
jlewing Voice
Joined: 17 Jan 2006 Posts: 5
|
Posted: Sat Jan 21, 2006 9:45 pm Post subject: |
|
|
Well, I got the garbage error to go away... first was the removal of inlining from the tclhash.c and tclhash.h files, and second was to include tclhash.h in main.c
The second error is a little more complicated as there is no net.h file included with 1.6.17, so I can't easily reference net.h from modules.c
Does anyone have a net.h file for 1.6.17? |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sat Jan 21, 2006 10:49 pm Post subject: |
|
|
what's the second error? _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
jlewing Voice
Joined: 17 Jan 2006 Posts: 5
|
Posted: Sun Jan 22, 2006 12:56 pm Post subject: |
|
|
"modules.c", line 1155: warning: static function called but not defined: open_listen()
Undefined first referenced
symbol in file
open_listen modules.o
open_listen is defined in net.c, but there is no net.h referenced by modules.c |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Jan 22, 2006 2:21 pm Post subject: |
|
|
did you remove the inline specifier of open_listen() in proto.h and net.c? if not, do so
and there is no net.h, I don't know where you got your eggdrop sources, but there is no net.h in standard distribution, and no references to it _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
jlewing Voice
Joined: 17 Jan 2006 Posts: 5
|
Posted: Sun Jan 22, 2006 3:14 pm Post subject: |
|
|
The fact there is no net.h is the point I was trying to make. I apologize, I didn't see the open_listen in proto.h. I did remove the inline from net.c. I'll reference proto.h and see what happens...
and the results are...
with some minor Makefile edits to include $(LDFLAGS) in the mod/*/Makefile's, everything seems to have compiled fine. I had to add the libtcl path to LD_LIBRARY_PATH to get ldd on all the files to check out but I can deal with that in the startup/shutdown script to avoid making it permanent in the /etc files.
Onto testing... |
|
| Back to top |
|
 |
|
|
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
|
|