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.

make - undefined reference

General support and discussion of Eggdrop bots.
Post Reply
r
rix
Halfop
Posts: 42
Joined: Wed Sep 21, 2005 1:04 pm
Location: Estonia

make - undefined reference

Post by rix »

Hello!

I just completed installing software on my new server (Ubuntu server 6.06), but unfortunately Eggdrop installation process fails at linking.

"Configure", "make config" are successful. Make always stops with "/usr/lib/libtcl8.4.so: undefined reference to `__stack_chk_fail@GLIBC_2.4'".

Output of make:

Code: Select all

You can now compile the bot, using "make".

rix@ubuntu:~/eggdrop1.6.17$ make
make[1]: Entering directory `/home/rix/eggdrop1.6.17/src'
This may take a while. Go get some runts.

gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c bg.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c botcmd.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c botmsg.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c botnet.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c chanprog.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c cmds.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c dcc.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c dccutil.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c dns.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c flags.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c language.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c match.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   \
'-DCCFLAGS="gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H  "' \
'-DLDFLAGS="gcc -pipe"' \
'-DSTRIPFLAGS="touch"' -c ./main.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c mem.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c misc.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c misc_file.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c modules.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c net.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c rfc1459.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c tcl.c
tcl.c:492: warning: dereferencing type-punned pointer will break strict-aliasing rules
tcl.c: In function âreadtclprogâ:
tcl.c:741: warning: assignment discards qualifiers from pointer target type
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c tcldcc.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c tclhash.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c tclmisc.c
tclmisc.c: In function âtcl_md5â:
tclmisc.c:688: warning: pointer targets in assignment differ in signedness
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c tcluser.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c userent.c
userent.c: In function âdel_entry_typeâ:
userent.c:1135: warning: dereferencing type-punned pointer will break strict-aliasing rules
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c userrec.c
gcc -pipe -g -O2 -Wall -I.. -I.. -DHAVE_CONFIG_H   -c users.c
make[2]: Entering directory `/home/rix/eggdrop1.6.17/src/md5'
gcc -pipe -g -O2 -Wall -I. -I../.. -I../.. -I../../src -DHAVE_CONFIG_H   -c md5c.c
make[2]: Leaving directory `/home/rix/eggdrop1.6.17/src/md5'
make[2]: Entering directory `/home/rix/eggdrop1.6.17/src/compat'
gcc -pipe -g -O2 -Wall -I../.. -I../.. -I../../src -DHAVE_CONFIG_H   -c inet_aton.c
gcc -pipe -g -O2 -Wall -I../.. -I../.. -I../../src -DHAVE_CONFIG_H   -c snprintf.c
gcc -pipe -g -O2 -Wall -I../.. -I../.. -I../../src -DHAVE_CONFIG_H   -c memset.c
gcc -pipe -g -O2 -Wall -I../.. -I../.. -I../../src -DHAVE_CONFIG_H   -c memcpy.c
gcc -pipe -g -O2 -Wall -I../.. -I../.. -I../../src -DHAVE_CONFIG_H   -c strcasecmp.c
gcc -pipe -g -O2 -Wall -I../.. -I../.. -I../../src -DHAVE_CONFIG_H   -c strftime.c
make[2]: Leaving directory `/home/rix/eggdrop1.6.17/src/compat'

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

Linking eggdrop (standard build).

gcc -pipe -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/usr/lib -ltcl8.4 -lm -ldl -lnsl  md5/md5c.o compat/*.o `cat mod/mod.xlibs`
/usr/lib/libtcl8.4.so: undefined reference to `__stack_chk_fail@GLIBC_2.4'
collect2: ld returned 1 exit status
make[1]: *** [../eggdrop] Error 1
make[1]: Leaving directory `/home/rix/eggdrop1.6.17/src'
make: *** [modegg] Error 2
rix@ubuntu:~/eggdrop1.6.17$
Tcl is 8.4, same happens with other versions of Eggdrop.

Any help would be appreciated. :)
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

A quick google search on the macro thats causing the error reveals:

http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01965.html

Apparently a known bug in newer versions of gcc.. Either try the patch provided yourself (in other words, compile gcc) or see if ubuntu has fixed it yet and install an updated package, cos ubuntu must also be aware of the problem, there's discussion about it on their forums.
Post Reply