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.000000000 +0000
+++ reiser4progs-1.1.0/debian/rules 2016-11-18 12:20:29.120912425 +0000
@@ -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`