smithlabcode / dnmtools

Tools for analyzing DNA methylation data
https://dnmtools.readthedocs.io
GNU General Public License v3.0
25 stars 8 forks source link

Building dnmtools using gcc 8.5.0 #230

Closed andrewdavidsmith closed 2 months ago

andrewdavidsmith commented 2 months ago
          @andrewdavidsmith I tried building the new master - still using gcc/8.5.0 - and still received errors indicating c++17 is insufficient such as the following.
../../../src/abismal/src/AbismalIndex.cpp:41:12: error: 'std::inclusive_scan' has not been declared
 using std::inclusive_scan;
            ^~~~~~~~~~~~~~

module load gcc/8.5.0 htslib/1.19 autoconf/2.71 htslib/1.20 gsl/2.6

Here's the resulting (warning: entire) log of my attempted make. Thanks again.

Command follows...
make
Output follows...
make  all-recursive
make[1]: Entering directory `/lustre/project/PI/build/centos7/dnmtools/build'
Making all in src/smithlab_cpp
make[2]: Entering directory `/lustre/project/PI/build/centos7/dnmtools/build/src/smithlab_cpp'
make  all-am
make[3]: Entering directory `/lustre/project/PI/build/centos7/dnmtools/build/src/smithlab_cpp'
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -Wextra -Wpedantic -O3 -DNDEBUG -MT GenomicRegion.o -MD -MP -MF .deps/GenomicRegion.Tpo -c -o GenomicRegion.o ../../../src/smithlab_cpp/GenomicRegion.cpp
In file included from ../../../src/smithlab_cpp/GenomicRegion.hpp:27,
                 from ../../../src/smithlab_cpp/GenomicRegion.cpp:23:
../../../src/smithlab_cpp/smithlab_utils.hpp:52:2: warning: extra ';' [-Wpedantic]
 };
  ^
mv -f .deps/GenomicRegion.Tpo .deps/GenomicRegion.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -Wextra -Wpedantic -O3 -DNDEBUG -MT MappedRead.o -MD -MP -MF .deps/MappedRead.Tpo -c -o MappedRead.o ../../../src/smithlab_cpp/MappedRead.cpp
In file included from ../../../src/smithlab_cpp/GenomicRegion.hpp:27,
                 from ../../../src/smithlab_cpp/MappedRead.hpp:26,
                 from ../../../src/smithlab_cpp/MappedRead.cpp:23:
../../../src/smithlab_cpp/smithlab_utils.hpp:52:2: warning: extra ';' [-Wpedantic]
 };
  ^
mv -f .deps/MappedRead.Tpo .deps/MappedRead.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -Wextra -Wpedantic -O3 -DNDEBUG -MT OptionParser.o -MD -MP -MF .deps/OptionParser.Tpo -c -o OptionParser.o ../../../src/smithlab_cpp/OptionParser.cpp
In file included from ../../../src/smithlab_cpp/OptionParser.cpp:37:
../../../src/smithlab_cpp/smithlab_utils.hpp:52:2: warning: extra ';' [-Wpedantic]
 };
  ^
mv -f .deps/OptionParser.Tpo .deps/OptionParser.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -Wextra -Wpedantic -O3 -DNDEBUG -MT QualityScore.o -MD -MP -MF .deps/QualityScore.Tpo -c -o QualityScore.o ../../../src/smithlab_cpp/QualityScore.cpp
In file included from ../../../src/smithlab_cpp/QualityScore.cpp:26:
../../../src/smithlab_cpp/smithlab_utils.hpp:52:2: warning: extra ';' [-Wpedantic]
 };
  ^
mv -f .deps/QualityScore.Tpo .deps/QualityScore.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -Wextra -Wpedantic -O3 -DNDEBUG -MT chromosome_utils.o -MD -MP -MF .deps/chromosome_utils.Tpo -c -o chromosome_utils.o ../../../src/smithlab_cpp/chromosome_utils.cpp
In file included from ../../../src/smithlab_cpp/GenomicRegion.hpp:27,
                 from ../../../src/smithlab_cpp/chromosome_utils.hpp:37,
                 from ../../../src/smithlab_cpp/chromosome_utils.cpp:23:
../../../src/smithlab_cpp/smithlab_utils.hpp:52:2: warning: extra ';' [-Wpedantic]
 };
  ^
mv -f .deps/chromosome_utils.Tpo .deps/chromosome_utils.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -Wextra -Wpedantic -O3 -DNDEBUG -MT bisulfite_utils.o -MD -MP -MF .deps/bisulfite_utils.Tpo -c -o bisulfite_utils.o ../../../src/smithlab_cpp/bisulfite_utils.cpp
mv -f .deps/bisulfite_utils.Tpo .deps/bisulfite_utils.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -Wextra -Wpedantic -O3 -DNDEBUG -MT smithlab_os.o -MD -MP -MF .deps/smithlab_os.Tpo -c -o smithlab_os.o ../../../src/smithlab_cpp/smithlab_os.cpp
In file included from ../../../src/smithlab_cpp/smithlab_os.cpp:30:
../../../src/smithlab_cpp/smithlab_utils.hpp:52:2: warning: extra ';' [-Wpedantic]
 };
  ^
mv -f .deps/smithlab_os.Tpo .deps/smithlab_os.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -Wextra -Wpedantic -O3 -DNDEBUG -MT smithlab_utils.o -MD -MP -MF .deps/smithlab_utils.Tpo -c -o smithlab_utils.o ../../../src/smithlab_cpp/smithlab_utils.cpp
In file included from ../../../src/smithlab_cpp/smithlab_utils.cpp:23:
../../../src/smithlab_cpp/smithlab_utils.hpp:52:2: warning: extra ';' [-Wpedantic]
 };
  ^
mv -f .deps/smithlab_utils.Tpo .deps/smithlab_utils.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -Wextra -Wpedantic -O3 -DNDEBUG -MT zlib_wrapper.o -MD -MP -MF .deps/zlib_wrapper.Tpo -c -o zlib_wrapper.o ../../../src/smithlab_cpp/zlib_wrapper.cpp
mv -f .deps/zlib_wrapper.Tpo .deps/zlib_wrapper.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -Wextra -Wpedantic -O3 -DNDEBUG -MT dna_four_bit.o -MD -MP -MF .deps/dna_four_bit.Tpo -c -o dna_four_bit.o ../../../src/smithlab_cpp/dna_four_bit.cpp
mv -f .deps/dna_four_bit.Tpo .deps/dna_four_bit.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -Wextra -Wpedantic -O3 -DNDEBUG -MT cigar_utils.o -MD -MP -MF .deps/cigar_utils.Tpo -c -o cigar_utils.o ../../../src/smithlab_cpp/cigar_utils.cpp
mv -f .deps/cigar_utils.Tpo .deps/cigar_utils.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -Wextra -Wpedantic -O3 -DNDEBUG -MT sam_record.o -MD -MP -MF .deps/sam_record.Tpo -c -o sam_record.o ../../../src/smithlab_cpp/sam_record.cpp
In file included from ../../../src/smithlab_cpp/sam_record.cpp:26:
../../../src/smithlab_cpp/smithlab_utils.hpp:52:2: warning: extra ';' [-Wpedantic]
 };
  ^
mv -f .deps/sam_record.Tpo .deps/sam_record.Po
rm -f libsmithlab_cpp.a
ar cru libsmithlab_cpp.a GenomicRegion.o MappedRead.o OptionParser.o QualityScore.o chromosome_utils.o bisulfite_utils.o smithlab_os.o smithlab_utils.o zlib_wrapper.o dna_four_bit.o cigar_utils.o sam_record.o
ranlib libsmithlab_cpp.a
make[3]: Leaving directory `/lustre/project/PI/build/centos7/dnmtools/build/src/smithlab_cpp'
make[2]: Leaving directory `/lustre/project/PI/build/centos7/dnmtools/build/src/smithlab_cpp'
Making all in src/abismal
make[2]: Entering directory `/lustre/project/PI/build/centos7/dnmtools/build/src/abismal'
make  all-recursive
make[3]: Entering directory `/lustre/project/PI/build/centos7/dnmtools/build/src/abismal'
Making all in src/smithlab_cpp
make[4]: Entering directory `/lustre/project/PI/build/centos7/dnmtools/build/src/abismal/src/smithlab_cpp'
make  all-am
make[5]: Entering directory `/lustre/project/PI/build/centos7/dnmtools/build/src/abismal/src/smithlab_cpp'
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../../../src/abismal/src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -O3 -MT GenomicRegion.o -MD -MP -MF .deps/GenomicRegion.Tpo -c -o GenomicRegion.o ../../../../../src/abismal/src/smithlab_cpp/GenomicRegion.cpp
mv -f .deps/GenomicRegion.Tpo .deps/GenomicRegion.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../../../src/abismal/src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -O3 -MT MappedRead.o -MD -MP -MF .deps/MappedRead.Tpo -c -o MappedRead.o ../../../../../src/abismal/src/smithlab_cpp/MappedRead.cpp
mv -f .deps/MappedRead.Tpo .deps/MappedRead.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../../../src/abismal/src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -O3 -MT OptionParser.o -MD -MP -MF .deps/OptionParser.Tpo -c -o OptionParser.o ../../../../../src/abismal/src/smithlab_cpp/OptionParser.cpp
mv -f .deps/OptionParser.Tpo .deps/OptionParser.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../../../src/abismal/src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -O3 -MT QualityScore.o -MD -MP -MF .deps/QualityScore.Tpo -c -o QualityScore.o ../../../../../src/abismal/src/smithlab_cpp/QualityScore.cpp
mv -f .deps/QualityScore.Tpo .deps/QualityScore.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../../../src/abismal/src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -O3 -MT chromosome_utils.o -MD -MP -MF .deps/chromosome_utils.Tpo -c -o chromosome_utils.o ../../../../../src/abismal/src/smithlab_cpp/chromosome_utils.cpp
mv -f .deps/chromosome_utils.Tpo .deps/chromosome_utils.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../../../src/abismal/src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -O3 -MT bisulfite_utils.o -MD -MP -MF .deps/bisulfite_utils.Tpo -c -o bisulfite_utils.o ../../../../../src/abismal/src/smithlab_cpp/bisulfite_utils.cpp
mv -f .deps/bisulfite_utils.Tpo .deps/bisulfite_utils.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../../../src/abismal/src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -O3 -MT smithlab_os.o -MD -MP -MF .deps/smithlab_os.Tpo -c -o smithlab_os.o ../../../../../src/abismal/src/smithlab_cpp/smithlab_os.cpp
mv -f .deps/smithlab_os.Tpo .deps/smithlab_os.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../../../src/abismal/src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -O3 -MT smithlab_utils.o -MD -MP -MF .deps/smithlab_utils.Tpo -c -o smithlab_utils.o ../../../../../src/abismal/src/smithlab_cpp/smithlab_utils.cpp
mv -f .deps/smithlab_utils.Tpo .deps/smithlab_utils.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../../../src/abismal/src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -O3 -MT zlib_wrapper.o -MD -MP -MF .deps/zlib_wrapper.Tpo -c -o zlib_wrapper.o ../../../../../src/abismal/src/smithlab_cpp/zlib_wrapper.cpp
mv -f .deps/zlib_wrapper.Tpo .deps/zlib_wrapper.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../../../src/abismal/src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -O3 -MT dna_four_bit.o -MD -MP -MF .deps/dna_four_bit.Tpo -c -o dna_four_bit.o ../../../../../src/abismal/src/smithlab_cpp/dna_four_bit.cpp
mv -f .deps/dna_four_bit.Tpo .deps/dna_four_bit.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../../../src/abismal/src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -O3 -MT cigar_utils.o -MD -MP -MF .deps/cigar_utils.Tpo -c -o cigar_utils.o ../../../../../src/abismal/src/smithlab_cpp/cigar_utils.cpp
mv -f .deps/cigar_utils.Tpo .deps/cigar_utils.Po
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../../../src/abismal/src/smithlab_cpp   -I/lustre/project/PI/apps/htslib/1.20/include  -Wall -O3 -MT sam_record.o -MD -MP -MF .deps/sam_record.Tpo -c -o sam_record.o ../../../../../src/abismal/src/smithlab_cpp/sam_record.cpp
mv -f .deps/sam_record.Tpo .deps/sam_record.Po
rm -f libsmithlab_cpp.a
ar cru libsmithlab_cpp.a GenomicRegion.o MappedRead.o OptionParser.o QualityScore.o chromosome_utils.o bisulfite_utils.o smithlab_os.o smithlab_utils.o zlib_wrapper.o dna_four_bit.o cigar_utils.o sam_record.o
ranlib libsmithlab_cpp.a
make[5]: Leaving directory `/lustre/project/PI/build/centos7/dnmtools/build/src/abismal/src/smithlab_cpp'
make[4]: Leaving directory `/lustre/project/PI/build/centos7/dnmtools/build/src/abismal/src/smithlab_cpp'
make[4]: Entering directory `/lustre/project/PI/build/centos7/dnmtools/build/src/abismal'
depbase=`echo src/abismal.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../src/abismal  -I ../../../src/abismal/src/smithlab_cpp -I ../../../src/abismal/src/bamxx -I/lustre/project/PI/apps/htslib/1.20/include -fopenmp -Wall -Wextra -Wpedantic -Wno-unknown-attributes  -O3 -DNDEBUG  -MT src/abismal.o -MD -MP -MF $depbase.Tpo -c -o src/abismal.o ../../../src/abismal/src/abismal.cpp &&\
mv -f $depbase.Tpo $depbase.Po
In file included from ../../../src/abismal/src/abismal.cpp:34:
../../../src/abismal/src/AbismalAlign.hpp:100:2: warning: extra ';' [-Wpedantic]
 };  // namespace simple_aln
  ^
In file included from ../../../src/abismal/src/AbismalIndex.hpp:33,
                 from ../../../src/abismal/src/abismal.cpp:35:
../../../src/abismal/src/smithlab_cpp/smithlab_utils.hpp:52:2: warning: extra ';' [-Wpedantic]
 };
  ^
In file included from ../../../src/abismal/src/abismal.cpp:35:
../../../src/abismal/src/AbismalIndex.hpp:93:2: warning: extra ';' [-Wpedantic]
 };
  ^
In file included from ../../../src/abismal/src/abismal.cpp:37:
../../../src/abismal/src/bamxx/bamxx.hpp:194:2: warning: extra ';' [-Wpedantic]
 };  // namespace bamxx
  ^
cc1plus: warning: unrecognized command line option '-Wno-unknown-attributes'
depbase=`echo src/abismalidx.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../src/abismal  -I ../../../src/abismal/src/smithlab_cpp -I ../../../src/abismal/src/bamxx -I/lustre/project/PI/apps/htslib/1.20/include -fopenmp -Wall -Wextra -Wpedantic -Wno-unknown-attributes  -O3 -DNDEBUG  -MT src/abismalidx.o -MD -MP -MF $depbase.Tpo -c -o src/abismalidx.o ../../../src/abismal/src/abismalidx.cpp &&\
mv -f $depbase.Tpo $depbase.Po
In file included from ../../../src/abismal/src/abismalidx.cpp:19:
../../../src/abismal/src/smithlab_cpp/smithlab_utils.hpp:52:2: warning: extra ';' [-Wpedantic]
 };
  ^
In file included from ../../../src/abismal/src/abismalidx.cpp:24:
../../../src/abismal/src/AbismalIndex.hpp:93:2: warning: extra ';' [-Wpedantic]
 };
  ^
cc1plus: warning: unrecognized command line option '-Wno-unknown-attributes'
depbase=`echo src/AbismalIndex.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../../src/abismal  -I ../../../src/abismal/src/smithlab_cpp -I ../../../src/abismal/src/bamxx -I/lustre/project/PI/apps/htslib/1.20/include -fopenmp -Wall -Wextra -Wpedantic -Wno-unknown-attributes  -O3 -DNDEBUG  -MT src/AbismalIndex.o -MD -MP -MF $depbase.Tpo -c -o src/AbismalIndex.o ../../../src/abismal/src/AbismalIndex.cpp &&\
mv -f $depbase.Tpo $depbase.Po
In file included from ../../../src/abismal/src/AbismalIndex.hpp:33,
                 from ../../../src/abismal/src/AbismalIndex.cpp:18:
../../../src/abismal/src/smithlab_cpp/smithlab_utils.hpp:52:2: warning: extra ';' [-Wpedantic]
 };
  ^
In file included from ../../../src/abismal/src/AbismalIndex.cpp:18:
../../../src/abismal/src/AbismalIndex.hpp:93:2: warning: extra ';' [-Wpedantic]
 };
  ^
In file included from ../../../src/abismal/src/AbismalIndex.cpp:32:
../../../src/abismal/src/bamxx/bamxx.hpp:194:2: warning: extra ';' [-Wpedantic]
 };  // namespace bamxx
  ^
../../../src/abismal/src/AbismalIndex.cpp:41:12: error: 'std::inclusive_scan' has not been declared
 using std::inclusive_scan;
            ^~~~~~~~~~~~~~
../../../src/abismal/src/AbismalIndex.cpp: In member function 'void AbismalIndex::select_two_letter_positions()':
../../../src/abismal/src/AbismalIndex.cpp:460:20: error: found ':' in nested-name-specifier, expected '::'
   for (auto &block : blocks) {
                    ^
                    ::
../../../src/abismal/src/AbismalIndex.cpp:460:14: error: 'block' has not been declared
   for (auto &block : blocks) {
              ^~~~~
../../../src/abismal/src/AbismalIndex.cpp:460:28: error: qualified-id in declaration before ')' token
   for (auto &block : blocks) {
                            ^
../../../src/abismal/src/AbismalIndex.cpp:493:4: error: expected ';' before 'if'
   }
    ^
    ;
   if (VERBOSE) clog << delta_seconds(s_time) << endl;
   ~~
../../../src/abismal/src/AbismalIndex.cpp:494:3: error: expected primary-expression before 'if'
   if (VERBOSE) clog << delta_seconds(s_time) << endl;
   ^~
../../../src/abismal/src/AbismalIndex.cpp:495:1: error: expected primary-expression before '}' token
 }
 ^
../../../src/abismal/src/AbismalIndex.cpp:494:54: error: expected ')' before '}' token
   if (VERBOSE) clog << delta_seconds(s_time) << endl;
                                                      ^
                                                      )
 }
 ~
../../../src/abismal/src/AbismalIndex.cpp:460:7: note: to match this '('
   for (auto &block : blocks) {
       ^
../../../src/abismal/src/AbismalIndex.cpp:495:1: error: expected primary-expression before '}' token
 }
 ^
../../../src/abismal/src/AbismalIndex.cpp:460:3: error: expected iteration declaration or initialization
   for (auto &block : blocks) {
   ^~~
../../../src/abismal/src/AbismalIndex.cpp: In member function 'void AbismalIndex::hash_genome()':
../../../src/abismal/src/AbismalIndex.cpp:505:3: error: 'inclusive_scan' was not declared in this scope
   inclusive_scan(begin(counter), end(counter), begin(counter));
   ^~~~~~~~~~~~~~
../../../src/abismal/src/AbismalIndex.cpp:507:3: error: 'inclusive_scan' was not declared in this scope
   inclusive_scan(begin(counter_t), end(counter_t), begin(counter_t));
   ^~~~~~~~~~~~~~
../../../src/abismal/src/AbismalIndex.cpp:509:3: error: 'inclusive_scan' was not declared in this scope
   inclusive_scan(begin(counter_a), end(counter_a), begin(counter_a));
   ^~~~~~~~~~~~~~
../../../src/abismal/src/AbismalIndex.cpp: In member function 'void AbismalIndex::compress_dp()':
../../../src/abismal/src/AbismalIndex.cpp:665:20: error: found ':' in nested-name-specifier, expected '::'
   for (auto &block : blocks) {
                    ^
                    ::
../../../src/abismal/src/AbismalIndex.cpp:665:14: error: 'block' has not been declared
   for (auto &block : blocks) {
              ^~~~~
../../../src/abismal/src/AbismalIndex.cpp:665:28: error: qualified-id in declaration before ')' token
   for (auto &block : blocks) {
                            ^
../../../src/abismal/src/AbismalIndex.cpp:757:4: error: expected ';' before 'max_candidates'
   }
    ^
    ;
../../../src/abismal/src/AbismalIndex.cpp:759:3:
   max_candidates = 100u;  // GS: this is a heuristic
   ~~~~~~~~~~~~~~
../../../src/abismal/src/AbismalIndex.cpp:760:3: error: expected primary-expression before 'if'
   if (VERBOSE) clog << delta_seconds(s_time) << endl;
   ^~
../../../src/abismal/src/AbismalIndex.cpp:759:25: error: expected ')' before 'if'
   max_candidates = 100u;  // GS: this is a heuristic
                         ^
                         )
   if (VERBOSE) clog << delta_seconds(s_time) << endl;
   ~~
../../../src/abismal/src/AbismalIndex.cpp:665:7: note: to match this '('
   for (auto &block : blocks) {
       ^
../../../src/abismal/src/AbismalIndex.cpp:665:3: error: expected iteration declaration or initialization
   for (auto &block : blocks) {
   ^~~
At global scope:
cc1plus: warning: unrecognized command line option '-Wno-unknown-attributes'
make[4]: *** [src/AbismalIndex.o] Error 1
make[4]: Leaving directory `/lustre/project/PI/build/centos7/dnmtools/build/src/abismal'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/lustre/project/PI/build/centos7/dnmtools/build/src/abismal'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/lustre/project/PI/build/centos7/dnmtools/build/src/abismal'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/lustre/project/PI/build/centos7/dnmtools/build'
make: *** [all] Error 2

