Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 289685

Summary: [patch] fix dev-lang/perl ebuild for uclibc -fstack-protector causes segfault
Product: Gentoo Linux Reporter: dougztr <doug>
Component: [OLD] DevelopmentAssignee: Gentoo Perl team <perl>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Comments out parts of perl's Configure script which cause the segfaults
[ebuild R ] dev-lang/perl-5.10.1-r12 USE="-berkdb -debug -doc -gdbm -ithreads"
This is the complete build log which shows what happens without the patch

Description dougztr 2009-10-19 08:51:22 UTC
When compiling perl-5.10.1 on a uclibc system, the ebuild fails because perl's Configure adds -fstack-protector to the linker flags. This causes miniperl to segfault and the emerge stops.

This cannot be resolved by passing options to Configure, so I have provided a patch which fixes the issue. The patch should probably only be applied if the elibc_uclibc USE flag is detected in the ebuild.

Reproducible: Always

Steps to Reproduce:
1. emerge perl

Actual Results:  
miniperl segfaults and the emerge aborts

Expected Results:  
emerged and installed

Patch follows...
Comment 1 dougztr 2009-10-19 08:52:32 UTC
Created attachment 207539 [details, diff]
Comments out parts of perl's Configure script which cause the segfaults
Comment 2 Torsten Veller (RETIRED) gentoo-dev 2009-10-19 15:04:52 UTC
Can you please paste the part where it fails?
Comment 3 dougztr 2009-10-20 12:21:50 UTC
Created attachment 207666 [details]
[ebuild   R   ] dev-lang/perl-5.10.1-r12  USE="-berkdb -debug -doc -gdbm -ithreads"
Comment 4 dougztr 2009-10-20 12:29:31 UTC
Created attachment 207667 [details]
This is the complete build log which shows what happens without the patch

I was told by a developer on #gentoo-embedded that this particular issue is related to https://bugs.gentoo.org/149292 and might better be corrected with the associated 50_all_gcc44_no_ssp_tls_uclibc.patch
Comment 5 Torsten Veller (RETIRED) gentoo-dev 2009-10-22 06:46:45 UTC
(In reply to comment #4)
> I was told by a developer on #gentoo-embedded that this particular issue is
> related to https://bugs.gentoo.org/149292 and might better be corrected with
> the associated 50_all_gcc44_no_ssp_tls_uclibc.patch

Do I get it right: this means we don't have to change the perl ebuild?
Comment 6 dougztr 2009-10-22 23:20:53 UTC
I tested the 50_all_gcc44_no_ssp_tls_uclibc.patch and it did indeed resolve the issue, so I would suggest rather to patch gcc if "use elibc_uclibc" is detected because it would in theory fix any other programs which also use the -fstack-protector switch instead of just fixing issues with the Perl package.