Bug#844739: partclone FTBFS on mips and mipsel: reiser4progs need to be recompiled with -fPIC

2016-11-18 Thread Felix Zielcke
Am Freitag, den 18.11.2016, 16:54 +0100 schrieb Felix Zielcke:

> First it applies cleanly and then it complains.
> I don't get why. Quilt push works cleanly and quilt refresh does
> nothing.
> Do you have an idea why this patch makes problems? The other 2 work
> fine.

Ok silly me. I don't need a patch file for this anyway.

> Regards
> Felix



Bug#844739: partclone FTBFS on mips and mipsel: reiser4progs need to be recompiled with -fPIC

2016-11-18 Thread Felix Zielcke
Am Freitag, den 18.11.2016, 15:17 + schrieb Radovan Birdic:
> I have created and attached a patch that adds -fPIC flag and resolves
> this issue.
> With this patch package builds successfully on mips, mipsel, mips64el
> and i386 architectures.
> 
> Regards,
> Radovan

Hi Radovan,

thanks for the patches. But unfortunately debuild fails with it:

[...]
dpkg-source: info: applying fix_ldconfig.patch
dpkg-source: info: applying 05_libreiser4~profile.c.patch
dpkg-source: info: applying add-fPIC-for-mips.patch
 fakeroot debian/rules clean
[...]
dpkg-source: info: building reiser4progs using existing
./reiser4progs_1.1.0.orig.tar.gz
patching file debian/rules
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored
dpkg-source: info: the patch has fuzz which is not allowed, or is
malformed
dpkg-source: info: if patch 'add-fPIC-for-mips.patch' is correctly
applied by quilt, use 'quilt refresh' to update it
dpkg-source: error: LC_ALL=C patch -t -F 0 -N -p1 -u -V never -E -b -B
.pc/add-fPIC-for-mips.patch/ --reject-file=- < reiser4progs-
1.1.0.orig.DC8bmd/debian/patches/add-fPIC-for-mips.patch gave error
exit status 1
dpkg-buildpackage: error: dpkg-source -b reiser4progs-1.1.0 gave error
exit status 2

First it applies cleanly and then it complains.
I don't get why. Quilt push works cleanly and quilt refresh does
nothing.
Do you have an idea why this patch makes problems? The other 2 work
fine.

Regards
Felix



Bug#844739: partclone FTBFS on mips and mipsel: reiser4progs need to be recompiled with -fPIC

2016-11-18 Thread Radovan Birdic
Package: reiser4progs
Version: 1.1.0-2
Severity: important
Tags: sid + patch
Justification: FTBFS
User: debian-m...@lists.debian.org
Usertags: mips-patch


Package partclone_0.2.89-1 FTBFS on mips and mipsel with following error:

> /usr/bin/ld: 
> /usr/lib/gcc/mipsel-linux-gnu/6/../../../../lib/libreiser4.a(libreiser4_la-bitmap.o):
>  relocation R_MIPS_HI16 against `__gnu_local_gp' can not be used when making 
> a shared object; recompile with -fPIC
> /usr/lib/gcc/mipsel-linux-gnu/6/../../../../lib/libreiser4.a: error adding 
> symbols: Bad value
> collect2: error: ld returned 1 exit status
> Makefile:1058: recipe for target 'partclone.reiser4' failed
> make[3]: *** [partclone.reiser4] Error 1

The problem occurs because -fPIC flag is not used during reiser4progs build.

I have created and attached a patch that adds -fPIC flag and resolves this 
issue.
With this patch package builds successfully on mips, mipsel, mips64el and i386 
architectures.

Regards,
Radovan--- reiser4progs-1.1.0_orig/debian/rules	2014-07-19 15:00:54.0 +
+++ reiser4progs-1.1.0/debian/rules	2016-11-18 12:20:29.120912425 +
@@ -25,7 +25,14 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_
 endif
 
 export DEB_BUILD_MAINT_OPTIONS=hardening=-format
-export DEB_CFLAGS_MAINT_APPEND = -I$(CURDIR)
+
+DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+ifneq (,$(filter $(DEB_BUILD_ARCH),mips mipsel))
+	export DEB_CFLAGS_MAINT_APPEND = -I$(CURDIR) -fPIC
+else
+	export DEB_CFLAGS_MAINT_APPEND = -I$(CURDIR)
+endif
+
 CFLAGS = `dpkg-buildflags --get CFLAGS`
 CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
 LDFLAGS = `dpkg-buildflags --get LDFLAGS`