Originally posted by @cb4github in https://github.com/smithlabcode/dnmtools/issues/209#issuecomment-2161512142

andrewdavidsmith commented 2 months ago

@cb4github I think the C++ standard included with gcc 8.5.0 does not include all of C++17. I made a conda env and got the most recent build they have of gxx 8.5.0 and this is what I found:

(gcc_eight_point_five_2) [18:09][ build (master*)]$ cat testgpp85.cpp
#include <iostream>
#include <numeric>
#include <vector>

int main(int argc, char *argv[]) {

  std::vector<double> x = {0.0, 1.0, 3.0, 10};

  std::inclusive_scan(begin(x), end(x), begin(x));

  for (auto i: x)
    std::cout << i << std::endl;

  return 0;
}
(gcc_eight_point_five_2) [18:09][ build (master*)]$ g++ --version
g++ (conda-forge gcc 8.5.0-19) 8.5.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(gcc_eight_point_five_2) [18:09][ build (master*)]$ g++ -std=c++17 -o testgpp85 testgpp85.cpp
testgpp85.cpp: In function 'int main(int, char**)':
testgpp85.cpp:9:8: error: 'inclusive_scan' is not a member of 'std'
   std::inclusive_scan(begin(x), end(x), begin(x));
        ^~~~~~~~~~~~~~
