Bug#751822: Fix FTBFS on ppc64el (test-suite + python binding)
On 2014-06-17 Mauricio Faria de Oliveira wrote: [...] > 2) python-libprelude-prefix.patch > This patch makes sure bindings/python/setup.py uses '/usr' > as prefix, since it can vary (occurence of '/usr/local' below). > If the prefix is different then /usr, a build failure occurs > because of a hardcoded '/usr/lib' in override_dh_auto_install: > > [...] >debian/rules binary > dh binary --with=quilt,python2,autoreconf > [...] > debian/rules override_dh_auto_install > [...] > dh_auto_install; \ > rm -rf debian/tmp/usr/lib/python*; \ > find debian/tmp-python-libprelude/usr/lib -name "*.la" -delete; > \ > mv debian/tmp-python-libprelude/usr/lib/* debian/tmp/usr/lib/ > [...] > find: `debian/tmp-python-libprelude/usr/lib': No such file or directory > mv: cannot stat ‘debian/tmp-python-libprelude/usr/lib/*’: No such file > or > directory > make[1]: *** [override_dh_auto_install] Error 1 > [...] Hello, this patch looks strange. Can you show how to reproduce this issue? This kind of bug cannot be ppc64el specific and I do not see it at ix86. cu Andreas -- `What a good friend you are to him, Dr. Maturin. His other friends are so grateful to you.' `I sew his ears on from time to time, sure' -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#751822: Fix FTBFS on ppc64el (test-suite + python binding)
Hi Andreas, On 08/14/2014 02:24 PM, Andreas Metzler wrote: this patch looks strange. Can you show how to reproduce this issue? This kind of bug cannot be ppc64el specific and I do not see it at ix86. Yes, indeed strange. I've realized it some weeks later, but missed trying a bit more. I'll try to reproduce/understand it again and ping back. Thanks, -- Mauricio Faria de Oliveira IBM Linux Technology Center -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#751822: Fix FTBFS on ppc64el (test-suite + python binding)
Hi Andreas, On 08/14/2014 02:24 PM, Andreas Metzler wrote: > this patch looks strange. Can you show how to reproduce this issue? I wrote: > I'll try to reproduce/understand it again and ping back. Got it; it was due to building the package as a privileged user. (thus passing setup.py's is_system_wide_install() test, due to write-access on /usr/lib/python*/dist-packages) The package builds fine on a normal/unprivileged sbuild build, just with the test-suite patch. I see you already made a uploaded w/ that patch for delayed/10. Thanks, that will make it. In case you'd prefer to put in a patch w/ DEP-3 headers and stuff, I'm attaching one for your convenience. Thanks again, and best regards. -- Mauricio Faria de Oliveira IBM Linux Technology Center diff -Nru libprelude-1.0.0/debian/changelog libprelude-1.0.0/debian/changelog --- libprelude-1.0.0/debian/changelog 2014-08-05 17:29:12.0 + +++ libprelude-1.0.0/debian/changelog 2014-08-15 16:29:33.0 + @@ -1,3 +1,9 @@ +libprelude (1.0.0-11.3ppc64el1) UNRELEASED; urgency=medium + + * Fix libmissing/ test-suite on ppc64el (ppc64el-fix-gnulib-tests.patch) (Closes: #751822) + + -- Mauricio Faria de Oliveira Thu, 14 Aug 2014 18:06:04 -0300 + libprelude (1.0.0-11.3) unstable; urgency=low * Non-maintainer upload. diff -Nru libprelude-1.0.0/debian/patches/ppc64el-fix-gnulib-tests.patch libprelude-1.0.0/debian/patches/ppc64el-fix-gnulib-tests.patch --- libprelude-1.0.0/debian/patches/ppc64el-fix-gnulib-tests.patch 1970-01-01 00:00:00.0 + +++ libprelude-1.0.0/debian/patches/ppc64el-fix-gnulib-tests.patch 2014-08-15 16:28:09.0 + @@ -0,0 +1,55 @@ +Subject: [PATCH] isfinite, isinf, isnan tests: fix for little-endian PowerPC +Origin: backport, http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=e962c07c0c8bb18f9a5969cbf1ddb01d0fe4f55c +Forwarded: https://www.prelude-ids.org/issues/556 +Author: Mauricio Faria de Oliveira +Last-Update: 2014-08-14 + +This patch is a trivial backport (subset) of the upstream patch; it just removes +the files that don't exist in libprelude (not required). + + curl 'http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=patch;h=e962c07c0c8bb18f9a5969cbf1ddb01d0fe4f55c' \ + | filterdiff \ + --strip=1 \ + --addoldprefix='a/libmissing/' \ + --addnewprefix='b/libmissing/' \ + -i '*/tests/test-isnanl.h' \ + -i '*/tests/test-signbit.c' \ + > ppc64el-fix-gnulib-tests.patch + +--- a/libmissing/tests/test-isnanl.h b/libmissing/tests/test-isnanl.h +@@ -51,6 +51,15 @@ main () + /* A bit pattern that is different from a Quiet NaN. With a bit of luck, + it's a Signalling NaN. */ + { ++#if defined __powerpc__ && LDBL_MANT_DIG == 106 ++/* This is PowerPC "double double", a pair of two doubles. Inf and Nan are ++ represented as the corresponding 64-bit IEEE values in the first double; ++ the second is ignored. Manipulate only the first double. */ ++#undef NWORDS ++#define NWORDS \ ++ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) ++#endif ++ + memory_long_double m; + m.value = NaNl (); + # if LDBL_EXPBIT0_BIT > 0 +--- a/libmissing/tests/test-signbit.c b/libmissing/tests/test-signbit.c +@@ -151,6 +151,16 @@ test_signbitl () + #define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) + typedef union { long double value; unsigned int word[NWORDS]; } memory_long_double; ++ ++#if defined __powerpc__ && LDBL_MANT_DIG == 106 ++/* This is PowerPC "double double", a pair of two doubles. Inf and Nan are ++ represented as the corresponding 64-bit IEEE values in the first double; ++ the second is ignored. Manipulate only the first double. */ ++#undef NWORDS ++#define NWORDS \ ++ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) ++#endif ++ + memory_long_double m; + m.value = zerol / zerol; + # if LDBL_EXPBIT0_BIT > 0 diff -Nru libprelude-1.0.0/debian/patches/series libprelude-1.0.0/debian/patches/series --- libprelude-1.0.0/debian/patches/series 2014-05-25 13:58:53.0 + +++ libprelude-1.0.0/debian/patches/series 2014-08-15 16:28:09.0 + @@ -5,3 +5,4 @@ request_REUSEADDR_before_bind.patch test-poll_add_sleep_after_write.patch keep-atfork-symbol.patch +ppc64el-fix-gnulib-tests.patch
Bug#751822: Fix FTBFS on ppc64el (test-suite + python binding)
Package: src:libprelude Version: 1.0.0-1.0.0-11.2 Severity: normal Tags: patch User: debian-powe...@lists.debian.org Usertags: ppc64el Hi, These 2 patches address build failures of libprelude on ppc64el. May you please consider incorporating them into an upload? Thank you! 1) ppc64el-isnan-tests-fix-for-little-endian-PowerPC.patch This patch is upstream at gnulib as of May 30th, 2014 (commit e962c07c0c8bb18f9a5969cbf1ddb01d0fe4f55c). It picks the subset applicable to files carried by libprelude. It fixes this test-suite error: PASS: test-isnand-nolibm PASS: test-isnanf-nolibm ../../test-driver: line 107: 20059 Aborted "$@" > $log_file 2>&1 FAIL: test-isnanl-nolibm 2) python-libprelude-prefix.patch This patch makes sure bindings/python/setup.py uses '/usr' as prefix, since it can vary (occurence of '/usr/local' below). If the prefix is different then /usr, a build failure occurs because of a hardcoded '/usr/lib' in override_dh_auto_install: [...] debian/rules binary dh binary --with=quilt,python2,autoreconf [...] debian/rules override_dh_auto_install [...] dh_auto_install; \ rm -rf debian/tmp/usr/lib/python*; \ find debian/tmp-python-libprelude/usr/lib -name "*.la" -delete; \ mv debian/tmp-python-libprelude/usr/lib/* debian/tmp/usr/lib/ [...] find: `debian/tmp-python-libprelude/usr/lib': No such file or directory mv: cannot stat ‘debian/tmp-python-libprelude/usr/lib/*’: No such file or directory make[1]: *** [override_dh_auto_install] Error 1 [...] -- Mauricio Faria de Oliveira IBM Linux Technology Center Index: libprelude-1.0.0/bindings/python/Makefile.am === --- libprelude-1.0.0.orig/bindings/python/Makefile.am +++ libprelude-1.0.0/bindings/python/Makefile.am @@ -9,7 +9,7 @@ CC="$(CXX)" $(PYTHON) setup.py build install-exec-hook: - $(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` + $(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` --prefix /usr uninstall-hook: $(PYTHON) setup.py uninstall `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` curl 'http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=patch;h=e962c07c0c8bb18f9a5969cbf1ddb01d0fe4f55c' \ | filterdiff \ --strip=1 \ --addoldprefix='a/libmissing/' \ --addnewprefix='b/libmissing/' \ -i '*/tests/test-isnanl.h' \ -i '*/tests/test-signbit.c' \ > 'ppc64el-isnan-tests-fix-for-little-endian-PowerPC.patch' --- a/libmissing/tests/test-isnanl.h +++ b/libmissing/tests/test-isnanl.h @@ -51,6 +51,15 @@ main () /* A bit pattern that is different from a Quiet NaN. With a bit of luck, it's a Signalling NaN. */ { +#if defined __powerpc__ && LDBL_MANT_DIG == 106 +/* This is PowerPC "double double", a pair of two doubles. Inf and Nan are + represented as the corresponding 64-bit IEEE values in the first double; + the second is ignored. Manipulate only the first double. */ +#undef NWORDS +#define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +#endif + memory_long_double m; m.value = NaNl (); # if LDBL_EXPBIT0_BIT > 0 --- a/libmissing/tests/test-signbit.c +++ b/libmissing/tests/test-signbit.c @@ -151,6 +151,16 @@ test_signbitl () #define NWORDS \ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { long double value; unsigned int word[NWORDS]; } memory_long_double; + +#if defined __powerpc__ && LDBL_MANT_DIG == 106 +/* This is PowerPC "double double", a pair of two doubles. Inf and Nan are + represented as the corresponding 64-bit IEEE values in the first double; + the second is ignored. Manipulate only the first double. */ +#undef NWORDS +#define NWORDS \ + ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) +#endif + memory_long_double m; m.value = zerol / zerol; # if LDBL_EXPBIT0_BIT > 0