Package: aspectc++
Version: 1:2.1-2
Severity: important
Tags: sid + patch
Justification: FTBFS
User: debian-m...@lists.debian.org
Usertags: mips-patch


Package undertaker_1.6.1-3 FTBFS on mips and mipsel with following error:

> /usr/bin/ld: 
> /usr/lib/gcc/mipsel-linux-gnu/6/../../../../lib/libPuma.a(PreMacro.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/libPuma.a: error adding 
> symbols: Bad value
> collect2: error: ld returned 1 exit status
> <builtin>: recipe for target 'undertaker' failed
> make[4]: *** [undertaker] Error 1

The problem occurs because -fPIC flag is not used during aspectc++ 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 architectures.

Regards,
Radovan
--- aspectc++-2.1_orig/debian/rules	2016-10-07 23:22:54.000000000 +0000
+++ aspectc++-2.1/debian/rules	2016-11-23 12:00:52.181590896 +0000
@@ -40,6 +40,11 @@ ifeq ($(DEB_HOST_ARCH),armhf)
 	CFLAGS := -Wall -O1 -g
 endif
 
+DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+ifneq (,$(filter $(DEB_BUILD_ARCH),mips mipsel))
+	CFLAGS += -fPIC
+endif
+
 export CFLAGS
 PUMA_CONFIG=$(CURDIR)/puma.config
 

Reply via email to