(gcc_eight_point_five_2) [18:09][ build (master*)]$ g++-11 -std=c++17 -o testgpp85 testgpp85.cpp
(gcc_eight_point_five_2) [18:09][ build (master*)]$ ./testgpp85 
0
1
4
14
(gcc_eight_point_five_2) [18:09][ build (master*)]$ 

Also, after seeing complaints about these in some old mailing lists, I checked the source for the numeric header between gcc 8.5 and gcc 9.5:

[18:18][garage]$ ls -lh gcc-8.5.0/libstdc++-v3/include/std/numeric 
-rw-rw-r-- 1 andrewds andrewds 5.4K May 14  2021 gcc-8.5.0/libstdc++-v3/include/std/numeric
[18:19][garage]$ ls -lh gcc-9.5.0/libstdc++-v3/include/std/numeric 
-rw-r--r-- 1 andrewds andrewds 25K May 27  2022 gcc-9.5.0/libstdc++-v3/include/std/numeric
[18:19][Garage]$ grep -c inclusive_scan gcc-8.5.0/libstdc++-v3/include/std/numeric 
0
[18:19][garage]$ grep -c inclusive_scan gcc-9.5.0/libstdc++-v3/include/std/numeric 
8
[18:19][garage]$ 

The std::inclusive_scan function isn't the only thing that seems off in gcc 8.5.0, so I'm not sure I should change any sources to support it. I'll close this issue, as it pertains specifically to gcc 8.5.0. Please feel free to open another issue if you encounter a different problem. If you want to discuss how to get dnmtools working for you, please feel free to contact me directly. Thanks again for submitting the issue @cb4github -- it helps!