Package: flint
Version: 2.5.2-5
Severity: normal
Tags: sid + patch
Justification: FTBFS
User: [email protected]
Usertags: mips-patch
Hello,
Package flint_2.5.2-5 FTBFS on mips64el with following error:
> In file included from printf.c:32:0:
> gmpcompat.h: In function 'flint_mpf_fits_slong_p':
> flint.h:113:18: error: 'LLONG_MAX' undeclared (first use in this function)
> #define WORD_MAX LLONG_MAX
> flint.h:114:18: error: 'LLONG_MIN' undeclared (first use in this function)
> #define WORD_MIN LLONG_MIN
build log:
https://buildd.debian.org/status/fetch.php?pkg=flint&arch=mips64el&ver=2.5.2-5&stamp=1463208762
The problem occurs because of the use -ansi flag.
When this flag is used on mips64, LLONG_MAX and LLONG_MIN will not be defined.
> ifdef __USE_ISOC99
> /* Minimum and maximum values a `signed long long int' can hold. */
>
> define LLONG_MAX 9223372036854775807LL
> define LLONG_MIN (-LLONG_MAX - 1LL)
I have created and attached a patch which removes -ansi flag.
With this patch package was build successfully for mips64el, mipsel, i386, amd64
Thank you!
Regards,
Radovan
--- flint-2.5.2/debian/rules 2016-05-13 07:42:49.000000000 +0000
+++ ./rules 2016-06-16 08:31:22.312142131 +0000
@@ -4,15 +4,20 @@ VERSION := $(shell dpkg-parsechangelog |
EXTRA_SHARED_FLAGS=-Wl,-soname,libflint-$(VERSION).so
MAKE_OVERRIDE = AT= QUIET_CXX= QUIET_CC= QUIET_AR= INCS=-I$(CURDIR) \
ABI_FLAG='$(LDFLAGS)'
-
+DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
%:
dh $@ --parallel
+ifneq (,$(filter $(DEB_BUILD_ARCH),mips64 mips64el))
+ CFLAGS_OVERRIDE = '$(CPPFLAGS) $(CFLAGS)'
+else
+ CFLAGS_OVERRIDE = '$(CPPFLAGS) $(CFLAGS) -ansi'
+endif
# upstream Makefile has only CFLAGS, not CPPFLAGS and not even CXXFLAGS, so
# inject flags using configure. let's hope CFLAGS will always be good enough
# even for $(CXX)
override_dh_auto_configure:
- ./configure --prefix="/usr" --with-ntl CFLAGS='$(CPPFLAGS) $(CFLAGS) -ansi' --disable-static
+ ./configure --prefix="/usr" --with-ntl CFLAGS=$(CFLAGS_OVERRIDE) --disable-static
sed -i Makefile -e "/^FLINT_LIB\>=/s/libflint/libflint-$(VERSION)/"
override_dh_auto_build:
--
debian-science-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers