biod / sambamba

Tools for working with SAM/BAM data
http://thebird.nl/blog/D_Dragon.html
GNU General Public License v2.0
558 stars 104 forks source link

Fails to build: BioD/bio/maf/reader.d(53): Error: cannot implicitly convert expression #366

Closed rekado closed 5 years ago

rekado commented 6 years ago

I'm building Sambamba 0.6.7-10-g223fa20 for Guix. Since upgrades to LLVM and possibly ldc the build now fails with this output:

./gen_ldc_version_info.py /gnu/store/m87vrhgi279b5715yk0fivdq8g81dxbl-ldc-1.10.0/bin/ldmd2 > utils/ldc_version_info_.d
cat utils/ldc_version_info_.d
module utils.ldc_version_info_;
immutable LDC_VERSION_STRING = "1.10.0";
immutable BOOTSTRAP_VERSION_STRING = "LDC - the LLVM D compiler (0.17.4)";
immutable DMD_VERSION_STRING = "v2.080.1";
immutable LLVM_VERSION_STRING = "6.0.1";
mkdir -p build/
ldc2 -singleobj -wi -I. -IBioD -IundeaD/src -g -O3 -release -enable-inlining -boundscheck=off -c -of=build/sambamba.o main.d utils/strip_bcf_header.d utils/lz4.d utils/ldc_version_info_.d utils/version_.d thirdparty/mergesort.d thirdparty/unstablesort.d cram/wrappers.d cram/reader.d cram/exception.d cram/writer.d cram/slicereader.d cram/reference.d cram/htslib.d undeaD/src/undead/datebase.d undeaD/src/undead/bitarray.d undeaD/src/undead/cstream.d undeaD/src/undead/regexp.d undeaD/src/undead/dateparse.d undeaD/src/undead/stream.d undeaD/src/undead/string.d undeaD/src/undead/doformat.d undeaD/src/undead/metastrings.d undeaD/src/undead/date.d undeaD/src/undead/socketstream.d undeaD/src/undead/utf.d BioD/bio/core/tinymap.d BioD/bio/core/sequence.d BioD/bio/core/kmer.d BioD/bio/core/base.d BioD/bio/core/fasta.d BioD/bio/core/genotype.d BioD/bio/core/call.d BioD/bio/core/region.d BioD/bio/sam/reader.d BioD/bio/sam/header.d BioD/bio/bam/tagvalue.d BioD/bio/bam/multireader.d BioD/bio/bam/reader.d BioD/bio/bam/baseinfo.d BioD/bio/bam/abstractreader.d BioD/bio/bam/read.d BioD/bio/bam/referenceinfo.d BioD/bio/bam/randomaccessmanager.d BioD/bio/bam/constants.d BioD/bio/bam/baifile.d BioD/bio/bam/writer.d BioD/bio/bam/readrange.d BioD/bio/bam/reference.d BioD/bio/bam/pileup.d BioD/bio/bam/splitter.d BioD/bio/bam/region.d BioD/bio/sff/reader.d BioD/bio/sff/read.d BioD/bio/sff/constants.d BioD/bio/sff/writer.d BioD/bio/sff/readrange.d BioD/bio/sff/index.d BioD/bio/maf/reader.d BioD/bio/maf/block.d BioD/bio/maf/parser.d BioD/bio/core/bgzf/compress.d BioD/bio/core/bgzf/o
BioD/bio/maf/reader.d(40): Deprecation: struct `std.stdio.File.ByLine!(char, char).ByLine` is deprecated - Use .byLine
cram/wrappers.d(192): Deprecation: Comparison between different enumeration types `cram_content_type` and `cram_content_type`; If this behavior is intended consider using `std.conv.asOriginalType`
undeaD/src/undead/regexp.d(211): Deprecation: The `delete` keyword has been deprecated.  Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
undeaD/src/undead/regexp.d(293): Deprecation: The `delete` keyword has been deprecated.  Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
undeaD/src/undead/regexp.d(370): Deprecation: The `delete` keyword has been deprecated.  Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
undeaD/src/undead/regexp.d(460): Deprecation: The `delete` keyword has been deprecated.  Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
undeaD/src/undead/regexp.d(544): Deprecation: The `delete` keyword has been deprecated.  Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
undeaD/src/undead/regexp.d(597): Deprecation: The `delete` keyword has been deprecated.  Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
undeaD/src/undead/regexp.d(939): Deprecation: The `delete` keyword has been deprecated.  Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
undeaD/src/undead/regexp.d(3021): Deprecation: integral promotion not done for `~prog[i + 1LU + 4LU + cast(ulong)b]`, use '-transition=intpromote' switch or `~cast(int)(prog[i + 1LU + 4LU + cast(ulong)b])`
undeaD/src/undead/stream.d(2848): Deprecation: The `delete` keyword has been deprecated.  Use `object.destroy()` (and `core.memory.GC.free()` if applicable) instead.
BioD/bio/core/utils/format.d(61): Deprecation: integral promotion not done for `-value`, use '-transition=intpromote' switch or `-cast(int)(value)`
BioD/bio/core/utils/format.d(61): Deprecation: integral promotion not done for `-value`, use '-transition=intpromote' switch or `-cast(int)(value)`
BioD/bio/bam/read.d(1236): Deprecation: integral promotion not done for `~mask`, use '-transition=intpromote' switch or `~cast(int)(mask)`
BioD/bio/maf/reader.d(53): Error: cannot implicitly convert expression `this._f.byLine(cast(Flag)true, '\x0a')` of type `ByLineImpl!(char, char)` to `ByLine!(char, char)`
sam_alignment.rl(51): Warning: statement is not reachable
[...]
sam_alignment.rl(407): Warning: statement is not reachable
/gnu/store/m87vrhgi279b5715yk0fivdq8g81dxbl-ldc-1.10.0/include/d/std/numeric.d(1845): Error: read-modify-write operations are not allowed for `shared` variables. Use `core.atomic.atomicOp!"+="(s, e)` instead.
/gnu/store/m87vrhgi279b5715yk0fivdq8g81dxbl-ldc-1.10.0/include/d/std/numeric.d(1871): Error: read-modify-write operations are not allowed for `shared` variables. Use `core.atomic.atomicOp!"*="(e, f)` instead.
sambamba/merge.d(407): Error: template instance `std.numeric.normalize!(shared(float)[])` error instantiating
sambamba/markdup.d(1140): Deprecation: struct `std.datetime.StopWatch` is deprecated - Use std.datetime.stopwatch.StopWatch.
sambamba/markdup.d(1140): Deprecation: struct `std.datetime.StopWatch` is deprecated - Use std.datetime.stopwatch.StopWatch.
sambamba/markdup.d(1068): Deprecation: struct `std.datetime.StopWatch` is deprecated - Use std.datetime.stopwatch.StopWatch.
sambamba/markdup.d(1068): Deprecation: struct `std.datetime.StopWatch` is deprecated - Use std.datetime.stopwatch.StopWatch.
sambamba/sort.d(265): Error: template instance `sambamba.sort.Sorter.mergeSortedChunks!(compareReadNames)` error instantiating
sambamba/sort.d(267): Error: template instance `sambamba.sort.Sorter.mergeSortedChunks!(mixedCompareReadNames)` error instantiating
sambamba/sort.d(269): Error: template instance `sambamba.sort.Sorter.mergeSortedChunks!(compareCoordinatesAndStrand)` error instantiating

Should I be using a different version of the D compiler or LLVM?

pjotrp commented 6 years ago

Thanks @rekado. I am putting out a new release this week which fixes ldc+llvm issues. Much faster too. Also talking with Debian and bioconda in different issues.

rekado commented 5 years ago

Should I be using 0.6.8-pre3 at this point?

Or is there something else I can do to fix the build? Older version of ldc, maybe?

pjotrp commented 5 years ago

Master branch should be fine. I am going to do a release real soon. Just got caught up in chasing gemma bugs.

pjotrp commented 5 years ago

I updated BioD and released a new sambamba. https://github.com/biod/sambamba/releases/tag/v0.6.8