windytan/redsea

Cannot compile on Ubuntu 20.04: nlohmann-json3 outdated

Closed this issue · 1 comments

Problem is in nlohmann-json3-dev. Package manager bring version 3.7.3 so compile fails.

Workaround:

Install latest nlohmann-json3-dev 3.11 version from future Ubuntu releases deb archives.

Can get here:
https://packages.ubuntu.com/noble/all/nlohmann-json3-dev/download

Logs looks like:

...
../src/tmc/tmc.h:152:13: error: ‘ordered_json’ in namespace ‘nlohmann’ does not name a type
  152 |   nlohmann::ordered_json json() const;
      |             ^~~~~~~~~~~~
../src/tmc/tmc.h:192:55: error: ‘nlohmann::ordered_json’ has not been declared
  192 |   void receiveSystemGroup(uint16_t message, nlohmann::ordered_json*);
      |                                                       ^~~~~~~~~~~~
../src/tmc/tmc.h:193:71: error: ‘nlohmann::ordered_json’ has not been declared
  193 |   void receiveUserGroup(uint16_t x, uint16_t y, uint16_t z, nlohmann::ordered_json*);
      |                                                                       ^~~~~~~~~~~~
...

Hi, thanks a lot for the report and finding out the cause! I fixed it by making meson download the newest version automatically.