DFO-Ocean-Navigator / netcdf-timestamp-mapper

Maps timestamps (and variables) to a corresponding nc file using sqlite3.
https://dfo-ocean-navigator.github.io/netcdf-timestamp-mapper/
GNU General Public License v3.0
1 stars 1 forks source link

Issue with compiling on Fedora 36 with g++ (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1) #47

Open dwayne-hart opened 2 years ago

dwayne-hart commented 2 years ago

Fedora 36 has come out with a newer version of the GNU compiler. When compiling the netcdf-timestamp-mapper project the following information is presented in the Linux terminal window.

(index-tool) [on@fedora tools]$ git clone https://github.com/DFO-Ocean-Navigator/netcdf-timestamp-mapper.git
Cloning into 'netcdf-timestamp-mapper'...
remote: Enumerating objects: 3862, done.
remote: Counting objects: 100% (400/400), done.
remote: Compressing objects: 100% (108/108), done.
Receiving objects:  63% (2434/3862)
remote: Total 3862 (delta 338), reused 285 (delta 285), pack-reused 3462
Receiving objects: 100% (3862/3862), 33.53 MiB | 25.04 MiB/s, done.
Resolving deltas: 100% (1472/1472), done.
(index-tool) [on@fedora tools]$ 
(index-tool) [on@fedora tools]$ cd netcdf-timestamp-mapper/
(index-tool) [on@fedora netcdf-timestamp-mapper]$ git submodule update --init --recursive
Submodule 'src/ThirdParty/cxxopts' (https://github.com/jarro2783/cxxopts.git) registered for path 'src/ThirdParty/cxxopts'
Submodule 'tests/ThirdParty/catch2' (https://github.com/catchorg/Catch2.git) registered for path 'tests/ThirdParty/catch2'
Cloning into '/dev/shm/onav-cloud/tools/netcdf-timestamp-mapper/src/ThirdParty/cxxopts'...
Cloning into '/dev/shm/onav-cloud/tools/netcdf-timestamp-mapper/tests/ThirdParty/catch2'...
Submodule path 'src/ThirdParty/cxxopts': checked out 'e6858d3429e0ba5fe6f42ce2018069ce992f3d26'
Submodule path 'tests/ThirdParty/catch2': checked out '6f32c67ea763ff189b55eeb24980ddc2522a80fb'
(index-tool) [on@fedora netcdf-timestamp-mapper]$ make
make clean
make[1]: Entering directory '/dev/shm/onav-cloud/tools/netcdf-timestamp-mapper'
rm -rf ./build
make[1]: Leaving directory '/dev/shm/onav-cloud/tools/netcdf-timestamp-mapper'
mkdir -p ./build
g++ -std=c++17 -Wall -Wextra -Wno-unused-variable -march=native -O3 -pedantic -Wshadow -I/home/on/onav-cloud/tools/miniconda/3/amd64/envs/index-tool/include -Wl,-rpath=/home/on/onav-cloud/tools/miniconda/3/amd64/envs/index-tool/lib -L/home/on/onav-cloud/tools/miniconda/3/amd64/envs/index-tool/lib -o build/nc-timestamp-mapper -I./src/ThirdParty/ src/TimestampMapper.cpp src/Utils/ProgressBar.cpp src/DatasetDesc.cpp src/Database.cpp src/FileReaders/NCFileReader.cpp src/CLIOptions.cpp src/main.cpp -lstdc++fs -lnetcdf-cxx4 -lnetcdf -lsqlite3
In file included from src/CrawlDirectory.hpp:3,
                 from src/TimestampMapper.cpp:4:
src/Utils/HashString.hpp: In instantiation of ‘static constexpr unsigned int tsm::utils::MM<size, size, dummy>::crc32(const char*, unsigned int) [with int size = 5; dummy = void]’:
src/Utils/HashString.hpp:57:36:   required from here
src/CrawlDirectory.hpp:21:14:   in ‘constexpr’ expansion of ‘tsm::utils::MM<5>::crc32(((const char*)"egrep"), 4294967295)’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<5, 1, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(* str)))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<5, 2, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 1))))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<5, 3, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 2))))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<5, 4, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 3))))) & 255)])))’
src/Utils/HashString.hpp:64:51: warning: unused parameter ‘str’ [-Wunused-parameter]
   64 |   static constexpr unsigned int crc32(const char* str, unsigned int prev_crc = 0xFFFFFFFF)
      |                                       ~~~~~~~~~~~~^~~
