[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#825110: ppc64 patch for yaboot FTBFS and e2fslibs1.41-dev

On Tue, May 31, 2016 at 09:17:20AM -0400,  wrote:
> On Tue, May 31, 2016 at 02:07:31PM +0200, Mathieu Malaterre wrote:
> > I understand your point for ppc64el, but since `yaboot` gets build on
> > ppc64, some users may break their systems...
> According to buildd, it fails to build on ppc64 (not surprising since
> it requires 32bit static libraries to link).  yaboot does not currently
> exist in the archive for anything other than 32bit powerpc.  So there
> is no reason for it to even attempt to build on 64bit.

Well in case anyone wants to try and fix it, these patches seem to fix
yaboot build on ppc64:

diff -urN yaboot-1.3.17.orig/debian/control yaboot-1.3.17/debian/control
--- yaboot-1.3.17.orig/debian/control	2015-11-02 02:54:41.000000000 +0000
+++ yaboot-1.3.17/debian/control	2016-06-06 15:36:46.000000000 +0000
@@ -3,7 +3,7 @@
 Priority: important
 Maintainer: Debootloaders Yaboot Maintainers Team <debootloaders-yaboot@lists.alioth.debian.org>
 Uploaders: Aurélien GÉRÔME <ag@debian.org>, Milan Kupcevic <milan@debian.org>
-Build-Depends: debhelper (>= 9), e2fslibs1.41-dev
+Build-Depends: debhelper (>= 9), e2fslibs1.41-dev, libc6-dev-powerpc [ppc64]
 Standards-Version: 3.9.6
 Homepage: http://yaboot.ozlabs.org

diff -urN e2fsprogs1.41-1.41.14.orig/debian/rules e2fsprogs1.41-1.41.14/debian/rules
--- e2fsprogs1.41-1.41.14.orig/debian/rules	2015-11-02 02:20:29.000000000 +0000
+++ e2fsprogs1.41-1.41.14/debian/rules	2016-06-06 15:56:42.000000000 +0000
@@ -4,6 +4,7 @@
 export DEB_BUILD_MAINT_OPTIONS=hardening=-stackprotector
 export DEB_CFLAGS_MAINT_APPEND=-fgnu89-inline -fno-builtin-malloc
+export CC:=$(CC) -m32
 	dh $@  --with autotools-dev
@@ -11,10 +12,18 @@
 	dh_auto_install --destdir=debian/tmp -- install-libs
+	dh_auto_build -- libs
 	rm -f asm_types.h public_config.h
+	dh_auto_configure -- --host=powerpc-linux-gnu --target=powerpc-linux-gnu
 	wget http://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/1.41.14/e2fsprogs-1.41.14.tar.gz \
 	     -O e2fsprogs1.41_1.41.14.orig.tar.gz

The fix is that since yaboot is always built 32bit, then on ppc64 we
better build-dep on the 32bit libc headers and stuff, and when building
the e2fslibs it has to be built 32bit, not 64bit, since yaboot is the
only user and it is building 32bit.  While at it I made it stop building
all the other crap that wasn't actually being packaged since it was
taking too long to build.

I am not entirely pleased with the CC variable as a way to pass the
-m32 needed, but it seems to work.  Maybe someone can see a cleaner way
(maybe the configure command somehow) to do that.

I would have sent this to bug 322540 since that is the ppc64 yaboot
bug, but for some reason it is closed and archived even though it never
actually worked and was never actually built on ppc64.  That seems like
a mistake.

Len Sorensen

Reply to: