Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 360675 - net-im/prosody-0.7.0 should use gcc as linker
Summary: net-im/prosody-0.7.0 should use gcc as linker
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Dirkjan Ochtman (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-27 00:30 UTC by René 'Necoro' Neumann
Modified: 2011-05-02 16:55 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
prosody-0.7.0.ebuild.diff (prosody-0.7.0.ebuild.diff,439 bytes, patch)
2011-03-27 00:30 UTC, René 'Necoro' Neumann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description René 'Necoro' Neumann 2011-03-27 00:30:43 UTC
Created attachment 267335 [details, diff]
prosody-0.7.0.ebuild.diff

Compiling prosody-0.7.0 on a hardened x86 system fails with:

hashes.o: In function `toHex':
hashes.c:(.text+0xa2): undefined reference to `__stack_chk_fail_local'
hashes.o: In function `Lsha1':
hashes.c:(.text+0x183): undefined reference to `__stack_chk_fail_local'
hashes.o: In function `Lsha256':
hashes.c:(.text+0x267): undefined reference to `__stack_chk_fail_local'
hashes.o: In function `Lmd5':
hashes.c:(.text+0x34b): undefined reference to `__stack_chk_fail_local'
hashes.o: In function `luaopen_util_hashes':
hashes.c:(.text+0x3f6): undefined reference to `__stack_chk_fail_local'
i686-pc-linux-gnu-ld: hashes.so: hidden symbol `__stack_chk_fail_local' isn't defined
i686-pc-linux-gnu-ld: final link failed: Nonrepresentable section on output

This failure is similar to bug #325849 and the problem details itself are described in bug #326285.

From the latter I get, that not "ld" but "gcc" should be used for linking. This is also the default in prosody.

Unfortunately, this is overwritten in the ebuild by explicitly specifiying a linker with tc-getLD, which (as the name states) sets ld as linker. This should be changed to tc-getCC.

Patch attached.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2011-03-29 22:32:08 UTC
Looks good.

Note that you should also document (in the ebuild) why ./configure is used instead of econf.
Comment 2 René 'Necoro' Neumann 2011-03-30 13:47:48 UTC
I added a comment in the diff at bug #336985 ...
Comment 3 Dirkjan Ochtman (RETIRED) gentoo-dev 2011-05-02 16:55:56 UTC
This has been fixed in prosody-0.8.0.