[med-svn] [Git][med-team/bowtie2][master] 2 commits: correct the 64bit detection logic

Michael R. Crusoe gitlab at salsa.debian.org
Wed Dec 18 10:13:46 GMT 2019



Michael R. Crusoe pushed to branch master at Debian Med / bowtie2


Commits:
6d5e119a by Michael R. Crusoe at 2019-12-18T07:39:05Z
correct the 64bit detection logic

- - - - -
c1ce5b30 by Michael R. Crusoe at 2019-12-18T09:16:29Z
Disable -fsanitize builds to save resources

- - - - -


5 changed files:

- debian/changelog
- + debian/patches/correct_64bit_test
- + debian/patches/no_sanity
- debian/patches/series
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+bowtie2 (2.3.5.1-4) unstable; urgency=medium
+
+  * Team upload.
+  * Added patch to correct the 64bit detection logic.
+  * Disable -fsanitize builds to save resources
+
+ -- Michael R. Crusoe <michael.crusoe at gmail.com>  Mon, 16 Dec 2019 10:13:27 +0100
+
 bowtie2 (2.3.5.1-3) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/patches/correct_64bit_test
=====================================
@@ -0,0 +1,42 @@
+Author: Michael R. Crusoe <michael.crusoe at gmail.com>
+Description: Handle -m64 and -msse2 flags better
+--- bowtie2.orig/Makefile
++++ bowtie2/Makefile
+@@ -198,30 +198,17 @@
+ VERSION := $(shell cat VERSION)
+ 
+ BITS := 32
+-ifeq (x86_64,$(shell uname -m))
++ifeq (64,$(shell dpkg-architecture -q DEB_TARGET_ARCH_BITS))
+ 	BITS := 64
+-endif
+-ifeq (amd64,$(shell uname -m))
+-	BITS := 64
+-endif
+-ifeq (aarch64,$(shell uname -m))
+-	BITS := 64
+-endif
+-# msys will always be 32 bit so look at the cpu arch instead.
+-ifneq (,$(findstring AMD64,$(PROCESSOR_ARCHITEW6432)))
+-	ifeq (1,$(MINGW))
+-		BITS := 64
+-	endif
+-endif
+-ifeq (32,$(BITS))
+-  $(error bowtie2 compilation requires a 64-bit platform )
++	M64_FLAG := -m64
++else
++	M64_FLAG :=
+ endif
+ 
+-SSE_FLAG := -msse2
+-M64_FLAG := -m64
+-ifeq (aarch64,$(shell uname -m))
++ifeq (amd64,$(dpkg-architecture -q DEB_TARGET_ARCH))
++	SSE_FLAG := -msse2
++else
+ 	SSE_FLAG =
+-	M64_FLAG =
+ endif
+ 
+ DEBUG_FLAGS    := -O0 -g3 $(M64_FLAG) $(SSE_FLAG)


