7.10调用TclCL库时在__do_global_dtors_aux出现段错误

其它类软件,非上述版软件
回复
athody
帖子: 9
注册时间: 2006-08-04 16:57

7.10调用TclCL库时在__do_global_dtors_aux出现段错误

#1

帖子 athody » 2008-04-07 11:22

在unbuntu7.10下编译安装了OTCL和TclCL(otcl-tclcl.sourceforge.net), configure & make & make install都正常。
但是调用了TclCL库的程序在初始化的时候就出现段错误,gdb报告是在__do_global_dtors_aux出现的错误, 连接时用的参数为
gcc -shared blabla.o -ltcl8.4 -lotcl -ltclcl
大致这个样子,编译连接都没有问题
运行时:
(gdb) r
Starting program: /home/athody/bin/destclsh

Program received signal SIGSEGV, Segmentation fault.
0x800286d6 in __do_global_dtors_aux ()
(gdb) back
#0 0x800286d6 in __do_global_dtors_aux ()
(gdb)

原来在6.06上一切正常的,且连接的时候不需要-shared参数,但在7.10上如果不使用-shared参数就会有
/usr/bin/ld: ./simulations/destclsh: hidden symbol `__stack_chk_fail_local' in /usr/lib/libc_nonshared.a(stack_chk_fail_local.oS) is referenced by DSO
不知道是否和这个有关。
回复