Package: quantlib-swig
Version: 1.4-1
Tags: sid patch
Severity: important
Justification: FTBFS
User: debian-m...@lists.debian.org
Usertags: mips-patch



Package quantlib-swig FTBFS on mips/mipsel with an error:

> g++ -shared -Wl,-z,relro -O0 -g0 
> build/temp.linux-mips64-2.7/QuantLib/quantlib_wrap.o -lQuantLib -o 
> build/lib.linux-mips64-2.7/QuantLib/_QuantLib.so
> build/temp.linux-mips64-2.7/QuantLib/quantlib_wrap.o: In function 
> `SWIG_PackDataName':
> quantlib_wrap.cpp:(.text+0x10b0): relocation truncated to fit: R_MIPS_CALL16 
> against `strncpy@@GLIBC_2.0'
> build/temp.linux-mips64-2.7/QuantLib/quantlib_wrap.o: In function 
> `SWIG_Python_ErrorType(int)':
> quantlib_wrap.cpp:(.text+0x137c): relocation truncated to fit: R_MIPS_GOT16 
> against `PyExc_ValueError'
> build/temp.linux-mips64-2.7/QuantLib/quantlib_wrap.o: In function 
> `SWIG_Python_AddErrorMsg(char const*)':
> quantlib_wrap.cpp:(.text+0x1410): relocation truncated to fit: R_MIPS_CALL16 
> against `PyErr_Occurred'
> quantlib_wrap.cpp:(.text+0x1488): relocation truncated to fit: R_MIPS_CALL16 
> against `PyErr_Clear'
> quantlib_wrap.cpp:(.text+0x14f0): relocation truncated to fit: R_MIPS_CALL16 
> against `PyErr_Format'
> build/temp.linux-mips64-2.7/QuantLib/quantlib_wrap.o: In function 
> `SWIG_Python_AppendOutput(_object*, _object*)':
> quantlib_wrap.cpp:(.text+0x18c4): relocation truncated to fit: R_MIPS_CALL16 
> against `PyList_SetItem'
> build/temp.linux-mips64-2.7/QuantLib/quantlib_wrap.o: In function 
> `SWIG_Python_UnpackTuple(_object*, char const*, int, int, _object**)':
> quantlib_wrap.cpp:(.text+0x1a0c): relocation truncated to fit: R_MIPS_CALL16 
> against `PyErr_Format'
> quantlib_wrap.cpp:(.text+0x1b48): relocation truncated to fit: R_MIPS_CALL16 
> against `PyErr_Format'
> quantlib_wrap.cpp:(.text+0x1bc4): relocation truncated to fit: R_MIPS_CALL16 
> against `PyErr_Format'
> build/temp.linux-mips64-2.7/QuantLib/quantlib_wrap.o: In function 
> `SwigPyClientData_New':
> quantlib_wrap.cpp:(.text+0x1f24): relocation truncated to fit: R_MIPS_CALL16 
> against `PyErr_Occurred'
> quantlib_wrap.cpp:(.text+0x1f48): additional relocation overflows omitted 
> from the output
> collect2: error: ld returned 1 exit status
> error: command 'g++' failed with exit status 1

https://buildd.debian.org/status/fetch.php?pkg=quantlib-swig&arch=mipsel&ver=1.4-1&stamp=1405951271

Using mxgot flag for mips/mipsel solves this issue for me.

Patch that contains this fix for mips/mipsel is attached.


With this patch I was able to successfully build quantlib-swig
for both mips and mipsel.


Could you please consider including this patch.



Regards,
Dejan
diff -uNr quantlib-swig-1.4.orig/debian/rules quantlib-swig-1.4/debian/rules
--- quantlib-swig-1.4.orig/debian/rules	2014-11-28 18:26:04.000000000 +0100
+++ quantlib-swig-1.4/debian/rules	2014-11-28 18:27:49.000000000 +0100
@@ -49,7 +49,7 @@
 ## edd 26 Jun 2007 	use cpu test, not arch test -- thanks to Riku via #430709
 ## edd 26 Oct 2007      s390+powerpc also die, so add'em (and remove mips(el), see next item)
 ## edd 27 May 2012      added mips/mipsel/armel/armhf here too
-ifneq "$(findstring $(cpu), m68k arm armeb s390 powerpc armel armhf mips mipsel)" ""
+ifneq "$(findstring $(cpu), m68k arm armeb s390 powerpc armel armhf)" ""
 compilerflags   = -O0 -g0
 endif
 
@@ -59,6 +59,9 @@
 #compilerflags   = -O2 -g0 
 #endif
 
+ifneq "$(findstring $(cpu), mipsel mips)" ""
+compilerflags   = -O0 -g0 -mxgot
+endif
 
 ## edd 25 Dec 2002  g++-3.2 for s390
 

Reply via email to