Thursday, November 27, 2008

__stack_chk_fail_local

So there I was, trying to build SPIKE in an Ubuntu 8.10 VM. GCC gave about 9,000 warnings, then said something like this:

/usr/bin/ld: (blahblahblah): hidden symbol `__stack_chk_fail_local' in /usr/lib/libc_nonshared.a(stack_chk_fail_local.oS) is referenced by DSO

Since it took me longer than 10 minutes to find the solution, I'm posting it here. The solution is to manually edit the Makefile and add "-fno-stack-protector" to the CFLAGS. Then make clean; make. The end. Happy Thanksgiving.