Bug#775506: unblock: tbb/4.2~20140122-4
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package tbb
It fixes two grave bugs: #756233 & #762656
It also fixes a longer term issue, as depicted in comment: #775263#17
So I understand the debdiff may be a little long, but unblocking current tbb from sid into testing would solve the issue for the long term.
Comments welcome
unblock tbb/4.2~20140122-4
-- System Information:
Debian Release: 8.0
APT prefers testing-updates
APT policy: (500, 'testing-updates'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru tbb-4.2~20140122/debian/changelog tbb-4.2~20140122/debian/changelog
--- tbb-4.2~20140122/debian/changelog 2014-06-04 15:08:56.000000000 +0200
+++ tbb-4.2~20140122/debian/changelog 2014-10-30 18:55:55.000000000 +0100
@@ -1,3 +1,33 @@
+tbb (4.2~20140122-4) unstable; urgency=medium
+ * Bump standards version to 3.9.6.
+ * Add debian/tbb.pc to clean list.
+
+ [ Mathieu Malaterre ]
+ * Don't use gcc atomics for ppc32. Closes: #762656
+
+ -- Steve Capper <steven.capper@gmail.com> Thu, 30 Oct 2014 17:55:02 +0000
+
+tbb (4.2~20140122-3) unstable; urgency=medium
+
+ * Unit test execution failures no longer cause build to fail; instead take a
+ tally of passes/failures to make it easier to analyse which cases are prone
+ to failure.
+ + debian/patches/tally-unit-test-fails.patch
+ * debian/rules modified s.t. the unit tests are no longer executed twice
+
+ -- Steve Capper <steven.capper@gmail.com> Fri, 19 Sep 2014 20:35:24 +0100
+
+tbb (4.2~20140122-2) unstable; urgency=medium
+
+ * Unit test compile errors no longer ignored. Closes: #752820
+ * for i386 architecture, set march=i586 (has to match gcc): Closes: #756233
+ * Debian architecture overrides uname -m, allows pbuilder i386 builds.
+ * Amended Linux kernel version detection logic to work with x.y.
+ * Bump standards version to 3.9.5.
+ * A couple of Lintian source-is-missing errors overridden.
+
+ -- Steve Capper <steven.capper@gmail.com> Sat, 26 Jul 2014 18:45:08 +0100
+
tbb (4.2~20140122-1.1) unstable; urgency=low
[ Helge Deller ]
diff -Nru tbb-4.2~20140122/debian/control tbb-4.2~20140122/debian/control
--- tbb-4.2~20140122/debian/control 2014-06-04 15:08:26.000000000 +0200
+++ tbb-4.2~20140122/debian/control 2014-10-29 20:42:34.000000000 +0100
@@ -2,7 +2,7 @@
Priority: extra
Maintainer: Steve Capper <steven.capper@gmail.com>
Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1~), libjs-jquery
-Standards-Version: 3.9.4
+Standards-Version: 3.9.6
Section: libs
Homepage: http://threadingbuildingblocks.org/
diff -Nru tbb-4.2~20140122/debian/patches/buildi386.patch tbb-4.2~20140122/debian/patches/buildi386.patch
--- tbb-4.2~20140122/debian/patches/buildi386.patch 1970-01-01 01:00:00.000000000 +0100
+++ tbb-4.2~20140122/debian/patches/buildi386.patch 2014-09-19 18:10:59.000000000 +0200
@@ -0,0 +1,34 @@
+Description: allow i386 builds on amd64 and set march to match gcc
+Author: Steve Capper <steven.capper@gmail.com>
+
+Index: tbb/build/linux.gcc.inc
+===================================================================
+--- tbb.orig/build/linux.gcc.inc
++++ tbb/build/linux.gcc.inc
+@@ -93,7 +93,11 @@ endif
+
+ ifeq (ia32,$(arch))
+ ITT_NOTIFY = -DDO_ITT_NOTIFY
+- CPLUS_FLAGS += -m32 -march=pentium4 $(ENABLE_RTM)
++ ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH),i386)
++ CPLUS_FLAGS += -m32 -march=i586 $(ENABLE_RTM)
++ else
++ CPLUS_FLAGS += -m32 -march=pentium4 $(ENABLE_RTM)
++ endif
+ LIB_LINK_FLAGS += -m32
+ endif
+
+Index: tbb/build/linux.inc
+===================================================================
+--- tbb.orig/build/linux.inc
++++ tbb/build/linux.inc
+@@ -73,6 +73,9 @@ ifndef arch
+ ifeq ($(deb_host_arch),x32)
+ export arch:=x32
+ endif
++ ifeq ($(deb_host_arch),i386)
++ export arch:=ia32
++ endif
+ ifndef arch
+ export arch:=$(uname_m)
+ $(warning "Unknown arch: " $(arch))
diff -Nru tbb-4.2~20140122/debian/patches/failonbadtests.patch tbb-4.2~20140122/debian/patches/failonbadtests.patch
--- tbb-4.2~20140122/debian/patches/failonbadtests.patch 1970-01-01 01:00:00.000000000 +0100
+++ tbb-4.2~20140122/debian/patches/failonbadtests.patch 2014-09-19 18:10:59.000000000 +0200
@@ -0,0 +1,22 @@
+Description: Fail hard on serious unit test fails
+Author: Steve Capper <steven.capper@gmail.com>
+
+Index: tbb/Makefile
+===================================================================
+--- tbb.orig/Makefile
++++ tbb/Makefile
+@@ -49,10 +49,10 @@ tbbproxy: mkdir
+ $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbproxy cfg=release tbbproxy
+
+ test: tbb tbbmalloc $(if $(use_proxy),tbbproxy)
+- -$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc_test
+- -$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.test cfg=debug
+- -$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc_test
+- -$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.test cfg=release
++ $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc_test
++ $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.test cfg=debug
++ $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc_test
++ $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.test cfg=release
+
+ rml: mkdir
+ $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.rml cfg=debug
diff -Nru tbb-4.2~20140122/debian/patches/linuxreleasedetect.patch tbb-4.2~20140122/debian/patches/linuxreleasedetect.patch
--- tbb-4.2~20140122/debian/patches/linuxreleasedetect.patch 1970-01-01 01:00:00.000000000 +0100
+++ tbb-4.2~20140122/debian/patches/linuxreleasedetect.patch 2014-09-19 18:10:59.000000000 +0200
@@ -0,0 +1,23 @@
+Description: detect linux x.y versions where x.y.z not found
+Author: Steve Capper <steven.capper@gmail.com>
+
+Index: tbb/src/test/harness.h
+===================================================================
+--- tbb.orig/src/test/harness.h
++++ tbb/src/test/harness.h
+@@ -602,9 +602,13 @@ inline unsigned LinuxKernelVersion()
+ REPORT_FATAL_ERROR("Can't call uname: errno %d\n", errno);
+ exit(1);
+ }
++
+ if (3 != sscanf(utsnameBuf.release, "%u.%u.%u", &digit1, &digit2, &digit3)) {
+- REPORT_FATAL_ERROR("Unable to parse OS release '%s'\n", utsnameBuf.release);
+- exit(1);
++ digit3 = 0;
++ if (2 != sscanf(utsnameBuf.release, "%u.%u", &digit1, &digit2)) {
++ REPORT_FATAL_ERROR("Unable to parse OS release '%s'\n", utsnameBuf.release);
++ exit(1);
++ }
+ }
+ return 1000000*digit1+1000*digit2+digit3;
+ }
diff -Nru tbb-4.2~20140122/debian/patches/ppc32_atomics.patch tbb-4.2~20140122/debian/patches/ppc32_atomics.patch
--- tbb-4.2~20140122/debian/patches/ppc32_atomics.patch 1970-01-01 01:00:00.000000000 +0100
+++ tbb-4.2~20140122/debian/patches/ppc32_atomics.patch 2014-10-29 20:00:19.000000000 +0100
@@ -0,0 +1,26 @@
+Description: Make the test suite compile on ppc32
+ where atomics implementation are missing
+ The code simply check ppc32 vs ppc64, the macros are defined on gcc 4.9.1
+Author: Mathieu Malaterre <malat@debian.org>
+Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63368
+Bug-Debian: http://bugs.debian.org/762656
+
+--- tbb-4.2~20140122.orig/include/tbb/tbb_config.h
++++ tbb-4.2~20140122/include/tbb/tbb_config.h
+@@ -195,7 +195,16 @@
+ /* TODO: change the version back to 4.1.2 once macro __TBB_WORD_SIZE become optional */
+ #if __TBB_GCC_VERSION >= 40306 || __INTEL_COMPILER >= 1200
+ /** built-in atomics available in GCC since 4.1.2 **/
++#if __PPC__
++#if __PPC64__
+ #define __TBB_GCC_BUILTIN_ATOMICS_PRESENT 1
++#else
++ // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63368
++ #define __TBB_GCC_BUILTIN_ATOMICS_PRESENT 0
++#endif
++#else
++ #define __TBB_GCC_BUILTIN_ATOMICS_PRESENT 1
++#endif
+ #endif
+
+ #if __INTEL_COMPILER >= 1200
diff -Nru tbb-4.2~20140122/debian/patches/series tbb-4.2~20140122/debian/patches/series
--- tbb-4.2~20140122/debian/patches/series 2014-06-04 14:30:27.000000000 +0200
+++ tbb-4.2~20140122/debian/patches/series 2014-10-29 20:00:19.000000000 +0100
@@ -1,2 +1,7 @@
adddebug.patch
fixnonlinux.patch
+failonbadtests.patch
+buildi386.patch
+linuxreleasedetect.patch
+tally-unit-test-fails.patch
+ppc32_atomics.patch
diff -Nru tbb-4.2~20140122/debian/patches/tally-unit-test-fails.patch tbb-4.2~20140122/debian/patches/tally-unit-test-fails.patch
--- tbb-4.2~20140122/debian/patches/tally-unit-test-fails.patch 1970-01-01 01:00:00.000000000 +0100
+++ tbb-4.2~20140122/debian/patches/tally-unit-test-fails.patch 2014-09-19 21:27:04.000000000 +0200
@@ -0,0 +1,64 @@
+Description: tally up passes/fails rather than stop on fail
+Author: Steve Capper <steven.capper@gmail.com>
+
+Index: tbb/build/Makefile.test
+===================================================================
+--- tbb.orig/build/Makefile.test
++++ tbb/build/Makefile.test
+@@ -31,6 +31,7 @@
+
+ default: test_tbb_plain test_tbb_openmp test_tbb_cilk test_tbb_old
+
++run_cmd = sh ../test_summary.sh
+ tbb_root ?= $(TBBROOT)
+ BUILDING_PHASE=1
+ TEST_RESOURCE = $(TBB.RES)
+Index: tbb/build/test_summary.sh
+===================================================================
+--- /dev/null
++++ tbb/build/test_summary.sh
+@@ -0,0 +1,31 @@
++#!/bin/sh
++
++# Rather than fail on first test, we keep a tally of tests that
++# pass/fail; as some are running unpredictably on some systems.
++
++# We do fail if we can't compile a test.
++
++if [ "$1" = "--dump" ]; then
++ if [ -e "$3/tests.passed" ]; then
++ count=$(wc -l "$3/tests.passed" | awk '{print $1}')
++ echo $count $2 tests passed.
++ fi
++
++ if [ -e "$3/tests.failed" ]; then
++ echo The following $2 tests FAILED!
++ cat "$3/tests.failed"
++ fi
++
++ exit 0
++fi
++
++eval $@
++rc=$?
++
++if [ "$rc" -eq "0" ]; then
++ echo "$@" >> tests.passed
++else
++ echo "$@" >> tests.failed
++fi
++
++exit 0 # always succeed
+Index: tbb/Makefile
+===================================================================
+--- tbb.orig/Makefile
++++ tbb/Makefile
+@@ -53,6 +53,8 @@ test: tbb tbbmalloc $(if $(use_proxy),tb
+ $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.test cfg=debug
+ $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc_test
+ $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.test cfg=release
++ sh ./build/test_summary.sh --dump DEBUG "$(work_dir)_debug"
++ sh ./build/test_summary.sh --dump RELEASE "$(work_dir)_release"
+
+ rml: mkdir
+ $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.rml cfg=debug
diff -Nru tbb-4.2~20140122/debian/rules tbb-4.2~20140122/debian/rules
--- tbb-4.2~20140122/debian/rules 2013-10-08 20:51:43.000000000 +0200
+++ tbb-4.2~20140122/debian/rules 2014-10-30 18:56:49.000000000 +0100
@@ -12,10 +12,10 @@
dh $@ --parallel --dbg-package=libtbb2-dbg
VERSION = $(shell dpkg-parsechangelog | grep '^Version' | cut -d' ' -f2 | cut -f1 -d-)
-debian/tbb.pc: debian/tbb.pc.in
- sed -e"s/@VERSION@/$(VERSION)/g" $< > $@
-build-arch: debian/tbb.pc
+override_dh_auto_build:
+ sed -e"s/@VERSION@/$(VERSION)/g" debian/tbb.pc.in > debian/tbb.pc
+ dh_auto_build
# Makefiles should not be compressed (tbb-examples)
override_dh_compress-indep:
@@ -23,3 +23,7 @@
get-orig-source:
uscan --verbose --force-download --rename
+
+override_dh_auto_clean:
+ dh_auto_clean
+ touch debian/tbb.pc && rm debian/tbb.pc
diff -Nru tbb-4.2~20140122/debian/source.lintian-overrides tbb-4.2~20140122/debian/source.lintian-overrides
--- tbb-4.2~20140122/debian/source.lintian-overrides 1970-01-01 01:00:00.000000000 +0100
+++ tbb-4.2~20140122/debian/source.lintian-overrides 2014-09-19 18:10:59.000000000 +0200
@@ -0,0 +1,7 @@
+# Override this file as it is neither included in the final package
+# nor used in anyway during the build process
+tbb source: source-is-missing doc/help/searchdata.js
+
+# We do use jquery.js, but not this one. (We symlink to the jquery
+# package and make it a dependency).
+tbb source: source-is-missing doc/html/jquery.js
diff -Nru tbb-4.2~20140122/debian/tbb.pc tbb-4.2~20140122/debian/tbb.pc
--- tbb-4.2~20140122/debian/tbb.pc 2014-03-14 17:18:11.000000000 +0100
+++ tbb-4.2~20140122/debian/tbb.pc 1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-prefix=/usr
-exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
-includedir=${prefix}/include
-
-Name: Threading Building Blocks
-Description: Intel's parallelism library for C++
-URL: http://www.threadingbuildingblocks.org/
-Version: 4.2~20140122
-Libs: -L${libdir} -ltbb
-Cflags: -I${includedir}
Reply to: