[med-svn] [Git][med-team/snap-aligner][master] 5 commits: Enable building on non-x86 systems via libsimde-dev
Michael R. Crusoe
gitlab at salsa.debian.org
Sun Nov 29 07:47:03 GMT 2020
Michael R. Crusoe pushed to branch master at Debian Med / snap-aligner
Commits:
5c5cd54d by Michael R. Crusoe at 2020-11-29T08:40:38+01:00
Enable building on non-x86 systems via libsimde-dev
- - - - -
29cb972a by Michael R. Crusoe at 2020-11-29T08:40:39+01:00
debian/patches/fix_segfault: patch from upstream to fix a segfault I found during testing.
- - - - -
1474a0bb by Michael R. Crusoe at 2020-11-29T08:43:43+01:00
final update to autopkgtest data
- - - - -
ae172df8 by Michael R. Crusoe at 2020-11-29T08:44:38+01:00
routine-update: Remove trailing whitespace in debian/control
- - - - -
a60ea600 by Michael R. Crusoe at 2020-11-29T08:45:17+01:00
routine-update: Ready to upload to unstable
- - - - -
7 changed files:
- debian/changelog
- debian/control
- + debian/patches/fix_segfault.patch
- debian/patches/series
- + debian/patches/simde
- debian/rules
- debian/tests/ref/output.sam
Changes:
=====================================
debian/changelog
=====================================
@@ -1,13 +1,15 @@
-snap-aligner (1.0.0+dfsg-1) UNRELEASED; urgency=medium
+snap-aligner (1.0.0+dfsg-1) unstable; urgency=medium
* New upstream version
* Standards-Version: 4.5.1 (routine-update)
* Freshen patches.
* debian/docs: Update filename of the manual
* debian/control: try building on s390x and riscv64
- TODO: final autopkgtest segfaults: https://github.com/amplab/snap/issues/129
+ * Enable building on non-x86 systems via libsimde-dev
+ * debian/patches/fix_segfault: patch from upstream to fix a segfault I found
+ during testing.
- -- Michael R. Crusoe <crusoe at debian.org> Sat, 28 Nov 2020 15:36:09 +0100
+ -- Michael R. Crusoe <crusoe at debian.org> Sun, 29 Nov 2020 08:44:51 +0100
snap-aligner (1.0~beta.18+dfsg-4) unstable; urgency=medium
=====================================
debian/control
=====================================
@@ -6,7 +6,8 @@ Section: science
Priority: optional
Build-Depends: debhelper-compat (= 13),
help2man,
- zlib1g-dev
+ zlib1g-dev,
+ libsimde-dev
Standards-Version: 4.5.1
Vcs-Browser: https://salsa.debian.org/med-team/snap-aligner
Vcs-Git: https://salsa.debian.org/med-team/snap-aligner.git
@@ -14,7 +15,7 @@ Homepage: http://snap.cs.berkeley.edu/
Rules-Requires-Root: no
Package: snap-aligner
-Architecture: amd64 arm64 mips64el ppc64el s390x alpha kfreebsd-amd64 ppc64 riscv64 sparc64
+Architecture: amd64 arm64 mips64el ppc64el s390x alpha kfreebsd-amd64 ppc64 riscv64 sparc64
Depends: ${shlibs:Depends},
${misc:Depends}
Description: Scalable Nucleotide Alignment Program
=====================================
debian/patches/fix_segfault.patch
=====================================
@@ -0,0 +1,37 @@
+From 652076614793f24bbd4f34cb8193269f6661486c Mon Sep 17 00:00:00 2001
+From: Arun Subramaniyan <sarun2006k1in at gmail.com>
+Date: Sat, 28 Nov 2020 16:58:17 -0500
+Subject: [PATCH] Fix segmentation fault when prefetching empty mapped overflow
+ table
+
+---
+ SNAPLib/GenericFile_map.cpp | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/SNAPLib/GenericFile_map.cpp b/SNAPLib/GenericFile_map.cpp
+index 652e5b9..c789d24 100644
+--- a/SNAPLib/GenericFile_map.cpp
++++ b/SNAPLib/GenericFile_map.cpp
+@@ -29,6 +29,9 @@ Revision History:
+ GenericFile_map *GenericFile_map::open(const char *filename)
+ {
+ size_t fileSize = QueryFileSize(filename);
++ if (0 == fileSize) {
++ return new GenericFile_map(NULL, NULL, 0);
++ }
+ void *contents;
+ MemoryMappedFile *mappedFile = OpenMemoryMappedFile(filename, 0, fileSize, &contents);
+
+@@ -58,7 +61,11 @@ GenericFile_map::~GenericFile_map()
+ _int64
+ GenericFile_map::prefetch()
+ {
+- AdviseMemoryMappedFilePrefetch(mappedFile);
++ if (NULL == mappedFile) {
++ return 0;
++ }
++
++ AdviseMemoryMappedFilePrefetch(mappedFile);
+ int pageSize = getpagesize();
+
+ _int64 total = 0;
=====================================
debian/patches/series
=====================================
@@ -1,3 +1,5 @@
+fix_segfault.patch
non-x86-and-kfreebsd
drop-msse
spelling
+simde
=====================================
debian/patches/simde
=====================================
@@ -0,0 +1,30 @@
+From: Michael R. Crusoe <crusoe at debian.org>
+Subject: Enable building on non-x86 systems
+Forwarded: https://github.com/amplab/snap/pull/130
+--- snap-aligner.orig/SNAPLib/Compat.h
++++ snap-aligner/SNAPLib/Compat.h
+@@ -77,12 +77,18 @@
+ #include <sched.h> // For sched_setaffinity
+ #endif
+
+-#if defined(__SSE__) && !defined(__APPLE__)
+-#include <xmmintrin.h> // This is currently (in Dec 2013) broken on Mac OS X 10.9 (Apple clang-500.2.79)
+-#else
+-#define _mm_prefetch(...) {}
+-#include <emmintrin.h> // For vector types like __m128i
+-#endif
++#define SIMDE_ENABLE_NATIVE_ALIASES
++#include <simde/x86/sse2.h>
++#if !defined(SIMDE_X86_SSE_NATIVE) && !defined(SIMDE_MATH_SLEEF_ENABLE)
++HEDLEY_DIAGNOSTIC_PUSH
++ #if HEDLEY_HAS_WARNING("-Wreserved-id-macro")
++ _Pragma("clang diagnostic ignored \"-Wreserved-id-macro\"")
++ #endif
++# define _MM_HINT_T0 1
++# define _MM_HINT_T1 2
++# define _MM_HINT_T2 3
++HEDLEY_DIAGNOSTIC_POP
++#endif
+
+ typedef int64_t _int64;
+ typedef uint64_t _uint64;
=====================================
debian/rules
=====================================
@@ -5,7 +5,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/default.mk
VERSION := $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/+dfsg//')
-export DEB_CXXFLAGS_MAINT_APPEND=-std=gnu++98
+export DEB_CXXFLAGS_MAINT_APPEND=-std=gnu++98 -O3 -fopenmp-simd -DSIMDE_ENABLE_OPENMP
%:
dh $@
=====================================
debian/tests/ref/output.sam
=====================================
@@ -1,6 +1,6 @@
@HD VN:1.4 SO:unsorted
@RG ID:FASTQ PL:Illumina PU:pu LB:lb SM:sm
- at PG ID:SNAP PN:SNAP CL:single datatest datatest.fq -o output.sam VN:1.0beta.18
+ at PG ID:SNAP PN:SNAP CL:single datatest datatest.fq -o output.sam VN:1.0.0
@SQ SN:ref1 LN:202
read1 0 ref1 1 70 101M * 0 0 GTCACAAATGCCACAGAGCAAATGGTCCTGAACAAGCAAACAGAACAGGCCCAGAACACGCCAACCTGTTGAAGACAGAAAGTAGCTTCGTGGCCGGGGGG - at 4>3.>,;$B;A>@&A<<5:@5A?<6<1,>='=7A99=<;7;61></'3+5(<&5,0)30%/=:(&(842&54-+,578)776;.*,&/538)/%$(1,- PG:Z:SNAP NM:i:0 RG:Z:FASTQ PL:Z:Illumina PU:Z:pu LB:Z:lb SM:Z:sm
read1 0 ref1 102 70 101M * 0 0 CCACAGCTCTGACTCCTGCATCCTTCTCCTGTGAAGGGGAGGGAGGTGGTGCTGCAGGGGAGGGGAGGGGGCTAGGAGATGTCACTGGGAGCGGAAACGGC 9;6@;:>:2(5.293?+,72$78:974?C>382;A?=:83;96:AB1>=D at 4A;C=AD+<E9=;CBC$<EB2 at A;BF=EE.FA5>ECE(%FFCDBB1A??F PG:Z:SNAP NM:i:0 RG:Z:FASTQ PL:Z:Illumina PU:Z:pu LB:Z:lb SM:Z:sm
View it on GitLab: https://salsa.debian.org/med-team/snap-aligner/-/compare/b69b252998ec93bb3e82f20330f2da75465df0be...a60ea60084197d5573f809a8afda46b706a9ced4
--
View it on GitLab: https://salsa.debian.org/med-team/snap-aligner/-/compare/b69b252998ec93bb3e82f20330f2da75465df0be...a60ea60084197d5573f809a8afda46b706a9ced4
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/20201129/d61304ac/attachment-0001.html>
More information about the debian-med-commit
mailing list