Bug 35377 - stack-protector: multiple definition of `__stack_chk_fail_local'
Summary: stack-protector: multiple definition of `__stack_chk_fail_local'
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 4.4.5
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2008-02-26 11:34 UTC by Gabor Z. Papp
Modified: 2010-10-01 17:47 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Z. Papp 2008-02-26 11:34:50 UTC
I was compiled and installed gcc-4.2.3 on Linux 2.4, glibc 2.3.6

main configure options was:


After successfully compile and install got some problems when compiling apps
using the -fstack-protector option:

Linking C executable at-parser
/pkg/lib/gcc/i686-pc-linux-gnu/4.2.3/../../../libssp.a(ssp.o): In function `__stack_chk_fail_local':
/home/gzp/src/gcc-4.2.3/obj/i686-pc-linux-gnu/libssp/../../../libssp/ssp.c:175: multiple definition of `__stack_chk_fail_local'
/pkg/lib/gcc/i686-pc-linux-gnu/4.2.3/../../../libssp_nonshared.a(libssp_nonshared_la-ssp-local.o):/home/gzp/src/gcc-4.2.3/obj/i686-pc-linux-gnu/libssp/../../../libssp/ssp-local.c:48: first defined here
collect2: ld returned 1 exit status
make[3]: *** [tests/at-parser] Error 1

libssp present only in static format, as libssp_nonshared.
Comment 1 Gabor Z. Papp 2008-12-27 09:11:28 UTC
ping, the problem still exist, due the combinations of the configure options (static vs shared)
Comment 2 Gabor Z. Papp 2010-10-01 17:47:57 UTC
Changing in gcc/gcc.c

#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp_nonshared -lssp}"


#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp}"

solved the problem.