=====================================
debian/patches/no_sanity
=====================================
@@ -0,0 +1,237 @@
+Author: Michael R. Crusoe <michael.crusoe at gmail.com>
+Description: save resources by not making/testing the -fsantize variants
+--- bowtie2.orig/Makefile
++++ bowtie2/Makefile
+@@ -218,20 +218,6 @@
+ DEBUG_DEFS     = -DCOMPILER_OPTIONS="\"$(filter-out -fdebug-prefix-map=%,$(DEBUG_FLAGS) $(CXXFLAGS))\""
+ RELEASE_DEFS   = -DCOMPILER_OPTIONS="\"$(filter-out -fdebug-prefix-map=%,$(RELEASE_FLAGS) $(CXXFLAGS))\""
+ 
+-ifeq (0,$(shell $(CPP) -E -fsanitize=address,undefined btypes.h 2>&1 > /dev/null; echo $$?))
+-	SANITIZER_FLAGS := -fsanitize=address,undefined
+-endif
+-ifndef SANITIZER_FLAGS
+-	ifeq (0,$(shell $(CPP) -E -fsanitize=address btypes.h 2>&1 > /dev/null; echo $$?))
+-		SANITIZER_FLAGS := -fsanitize=address
+-	endif
+-endif
+-ifndef SANITIZER_FLAGS
+-	ifeq (0,$(shell $(CPP) -E -fsanitize=undefined btypes.h 2>&1 > /dev/null; echo $$?))
+-		SANITIZER_FLAGS := -fsanitize=undefined
+-	endif
+-endif
+-
+ BOWTIE2_BIN_LIST :=     bowtie2-build-s \
+                         bowtie2-build-l \
+                         bowtie2-align-s \
+@@ -244,12 +230,6 @@
+                         bowtie2-align-l-debug \
+                         bowtie2-inspect-s-debug \
+                         bowtie2-inspect-l-debug
+-BOWTIE2_BIN_LIST_SAN := bowtie2-build-s-sanitized \
+-                        bowtie2-build-l-sanitized \
+-                        bowtie2-align-s-sanitized \
+-                        bowtie2-align-l-sanitized \
+-                        bowtie2-inspect-s-sanitized \
+-                        bowtie2-inspect-l-sanitized
+ 
+ GENERAL_LIST := $(wildcard scripts/*.sh) \
+                 $(wildcard scripts/*.pl) \
+@@ -306,10 +286,9 @@
+ .PHONY: all allall both both-debug
+ 
+ all: $(BOWTIE2_BIN_LIST) ;
+-allall: $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_DBG) $(BOWTIE2_BIN_LIST_SAN) ;
++allall: $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_DBG) ;
+ both: bowtie2-align-s bowtie2-build-s bowtie2-align-l bowtie2-build-l ;
+ both-debug: bowtie2-align-s-debug bowtie2-build-s-debug bowtie2-align-l-debug bowtie2-build-l-debug ;
+-both-sanitized: bowtie2-align-s-sanitized bowtie2-build-s-sanitized bowtie2-align-l-sanitized bowtie2-build-l-sanitized ;
+ 
+ DEFS := -fno-strict-aliasing \
+         -DBOWTIE2_VERSION="\"`cat VERSION`\"" \
+@@ -323,14 +302,12 @@
+         $(CPPFLAGS) \
+         $(CFLAGS)
+ 
+-# set compiler flags for all sanitized builds
+-$(BOWTIE2_BIN_LIST_SAN): CXXFLAGS += $(SANITIZER_FLAGS)
+ 
+ #
+ # bowtie2-build targets
+ #
+ 
+-bowtie2-build-s-sanitized bowtie2-build-s: bt2_build.cpp $(SHARED_CPPS) $(HEADERS)
++bowtie2-build-s: bt2_build.cpp $(SHARED_CPPS) $(HEADERS)
+ 	$(CXX) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(CXXFLAGS) \
+ 		$(DEFS) -DBOWTIE2 $(NOASSERT_FLAGS) -Wall \
+ 		$(CPPFLAGS) \
+@@ -338,7 +315,7 @@
+ 		$(SHARED_CPPS) $(BUILD_CPPS_MAIN) \
+ 		$(LDFLAGS) $(LDLIBS)
+ 
+-bowtie2-build-l-sanitized bowtie2-build-l: bt2_build.cpp $(SHARED_CPPS) $(HEADERS)
++bowtie2-build-l: bt2_build.cpp $(SHARED_CPPS) $(HEADERS)
+ 	$(CXX) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(CXXFLAGS) \
+ 		$(DEFS) -DBOWTIE2 -DBOWTIE_64BIT_INDEX $(NOASSERT_FLAGS) -Wall \
+ 		$(CPPFLAGS) \
+@@ -366,7 +343,7 @@
+ # bowtie2-align targets
+ #
+ 
+-bowtie2-align-s-sanitized bowtie2-align-s: bt2_search.cpp $(SEARCH_CPPS) $(SHARED_CPPS) $(HEADERS) $(SEARCH_FRAGMENTS)
++bowtie2-align-s: bt2_search.cpp $(SEARCH_CPPS) $(SHARED_CPPS) $(HEADERS) $(SEARCH_FRAGMENTS)
+ 	$(CXX) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(CXXFLAGS) \
+ 		$(DEFS) -DBOWTIE2 $(NOASSERT_FLAGS) -Wall \
+ 		$(CPPFLAGS) \
+@@ -374,7 +351,7 @@
+ 		$(SHARED_CPPS) $(SEARCH_CPPS_MAIN) \
+ 		$(LDFLAGS) $(LDLIBS)
+ 
+-bowtie2-align-l-sanitized bowtie2-align-l: bt2_search.cpp $(SEARCH_CPPS) $(SHARED_CPPS) $(HEADERS) $(SEARCH_FRAGMENTS)
++bowtie2-align-l: bt2_search.cpp $(SEARCH_CPPS) $(SHARED_CPPS) $(HEADERS) $(SEARCH_FRAGMENTS)
+ 	$(CXX) $(RELEASE_FLAGS) $(RELEASE_DEFS) $(CXXFLAGS) \
+ 		$(DEFS) -DBOWTIE2 -DBOWTIE_64BIT_INDEX $(NOASSERT_FLAGS) -Wall \
+ 		$(CPPFLAGS) \
+@@ -404,7 +381,7 @@
+ # bowtie2-inspect targets
+ #
+ 
+-bowtie2-inspect-s-sanitized bowtie2-inspect-s: bt2_inspect.cpp $(HEADERS) $(SHARED_CPPS)
++bowtie2-inspect-s: bt2_inspect.cpp $(HEADERS) $(SHARED_CPPS)
+ 	$(CXX) $(RELEASE_FLAGS) \
+ 		$(RELEASE_DEFS) $(CXXFLAGS) \
+ 		$(DEFS) -DBOWTIE2 -DBOWTIE_INSPECT_MAIN -Wall \
+@@ -413,7 +390,7 @@
+ 		$(SHARED_CPPS) \
+ 		$(LDFLAGS) $(LDLIBS)
+ 
+-bowtie2-inspect-l-sanitized bowtie2-inspect-l: bt2_inspect.cpp $(HEADERS) $(SHARED_CPPS)
++bowtie2-inspect-l: bt2_inspect.cpp $(HEADERS) $(SHARED_CPPS)
+ 	$(CXX) $(RELEASE_FLAGS) \
+ 		$(RELEASE_DEFS) $(CXXFLAGS) \
+ 		$(DEFS) -DBOWTIE2 -DBOWTIE_INSPECT_MAIN  -DBOWTIE_64BIT_INDEX -Wall \
+@@ -614,7 +591,7 @@
+ 
+ .PHONY: clean
+ clean:
+-	rm -f $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_DBG) $(BOWTIE2_BIN_LIST_SAN) \
++	rm -f $(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_DBG) \
+ 	$(addsuffix .exe,$(BOWTIE2_BIN_LIST) $(BOWTIE2_BIN_LIST_DBG)) \
+ 	bowtie2-*.zip
+ 	rm -f core.* .tmp.head
+--- bowtie2.orig/bowtie2
++++ bowtie2/bowtie2
+@@ -140,7 +140,6 @@
+ }
+ 
+ my $debug = 0;
+-my $sanitized = 0;
+ my %read_fns = ();
+ my %read_compress = ();
+ my $cap_out = undef;       # Filename for passthrough
+@@ -199,10 +198,6 @@
+ 		$debug = 1;
+ 		$bt2_args[$i] = undef;
+ 	}
+-	if(not $debug and $arg eq "--sanitized") {
+-		$sanitized = 1;
+-		$bt2_args[$i] = undef;
+-	}
+ 	if($arg eq "--no-unal") {
+ 		$no_unal = 1;
+ 		$bt2_args[$i] = undef;
+@@ -503,9 +498,6 @@
+ if ($debug) {
+     $suffix = "-debug";
+ }
+-elsif($sanitized) {
+-    $suffix = "-sanitized";
+-}
+ 
+ # Construct command invoking bowtie2-align
+ quote_params(\@bt2_args);
+--- bowtie2.orig/bowtie2-build
++++ bowtie2/bowtie2-build
+@@ -36,7 +36,6 @@
+ 
+     group = parser.add_mutually_exclusive_group()
+     group.add_argument('--debug', action='store_true')
+-    group.add_argument('--sanitized', action='store_true')
+ 
+     logging.basicConfig(level=logging.ERROR,
+                         format='%(levelname)s: %(message)s'
+@@ -64,10 +63,6 @@
+         build_bin_spec += '-debug'
+         build_bin_l += '-debug'
+ 
+-    if script_options.sanitized:
+-        build_bin_spec += '-sanitized'
+-        build_bin_l += '-sanitized'
+-
+     if script_options.large_index:
+         build_bin_spec = os.path.join(ex_path,build_bin_l)
+     elif len(argv) >= 2:
+--- bowtie2.orig/bowtie2-inspect
++++ bowtie2/bowtie2-inspect
+@@ -34,7 +34,6 @@
+ 
+     group = parser.add_mutually_exclusive_group()
+     group.add_argument('--debug', action='store_true')
+-    group.add_argument('--sanitized', action='store_true')
+ 
+     parser.add_argument('--verbose', action='store_true')
+     parser.add_argument('--large-index', action='store_true')
+@@ -61,10 +60,6 @@
+         inspect_bin_spec += '-debug'
+         inspect_bin_l += '-debug'
+ 
+-    if script_options.sanitized:
+-        inpsect_bin_spec += '-sanitized'
+-        inspect_bin_l += '-sanitized'
+-
+     if script_options.large_index:
+         inspect_bin_spec = os.path.join(ex_path,inspect_bin_l)
+     elif len(argv) >= 1:
+--- bowtie2.orig/scripts/test/simple_tests.pl
++++ bowtie2/scripts/test/simple_tests.pl
+@@ -4602,7 +4602,7 @@
+ 	close(FA);
+ 	if($do_build) {
+ 		my $build_args = "";
+-		my $cmd = "$bowtie2_build $idx_type --quiet --sanity $build_args $fa .simple_tests.tmp";
++		my $cmd = "$bowtie2_build $idx_type --quiet $build_args $fa .simple_tests.tmp";
+ 		print "$cmd\n";
+ 		system($cmd);
+ 		($? == 0) || die "Bad exitlevel from bowtie2-build: $?";
+@@ -4804,7 +4804,7 @@
+ my $tmpfafn = ".simple_tests.pl.fa";
+ my $last_ref = undef;
+ foreach my $large_idx (undef,1) {
+-	foreach my $binary_type ("release", "debug", "sanitized") {
++	foreach my $binary_type ("release", "debug") {
+ 		for (my $ci = 0; $ci < scalar(@cases); $ci++) {
+ 			my $c = $cases[$ci];
+ 			last unless defined($c);
+--- bowtie2.orig/scripts/test/simple_tests.sh
++++ bowtie2/scripts/test/simple_tests.sh
+@@ -21,21 +21,6 @@
+ 
+ #  simple_tests.sh
+ 
+-export ASAN_OPTIONS=halt_on_error=1
+-export UBSAN_OPTIONS=halt_on_error=1
+-
+-#make $* bowtie2-align-s \
+-#		bowtie2-align-l \
+-#		bowtie2-align-s-debug \
+-#		bowtie2-align-l-debug \
+-#		bowtie2-align-s-sanitized \
+-#		bowtie2-align-l-sanitized \
+-#		bowtie2-build-s \
+-#		bowtie2-build-l \
+-#		bowtie2-build-s-debug \
+-#		bowtie2-build-l-debug \
+-#		bowtie2-build-s-sanitized \
+-#		bowtie2-build-l-sanitized && \
+ perl scripts/test/simple_tests.pl \
+ 	--bowtie2=./bowtie2 \
+ 	--bowtie2-build=./bowtie2-build \


=====================================
debian/patches/series
=====================================
@@ -7,3 +7,5 @@ do-not-rebuild-during-test.patch
 2to3.patch
 silence_tbb_deprecation_warning.patch
 simde
+correct_64bit_test
+no_sanity


=====================================
debian/rules
=====================================
@@ -12,10 +12,10 @@ export DEB_CFLAGS_MAINT_APPEND += -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3
 export DEB_CXXFLAGS_MAINT_APPEND += -DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3
 
 EXTRA_OPTIONS =
-ifneq ($(DEB_HOST_ARCH),amd64)
-        EXTRA_OPTIONS += NO_TBB=1 POPCNT_CAPABILITY= M64_FLAG=
+ifneq ($(DEB_TARGET_ARCH),amd64)
+        EXTRA_OPTIONS += NO_TBB=1 POPCNT_CAPABILITY=
 else
-        EXTRA_OPTIONS += POPCNT_CAPABILITY=1 M64_FLAG=-m64
+        EXTRA_OPTIONS += POPCNT_CAPABILITY=1
 endif
 
 export EXTRA_OPTIONS
@@ -34,12 +34,8 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	  bowtie2-align-s-debug \
 	  bowtie2-align-l-debug \
 	  bowtie2-inspect-s-debug \
-	  bowtie2-inspect-l-debug \
-	  bowtie2-align-s-sanitized \
-	  bowtie2-align-l-sanitized \
-	  bowtie2-build-s-sanitized \
-	  bowtie2-build-l-sanitized
-	env --unset=LD_PRELOAD make -j1 test
+	  bowtie2-inspect-l-debug
+	make -j1 test
 endif
 
 override_dh_auto_install:
@@ -50,15 +46,15 @@ override_dh_install:
 
 override_dh_installman:
 	mkdir -p $(CURDIR)/debian/$(pkg)/usr/share/man/man1/
-	env --unset=LD_PRELOAD debian/help2man-wrapper $(pkg) "wrapper for $(pkg)-align-*"
-	env --unset=LD_PRELOAD debian/help2man-wrapper $(pkg)-build "wrapper for $(pkg)-build-*"
-	env --unset=LD_PRELOAD debian/help2man-wrapper $(pkg)-build-l "building a colorspace index for $(pkg)"
-	env --unset=LD_PRELOAD debian/help2man-wrapper $(pkg)-build-s "building a colorspace index for $(pkg)"
-	env --unset=LD_PRELOAD debian/help2man-wrapper $(pkg)-inspect "wrapper for $(pkg)-inspect-* index"
-	env --unset=LD_PRELOAD debian/help2man-wrapper $(pkg)-inspect-l "extracts information from a $(pkg) index"
-	env --unset=LD_PRELOAD debian/help2man-wrapper $(pkg)-inspect-s "extracts information from a $(pkg) index"
-	env --unset=LD_PRELOAD debian/help2man-wrapper $(pkg)-align-l "ultrafast and memory-efficient backend tool for aligning sequencing reads to long reference sequences"
-	env --unset=LD_PRELOAD debian/help2man-wrapper $(pkg)-align-s "ultrafast and memory-efficient backend tool for aligning sequencing reads to long reference sequences"
+	debian/help2man-wrapper $(pkg) "wrapper for $(pkg)-align-*"
+	debian/help2man-wrapper $(pkg)-build "wrapper for $(pkg)-build-*"
+	debian/help2man-wrapper $(pkg)-build-l "building a colorspace index for $(pkg)"
+	debian/help2man-wrapper $(pkg)-build-s "building a colorspace index for $(pkg)"
+	debian/help2man-wrapper $(pkg)-inspect "wrapper for $(pkg)-inspect-* index"
+	debian/help2man-wrapper $(pkg)-inspect-l "extracts information from a $(pkg) index"
+	debian/help2man-wrapper $(pkg)-inspect-s "extracts information from a $(pkg) index"
+	debian/help2man-wrapper $(pkg)-align-l "ultrafast and memory-efficient backend tool for aligning sequencing reads to long reference sequences"
+	debian/help2man-wrapper $(pkg)-align-s "ultrafast and memory-efficient backend tool for aligning sequencing reads to long reference sequences"
 	rm -f $(CURDIR)/debian/$(pkg)/usr/bin/bowtie2-buildc
 
 override_dh_installchangelogs:



View it on GitLab: https://salsa.debian.org/med-team/bowtie2/compare/1cb4b2ab49f3a058f0de9240f448fa42fb33c72e...c1ce5b305d8010c6c451a4ea9cccaf63048327c4

-- 
View it on GitLab: https://salsa.debian.org/med-team/bowtie2/compare/1cb4b2ab49f3a058f0de9240f448fa42fb33c72e...c1ce5b305d8010c6c451a4ea9cccaf63048327c4
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20191218/28a251e6/attachment-0001.html>


More information about the debian-med-commit mailing list