Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error: could not convert ‘cfg().ConfigValues::relay__logging__dumpInAll’ from ‘const string’ to bool #11

Closed
arbedout opened this issue Jan 23, 2023 · 2 comments

Comments

@arbedout
Copy link

$ uname -a
Linux relay-001 5.15.0-52-generic #58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ make
perl golpe/gen-config.pl
golpe/external/rasgueadb/rasgueadb-generate golpe.yaml build
g++ -std=c++20 -O3 -g -Wall -fPIC  -DDOCOPT_HEADER_ONLY -Iinclude -Ibuild -Isrc -Igolpe/external -Igolpe/external/config/include -Igolpe/external/json/include -Igolpe/external/PEGTL/include -Igolpe/external/hoytech-cpp -Igolpe/external/docopt.cpp -Igolpe/external/loguru -Igolpe/external/quadrable/include -MMD -MP -MT golpe/logging.o -MF golpe/logging.d -c golpe/logging.cpp -o golpe/logging.o
g++ -std=c++20 -O3 -g -Wall -fPIC  -DDOCOPT_HEADER_ONLY -Iinclude -Ibuild -Isrc -Igolpe/external -Igolpe/external/config/include -Igolpe/external/json/include -Igolpe/external/PEGTL/include -Igolpe/external/hoytech-cpp -Igolpe/external/docopt.cpp -Igolpe/external/loguru -Igolpe/external/quadrable/include -MMD -MP -MT build/main.o -MF build/main.d -c build/main.cpp -o build/main.o
g++ -std=c++20 -O0 -g -Wall -fPIC  -DDOCOPT_HEADER_ONLY -Iinclude -Ibuild -Isrc -Igolpe/external -Igolpe/external/config/include -Igolpe/external/json/include -Igolpe/external/PEGTL/include -Igolpe/external/hoytech-cpp -Igolpe/external/docopt.cpp -Igolpe/external/loguru -Igolpe/external/quadrable/include -MMD -MP -MT build/config.o -MF build/config.d -c build/config.cpp -o build/config.o
g++ -std=c++20 -O3 -g -Wall -fPIC  -DDOCOPT_HEADER_ONLY -Iinclude -Ibuild -Isrc -Igolpe/external -Igolpe/external/config/include -Igolpe/external/json/include -Igolpe/external/PEGTL/include -Igolpe/external/hoytech-cpp -Igolpe/external/docopt.cpp -Igolpe/external/loguru -Igolpe/external/quadrable/include -MMD -MP -MT src/RelayCron.o -MF src/RelayCron.d -c src/RelayCron.cpp -o src/RelayCron.o
g++ -std=c++20 -O3 -g -Wall -fPIC  -DDOCOPT_HEADER_ONLY -Iinclude -Ibuild -Isrc -Igolpe/external -Igolpe/external/config/include -Igolpe/external/json/include -Igolpe/external/PEGTL/include -Igolpe/external/hoytech-cpp -Igolpe/external/docopt.cpp -Igolpe/external/loguru -Igolpe/external/quadrable/include -MMD -MP -MT src/RelayIngester.o -MF src/RelayIngester.d -c src/RelayIngester.cpp -o src/RelayIngester.o
src/RelayIngester.cpp: In member function ‘void RelayServer::runIngester(ThreadPool<MsgIngester>::Thread&)’:
src/RelayIngester.cpp:20:35: error: could not convert ‘cfg().ConfigValues::relay__logging__dumpInAll’ from ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} to ‘bool’
   20 |                         if (cfg().relay__logging__dumpInAll) LI << "[" << msg->connId << "] dumpInAll: " << msg->payload;
      |                             ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                   |
      |                                   const string {aka const std::__cxx11::basic_string<char>}
src/RelayIngester.cpp:29:39: error: could not convert ‘cfg().ConfigValues::relay__logging__dumpInEvents’ from ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} to ‘bool’
   29 |                             if (cfg().relay__logging__dumpInEvents) LI << "[" << msg->connId << "] dumpInEvent: " << msg->payload;
      |                                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                       |
      |                                       const string {aka const std::__cxx11::basic_string<char>}
src/RelayIngester.cpp:38:39: error: could not convert ‘cfg().ConfigValues::relay__logging__dumpInReqs’ from ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} to ‘bool’
   38 |                             if (cfg().relay__logging__dumpInReqs) LI << "[" << msg->connId << "] dumpInReq: " << msg->payload;
      |                                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                       |
      |                                       const string {aka const std::__cxx11::basic_string<char>}
src/RelayIngester.cpp:46:39: error: could not convert ‘cfg().ConfigValues::relay__logging__dumpInReqs’ from ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} to ‘bool’
   46 |                             if (cfg().relay__logging__dumpInReqs) LI << "[" << msg->connId << "] dumpInReq: " << msg->payload;
      |                                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                       |
      |                                       const string {aka const std::__cxx11::basic_string<char>}
make: *** [golpe/rules.mk:26: src/RelayIngester.o] Error 1

(I've reported a similar error before; if the solution here is to update / change versions lmk, happy to just switch to e.g. whatever version of Debian strfry is being developed on. Cheers!)

@hoytech
Copy link
Owner

hoytech commented Jan 26, 2023

Hey sorry about this! I think this is probably because your submodules are out-of-date. Sometimes I push new changes to the submodules and when you git pull your repo won't update automatically.

You could clone the repo fresh and start over, or try running these commands:

make setup-golpe
make clean && make```

@arbedout
Copy link
Author

Nice, that did it, thanks. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants