Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 324899 - dev-libs/glib-2.22.5 fails to build on hardened ppc64: glib-2.6.3-testglib-ssp.patch fails to apply
Summary: dev-libs/glib-2.22.5 fails to build on hardened ppc64: glib-2.6.3-testglib-s...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: PPC64 Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2010-06-21 02:44 UTC by Anthony Basile
Modified: 2010-09-08 20:59 UTC (History)
1 user (show)

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


Attachments
Add -fno-stack-protector to CFLAGS in glibs' tests/Makefile.in (glib-testglib-ssp.patch,356 bytes, patch)
2010-06-21 02:50 UTC, Anthony Basile
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Basile gentoo-dev 2010-06-21 02:44:59 UTC
When emerging glib-2.6.3-testglib-ssp.patch fails to apply.  The ebuild conditionally applies the patch in src_prepare() only for hardened ppc64:

    if use ppc64 && use hardened ; then
        replace-flags -O[2-3] -O1
        epatch "${FILESDIR}/glib-2.6.3-testglib-ssp.patch"
    fi

The patch tries to replace one line in test/Makefile.in, but

    -CFLAGS = @CFLAGS@
    +CFLAGS = @CFLAGS@ -fno-stack-protector

but doesn't correctly match and so fails.  (Its probably an ancient patch for glib-2.6.3.  The line has moved from line 50 to line 446 in glib-2.22.4.)

Reproducible: Always

Steps to Reproduce:
1. Make sure you're using hardened/linux/powerpc/ppc64/10.0/64bit-userland
2. Make sure you're using powerpc64-unknown-linux-gnu-4.4.4
3. emerge glib
Comment 1 Anthony Basile gentoo-dev 2010-06-21 02:50:01 UTC
Created attachment 236115 [details, diff]
Add -fno-stack-protector to CFLAGS in glibs' tests/Makefile.in

This patch does exactly what the original did, but applies correctly.
Comment 2 Anthony Basile gentoo-dev 2010-08-17 11:13:42 UTC
Same issue with 2.22.5.
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2010-08-19 13:03:27 UTC
Is the patch still needed btw ?
Comment 4 Anthony Basile gentoo-dev 2010-08-19 18:06:12 UTC
(In reply to comment #3)
> Is the patch still needed btw ?

Good call.  I just assumed that it still needed ssp off.  Actually I tried the following change and it compiled and linked fine with some gnome apps that use libglib-2.0.so.0.

--- glib-2.22.5.ebuild.orig	2010-08-14 12:35:59.000000000 -0400
+++ glib-2.22.5.ebuild	2010-08-19 17:38:37.000000000 -0400
@@ -26,11 +26,6 @@
 		~app-text/docbook-xml-dtd-4.1.2 )"
 
 src_prepare() {
-	if use ppc64 && use hardened ; then
-		replace-flags -O[2-3] -O1
-		epatch "${FILESDIR}/glib-2.6.3-testglib-ssp.patch"
-	fi
-
 	if use ia64 ; then
 		# Only apply for < 4.1
 		local major=$(gcc-major-version)

Comment 5 Pacho Ramos gentoo-dev 2010-09-03 19:15:56 UTC
Could you please test directly with glib-2.24?
Comment 6 Gilles Dartiguelongue (RETIRED) gentoo-dev 2010-09-08 20:59:31 UTC
+  08 Sep 2010; Gilles Dartiguelongue <eva@gentoo.org> glib-2.20.5-r1.ebuild,
+  glib-2.22.4.ebuild, glib-2.22.5.ebuild, glib-2.24.1-r1.ebuild,
+  glib-2.24.2.ebuild:
+  Drop ppc64 hardened patch, closes #324899.

Dropped the patch per comment #4. Thanks for reporting.