Your message dated Fri, 02 Sep 2016 07:05:58 +0000
with message-id <e1bfiy2-0001ge...@franck.debian.org>
and subject line Bug#836304: fixed in flint 2.5.2-9
has caused the Debian Bug report #836304,
regarding flint: flint-arb FTBFS on testing: add_si fails with Segmentation 
fault on mips and arm
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
836304: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=836304
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: flint
Version: 2.5.2-8
Severity: importatnt
Tags: sid, patch
Justification: FTBFS
User: debian-m...@lists.debian.org
Usertags: mips-patch


Flint-arb FTBFS on mips and arm with following error:

> add_si....../Makefile.subdirs:84: recipe for target 
> '../build/arf/test/t-add_si_RUN' failed
> make[2]: *** [../build/arf/test/t-add_si_RUN] Segmentation fault

Full log is available here:
https://buildd.debian.org/status/fetch.php?pkg=flint-arb&arch=mipsel&ver=2.8.1-2&stamp=1470100740
https://buildd.debian.org/status/fetch.php?pkg=flint-arb&arch=armel&ver=2.8.1-2&stamp=1470093777

This issue is related to count_leading_zeros implementation in longlong.h.
If the same implementation is used for i386 and amd64 (instead of existing arch 
specific implementation), the same issue will appear.

Reported issue with more details is available here:
https://github.com/fredrik-johansson/arb/issues/150


Solution is to use clz builtins.
I had proposed this solution to upstream and it was merged.
https://github.com/wbhart/flint2/issues/283


Patch that contains needed changes is attached.
If flit-arb is build against flit that is built with mentioned patch applied, 
all tests will pass.
Could you consider including attached patch?


Regards,
Dejan
--- flint-2.5.2.orig/longlong.h
+++ flint-2.5.2/longlong.h
@@ -324,6 +324,39 @@
 
 #endif
 
+/* MIPS */
+#if (defined (__mips__) || defined (__arm__))
+
+#ifdef _LONG_LONG_LIMB
+#define count_leading_zeros(count,x)            \
+  do {                                          \
+    FLINT_ASSERT ((x) != 0);                    \
+    (count) = __builtin_clzll (x);              \
+  } while (0)
+#else
+#define count_leading_zeros(count,x)            \
+  do {                                          \
+    FLINT_ASSERT ((x) != 0);                    \
+    (count) = __builtin_clzl (x);               \
+  } while (0)
+#endif
+
+#ifdef _LONG_LONG_LIMB
+#define count_trailing_zeros(count,x)           \
+  do {                                          \
+    FLINT_ASSERT ((x) != 0);                    \
+    (count) = __builtin_ctzll (x);              \
+  } while (0)
+#else
+#define count_trailing_zeros(count,x)           \
+  do {                                          \
+    FLINT_ASSERT ((x) != 0);                    \
+    (count) = __builtin_ctzl (x);               \
+  } while (0)
+#endif
+
+#endif /* MIPS */
+
 #define udiv_qrnnd_int(q, r, n1, n0, d)                                \
   do {									                                      \
     mp_limb_t __d1, __d0, __q1, __q0, __r1, __r0, __m;			        \
@@ -364,6 +397,7 @@
     (r) = __r0;								                                \
   } while (0)
 
+#ifndef count_leading_zeros
 #define count_leading_zeros(count, x)                        \
   do {									                            \
     mp_limb_t __xr = (x);							                \
@@ -386,9 +421,11 @@
 									                                  \
     (count) = GMP_LIMB_BITS + 1 - __a - __flint_clz_tab[__xr >> __a]; \
   } while (0)
+#endif
 
 #if !(GMP_LIMB_BITS == 64 && defined (__ia64))
 
+#ifndef count_trailing_zeros
 #define count_trailing_zeros(count, x)                 \
   do {									                      \
     mp_limb_t __ctz_x = (x);						          \
@@ -397,6 +434,7 @@
     count_leading_zeros (__ctz_c, __ctz_x & -__ctz_x); \
     (count) = GMP_LIMB_BITS - 1 - __ctz_c;	 \
   } while (0)
+#endif
 
 #endif
 

--- End Message ---
--- Begin Message ---
Source: flint
Source-Version: 2.5.2-9

We believe that the bug you reported is fixed in the latest version of
flint, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 836...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Julien Puydt <julien.pu...@laposte.net> (supplier of updated flint package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 01 Sep 2016 20:56:14 +0200
Source: flint
Binary: libflint-2.5.2 libflint-dev libflint-doc
Architecture: source
Version: 2.5.2-9
Distribution: unstable
Urgency: medium
Maintainer: Debian Science Maintainers 
<debian-science-maintainers@lists.alioth.debian.org>
Changed-By: Julien Puydt <julien.pu...@laposte.net>
Description:
 libflint-2.5.2 - C library for number theory, shared library
 libflint-dev - C library for number theory, development files
 libflint-doc - Documentation for the FLINT library
Closes: 836304
Changes:
 flint (2.5.2-9) unstable; urgency=medium
 .
   * Added a patch from Dejan Latinovic to fix a MIPS issue. (Closes: #836304)
Checksums-Sha1:
 6ebb91b2c909339bf886cca31aad7832fb11c7d5 2121 flint_2.5.2-9.dsc
 a1d3c43c1bfae571b051d9d293eff95722e0bf42 6436 flint_2.5.2-9.debian.tar.xz
Checksums-Sha256:
 cd4af656219da725764083eea81741ad1ef044bddf1c7fce6f1f04d9e68fd660 2121 
flint_2.5.2-9.dsc
 09edd6e4257ed2e9fcbc5864c61e053ab2885f91e97a990beadea40a30364753 6436 
flint_2.5.2-9.debian.tar.xz
Files:
 eb3ecb4e2b2da212bd6091d3dbe660b6 2121 math optional flint_2.5.2-9.dsc
 c310976fb592fc98957235998f0c5fa9 6436 math optional flint_2.5.2-9.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJXySGHAAoJEEsEP825REVAkcAQAKPxPKwOgBgIE0p5iA211LOr
E++ZsmqrFN3hZoHkUQ0FA3dWKwKuUXJ11ASiHrgUo9wL1fQbbhII3gi8uc53Zz73
wdXd6xe6LKX6U/OLwcXpCxim7g4C2Bf9QMOzibtFfn4RYoq3Gk6sUxltlL8ihSGJ
FUN7anABl1g7Y3rs/e8VKzhOt4wx0qSONHEPgpnAPafIghRZtR/cBokKM0OgG/3m
hljUNz65CfT30MunCCzQ5BXnZtPxPumqGAOOzwGotBK/Fr6Ub/2mHhBrP49mYEer
1e7asbwTvkucOf15GoRrG6dalnjV01cxF0YvnNkfruTHv4Qx21hgAbWOrNsxfmGg
lpT4AmEx8txORwwVFgcjFBU7tWrErSs7dMnvuJnVOKdY9pOdpF9+p2SQorWisTnM
g9iAyjdZsaOg5amLILJcAE5FiCyocEWSp+dHil7AjELRDKc3bBczmFNY9rKtspcJ
5ingdroyOA8MPNeC0XjW/tf0qI76mStAr1Xbb1LO/NG7ukLei70+Krn/Rc8DZJaN
CrIwopJ396EHZF8qwLYUfzKNM4/eJyw1iA0Zz7WYO1XeXh/Pu7qZlcKc6gVUbLdB
hJ36T8FNbehpc8oo/I+OPr3F8RqLec0TSt6ZrJLioSCzbe0UT4adJFGkvezTbrDD
q4Lfk+31ck1SWUE0LWb0
=9rye
-----END PGP SIGNATURE-----

--- End Message ---
-- 
debian-science-maintainers mailing list
debian-science-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-science-maintainers

Reply via email to