Issue 127139

Summary: undefined reference to `__stack_chk_fail' breaks build on some Linux 32-bit systems
Product: General Reporter: Ariel Constenla-Haile <arielch>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P5 (lowest) CC: damjan
Version: 4.1.2Flags: arielch: 4.1.4_release_blocker+
Target Milestone: 4.1.4   
Hardware: All   
OS: Linux 32-bit   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
trunk log from the buildbot
none
branch AOO413 log from the build bot none

Description Ariel Constenla-Haile 2016-09-27 07:16:06 UTC
trunk and branch AOO413 build is breaking in the buildbot bb_slave5_ubuntu, system  is Ubuntu 14.04 32 bit

[ build LNK ] Library/passwordcontainer.uno.so

/usr/lib/i386-linux-gnu/libc_nonshared.a(stack_chk_fail_local.oS): In function `__stack_chk_fail_local':
(.text+0x10): undefined reference to `__stack_chk_fail'
collect2: error: ld returned 1 exit status


Also reported on http://mail-archives.apache.org/mod_mbox/openoffice-dev/201609.mbox/%3CCAO2mRzbLxruV7s%2BnKtetZQkotEdUpfZpew_8VPwDysZTTym6YQ%40mail.gmail.com%3E

System Linux Mint 17.1
Comment 1 Ariel Constenla-Haile 2016-09-27 07:16:58 UTC
Created attachment 85697 [details]
trunk log from the buildbot
Comment 2 Ariel Constenla-Haile 2016-09-27 07:18:00 UTC
Created attachment 85698 [details]
branch AOO413 log from the build bot
Comment 3 SVN Robot 2016-10-25 03:52:57 UTC
"arielch" committed SVN revision 1766467 into trunk:
i127139 - Work around broken toolchain
Comment 4 Ariel Constenla-Haile 2016-10-25 11:46:57 UTC
trunk build was successful https://ci.apache.org/builders/openoffice-linux32-nightly/builds/429
Comment 5 SVN Robot 2016-10-25 11:47:20 UTC
"arielch" committed SVN revision 1766518 into branches/AOO414:
i127139 - Work around broken toolchain
Comment 6 damjan 2016-12-17 15:38:13 UTC
With more modules ported to gbuild, the build on 32 bit Ubuntu 14.04 now also breaks in (at least) main/embeddedobj and main/uui.

It's not clear to me why. I've found 2 workarounds:
* adding "-lc" to the linker command (but why isn't libc linked to by default?)
* adding "-fuse-ld=gold" to the linker command (but the gold and bfd linkers are meant to be identical, differing only in performance and supported platforms)

Also why do most gbuild modules link, and only a few fail :-( ?
Comment 7 SVN Robot 2016-12-18 05:10:21 UTC
"damjan" committed SVN revision 1774848 into trunk:
#i127139# undefined reference to `__stack_chk_fail' breaks build on some Linu...
Comment 8 damjan 2016-12-18 05:13:02 UTC
I've added a workaround to gbuild for now, that should fix this on Linux, for all gbuild modules. It doesn't leave me very happy, so I am leaving this issue open.
Comment 9 Ariel Constenla-Haile 2016-12-19 23:41:40 UTC
(In reply to damjan from comment #8)
> I've added a workaround to gbuild for now, that should fix this on Linux,
> for all gbuild modules. It doesn't leave me very happy, so I am leaving this
> issue open.

It would be interesting to compare the compiler and linker switches before and after porting to gbuild, as the old dmake does not show this bug, it's only a gbuild thing.
Comment 10 Ariel Constenla-Haile 2017-02-01 17:04:50 UTC
Though the real reason is still unknown, this is marked as release blocker, so it has to be resolved as fixed.