src/Utils/HashString.hpp: In instantiation of ‘static constexpr unsigned int tsm::utils::MM<size, size, dummy>::crc32(const char*, unsigned int) [with int size = 8; dummy = void]’:
src/Utils/HashString.hpp:57:36:   required from here
src/CrawlDirectory.hpp:29:14:   in ‘constexpr’ expansion of ‘tsm::utils::MM<8>::crc32(((const char*)"extended"), 4294967295)’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<8, 1, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(* str)))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<8, 2, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 1))))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<8, 3, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 2))))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<8, 4, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 3))))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<8, 5, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 4))))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<8, 6, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 5))))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<8, 7, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 6))))) & 255)])))’
src/Utils/HashString.hpp:64:51: warning: unused parameter ‘str’ [-Wunused-parameter]
src/Utils/HashString.hpp: In instantiation of ‘static constexpr unsigned int tsm::utils::MM<size, size, dummy>::crc32(const char*, unsigned int) [with int size = 4; dummy = void]’:
src/Utils/HashString.hpp:57:36:   required from here
src/CrawlDirectory.hpp:33:14:   in ‘constexpr’ expansion of ‘tsm::utils::MM<4>::crc32(((const char*)"grep"), 4294967295)’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<4, 1, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(* str)))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<4, 2, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 1))))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<4, 3, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 2))))) & 255)])))’
src/Utils/HashString.hpp:64:51: warning: unused parameter ‘str’ [-Wunused-parameter]
src/Utils/HashString.hpp: In instantiation of ‘static constexpr unsigned int tsm::utils::MM<size, size, dummy>::crc32(const char*, unsigned int) [with int size = 3; dummy = void]’:
src/Utils/HashString.hpp:57:36:   required from here
src/CrawlDirectory.hpp:37:14:   in ‘constexpr’ expansion of ‘tsm::utils::MM<3>::crc32(((const char*)"awk"), 4294967295)’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<3, 1, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(* str)))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<3, 2, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 1))))) & 255)])))’
src/Utils/HashString.hpp:64:51: warning: unused parameter ‘str’ [-Wunused-parameter]
src/Utils/HashString.hpp: In instantiation of ‘static constexpr unsigned int tsm::utils::MM<size, size, dummy>::crc32(const char*, unsigned int) [with int size = 10; dummy = void]’:
src/Utils/HashString.hpp:57:36:   required from here
src/CrawlDirectory.hpp:41:14:   in ‘constexpr’ expansion of ‘tsm::utils::MM<10>::crc32(((const char*)"ecmascript"), 4294967295)’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<10, 1, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(* str)))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<10, 2, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 1))))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<10, 3, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 2))))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<10, 4, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 3))))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<10, 5, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 4))))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<10, 6, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 5))))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<10, 7, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 6))))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<10, 8, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 7))))) & 255)])))’
src/Utils/HashString.hpp:57:36:   in ‘constexpr’ expansion of ‘tsm::utils::MM<10, 9, void>::crc32(str, ((prev_crc >> 8) ^ ((unsigned int)tsm::utils::crc_table[((prev_crc ^ ((unsigned int)((int)(*(str + 8))))) & 255)])))’
src/Utils/HashString.hpp:64:51: warning: unused parameter ‘str’ [-Wunused-parameter]
src/TimestampMapper.cpp: In member function ‘bool tsm::TimestampMapper::exec()’:
src/TimestampMapper.cpp:53:62: error: ‘ostream_iterator’ is not a member of ‘std’
   53 |         std::copy(filePaths.cbegin(), filePaths.cend(), std::ostream_iterator<std::string>(std::cout, "\n"));
      |                                                              ^~~~~~~~~~~~~~~~
src/TimestampMapper.cpp:10:1: note: ‘std::ostream_iterator’ is defined in header ‘<iterator>’; did you forget to ‘#include <iterator>’?
    9 | #include <fstream>
  +++ |+#include <iterator>
   10 | #include <regex>
src/TimestampMapper.cpp:53:90: error: expected primary-expression before ‘>’ token
   53 |         std::copy(filePaths.cbegin(), filePaths.cend(), std::ostream_iterator<std::string>(std::cout, "\n"));
      |                                                                                          ^
src/TimestampMapper.cpp:53:97: warning: left operand of comma operator has no effect [-Wunused-value]
   53 |         std::copy(filePaths.cbegin(), filePaths.cend(), std::ostream_iterator<std::string>(std::cout, "\n"));
      |                                                                                            ~~~~~^~~~
src/Utils/HashString.hpp: In instantiation of ‘static constexpr unsigned int tsm::utils::MM<size, size, dummy>::crc32(const char*, unsigned int) [with int size = 7; dummy = void]’:
src/Utils/HashString.hpp:57:36:   recursively required from ‘static constexpr unsigned int tsm::utils::MM<size, idx, dummy>::crc32(const char*, unsigned int) [with int size = 7; int idx = 1; dummy = void]’
src/Utils/HashString.hpp:57:36:   required from ‘static constexpr unsigned int tsm::utils::MM<size, idx, dummy>::crc32(const char*, unsigned int) [with int size = 7; int idx = 0; dummy = void]’
src/CrawlDirectory.hpp:20:13:   required from here
src/Utils/HashString.hpp:64:51: warning: unused parameter ‘str’ [-Wunused-parameter]
   64 |   static constexpr unsigned int crc32(const char* str, unsigned int prev_crc = 0xFFFFFFFF)
      |                                       ~~~~~~~~~~~~^~~
src/DatasetDesc.cpp: In constructor ‘tsm::ds::DatasetDesc::DatasetDesc(const std::vector<std::filesystem::__cxx11::path>&, tsm::ds::DATASET_TYPE)’:
src/DatasetDesc.cpp:13:24: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::filesystem::__cxx11::path>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   13 |     for (auto i = 0; i < filePaths.size(); ++i) {
      |                      ~~^~~~~~~~~~~~~~~~~~
src/Database.cpp: In lambda function:
src/Database.cpp:76:48: warning: unused parameter ‘pArg’ [-Wunused-parameter]
   76 |     sqlite3_config(SQLITE_CONFIG_LOG, [](void* pArg, int iErrCode, const char* zMsg) {
      |                                          ~~~~~~^~~~
make: *** [Makefile:18: all] Error 1