rgcgithub / regenie

regenie is a C++ program for whole genome regression modelling of large genome-wide association studies.
https://rgcgithub.github.io/regenie
Other
189 stars 55 forks source link

Build failure with GCC 13.2 #563

Open emyr666 opened 1 month ago

emyr666 commented 1 month ago

I think gcc 13.2 and later are more strict about needing to have headers included in a file if you are using functions there.

g++ -O3 -Wall -std=c++17 -DWITH_HTSLIB -o bgz_writer.o -c bgz_writer.cpp -I../eigen-3.4.0/ bgz_writer.cpp: In constructor ‘BgzWriter::BgzWriter(BgzWriter&&)’: bgz_writer.cpp:38:14: error: ‘exchange’ is not a member of ‘std’ 38 | , bgzf(std::exchange(other.bgzf, nullptr)) | ^~~~ bgz_writer.cpp:3:1: note: ‘std::exchange’ is defined in header ‘’; did you forget to ‘#include ’? 2 | #include "bgz_writer.hpp" +++ |+#include

emyr666 commented 1 month ago

The above is fixed by adding #include to the top of bgz_writer.cpp. The build proceeds but hits another problem...

In file included from src/Geno.hpp:35, from src/Data.cpp:44: src/bgen_to_vcf.hpp:12:10: fatal error: genfile/bgen/bgen.hpp: No such file or directory 12 | #include "genfile/bgen/bgen.hpp" | ^~~~~~~ compilation terminated.

There is no genfile folder within the source tree. If this is meant to load something outside the source tree it should use <> for the include instead of quotes. Or is there meant to be a genfile module here ? Where does that come from?

emyr666 commented 1 month ago

I realised I was using the wrong. Now it works. The original issue still stands but I guess this is an issue for the 3rd party module remeta and not related to regenie itself.