From cdb73f51a06e618a5d7d73d9e9a178c13bdb928e Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sat, 31 Jul 2021 11:29:40 +0200 Subject: [PATCH] Fix build for LDC 1.26.0 and LLVM 9.0.1 - tests pass --- .guix-build | 3 ++- INSTALL.md | 7 +++++-- Makefile.guix | 4 ++-- RELEASE-NOTES.md | 1 + VERSION | 2 +- sambamba/pileup.d | 1 + test/test_suite.sh | 4 ++-- 7 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.guix-build b/.guix-build index 2459bd29..56a88cd9 100644 --- a/.guix-build +++ b/.guix-build @@ -1,3 +1,4 @@ # This command creates a build container for Sambamba using GNU Guix -guix environment -C guix --ad-hoc gcc-toolchain gdb bash ld-wrapper ldc which python git binutils-gold vim zlib +env GUIX_PACKAGE_PATH=~/iwrk/opensource/guix/guix-bioinformatics \ +guix environment -C guix --ad-hoc gcc-toolchain gdb bash ld-wrapper ldc which python git binutils-gold vim zlib $* diff --git a/INSTALL.md b/INSTALL.md index 84834ce5..39455452 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -18,7 +18,7 @@ and run our development setup (gold was added lately by ldc) guix environment -C guix --ad-hoc gcc-toolchain gdb bash ld-wrapper ldc which python git binutils-gold vim make clean - make -f Makefile.guix -j 4 + env CC=gcc make -f Makefile.guix -j 4 make -f Makefile.guix check this way all dependencies are isolated. To create a static release use @@ -31,7 +31,10 @@ We use GNU Guix containers for development. Install Guix and run a build container with . .guix-build - make -f Makefile.guix + make -f Makefile.guix clean + # build the debug version + env CC=gcc make -f Makefile.guix lz4-static -j 8 + env CC=gcc make -f Makefile.guix -j 8 make -f Makefile.guix check Note that this also works in the emacs shell. diff --git a/Makefile.guix b/Makefile.guix index cd37ce72..adc08342 100644 --- a/Makefile.guix +++ b/Makefile.guix @@ -31,7 +31,7 @@ LIBS = -L-L$(LDC_LIB_PATH) -L-lrt -L-lpthread -L-lm -L-lz lz4/lib/liblz4.a LIBS_STATIC = $(DLIBS) lz4/lib/liblz4.a SRC = $(wildcard main.d utils/*.d thirdparty/*.d) $(wildcard BioD/contrib/undead/*.d BioD/contrib/undead/*/*.d) $(wildcard BioD/bio/*/*.d BioD/bio/*/*/*.d BioD/bio/*/*/*/*.d BioD/bio/*/*/*/*/*.d BioD/bio/*/*/*/*/*/*/*.d) $(wildcard sambamba/*.d sambamba/*/*.d sambamba/*/*/*.d) -OBJ = $(SRC:.d=.o) utils/ldc_version_info_.o +OBJ = $(SRC:.d=.o) OUT = bin/sambamba-$(shell cat VERSION) static: OUT += -static @@ -116,7 +116,7 @@ clean-c: rm -v lz4/lib/*.[oa] clean-d: - rm -v $(OBJ) $(OUT) trace.{def,log} + rm -v $(OBJ) $(OUT) # trace.{def,log} rm -v bin/* clean-tests: diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index db93b4c1..14094905 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -2,6 +2,7 @@ + Some FASTA unittests break when they write to disk and read after - marked with ~version(Broken)~ ++ Fix build for LDC 1.26.0 and LLVM 9.0.1 ## ChangeLog v0.8.0 (20201130) diff --git a/VERSION b/VERSION index a3df0a69..4cac817b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.0 +0.8.1-pre1 diff --git a/sambamba/pileup.d b/sambamba/pileup.d index 3a746784..010afca2 100644 --- a/sambamba/pileup.d +++ b/sambamba/pileup.d @@ -749,4 +749,5 @@ int pileup_main(string[] args) { return 1; } } + return 0; } diff --git a/test/test_suite.sh b/test/test_suite.sh index 960b3f42..7e4c35e6 100755 --- a/test/test_suite.sh +++ b/test/test_suite.sh @@ -5,7 +5,7 @@ sambamba=$1 if [ ! -f $sambamba ]; then sambamba=./bin/sambamba fi -opts="-q" +opts="-q --DRT-testmode=run-main" outdir=output mkdir -p $outdir @@ -207,7 +207,7 @@ testIssue356(){ assertEquals 0 $? } -testIssue421(){ +testIssue421(){ # sambamba-markdup: not enough data in stream https://github.com/biod/sambamba/issues/421 cat test/issue_204.bam | $sambamba $opts markdup /dev/stdin test.bam 2> /dev/null # assertEquals 0 $? Disable test until we have a single pass, see issue 421