#8931: perl fails to build with gcc4 - multiple definition of `__stack_chk_fail_local' -------------------------+---------------------------- Reporter: scottmc | Owner: nobody Type: bug | Status: new Priority: normal | Milestone: R1/beta1 Component: - General | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 0 | Platform: All -------------------------+---------------------------- Comment (by jprostko): Diger on IRC let me know of a fix to this issue (which also affects building CUPS). The suggested fix basically comes down to changing http://cgit.haiku- os.org/buildtools/tree/gcc/gcc/gcc.c#n606 from #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector- all:-lssp_nonshared -lssp}" to #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp}" (In other words, getting rid of -lssp_nonshared from the link line). I then took this suggestion, and locally have instead applied it to http://cgit.haiku-os.org/buildtools/tree/gcc/gcc/config/haiku.h as: {{{ #ifndef TARGET_LIBC_PROVIDES_SSP #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all:-lssp}" #endif }}} By doing it this way, the change is cleaner, as it's not touching any core GCC files. It seems to work, although I suppose there's a chance for side effects. I am yet to build Perl and see what happens, but hope to later tonight. This all said, I'm still not sure why the multiple definition happens in the first place. Perhaps something is getting pulled in from our libroot sources unintentionally? I admit I only did a cursory investigation up to this point, and probably should do more digging. So yes, I can apply my above-mentioned fix (and produce another GCC package), although I don't know currently if that's just kind of a bandage for an underlying issue, and should be handled in a different manner. If it's an accepted way to handle this issue, I can apply it pretty much whenever, as long as initial testing indicates things are well. Whether we want it done for R1A4 or not though should probably be discussed. -- Ticket URL: <http://dev.haiku-os.org/ticket/8931#comment:7> Haiku <http://dev.haiku-os.org> Haiku - the operating system.