pmelsted / bifrost

Bifrost: Highly parallel construction and indexing of colored and compacted de Bruijn graphs
BSD 2-Clause "Simplified" License
201 stars 25 forks source link

Build failure with clang 14 #75

Closed outpaddling closed 11 months ago

outpaddling commented 11 months ago

FYI, compiling 1.3.0 with clang 14.0.5:

/usr/bin/c++ -DMAX_GMER_SIZE=32 -DMAX_KMER_SIZE=32 -I/usr/ports/wip/bifrost/work/bifrost-1.3.0/src -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -std=c++11 -O2 -pipe -fstack-protector-strong -fno-strict-aliasing   -DNDEBUG -MD -MT src/CMakeFiles/bifrost_static.dir/BlockedBloomFilter.cpp.o -MF src/CMakeFiles/bifrost_static.dir/BlockedBloomFilter.cpp.o.d -o src/CMakeFiles/bifrost_static.dir/BlockedBloomFilter.cpp.o -c /usr/ports/wip/bifrost/work/bifrost-1.3.0/src/BlockedBloomFilter.cpp
/usr/ports/wip/bifrost/work/bifrost-1.3.0/src/BlockedBloomFilter.cpp:609:143: error: array initializer must be an initializer list
                                                                                    k_(o.k_), M_u64(o.M_u64), seed1(o.seed1), seed2(o.seed2), ush(o.ush) {

As DualBlockedBloomFilter is an array of 2 sets, I think you need to do a memcpy() or std::copy() or something similar to make this portable.

Builds fine with gcc 12.

GuillaumeHolley commented 11 months ago

Hi @outpaddling,

Thanks for catching this. I could reproduce the issue and fixed it in the latest commit with a proper const array initialization ush{o.ush[0], o.ush[1]}. I've deleted the 1.3.0 release and will make a new one.

Thanks!