Error: call of overloaded ‘to_ubjson(json&, std::ofstream&)’ is ambiguous

asked 2022-05-11 11:28:25 -0500

AayushiG's avatar

updated 2022-05-12 01:52:30 -0500

I'm trying to build EnergyPlus on my local machine (Linux release 7.5.1804) with Python version 3.7.3. It compiles through all the dependency files (airflownetworklib) but it throws an error on the main.cpp file at the end. Here is the error, Error: call of overloaded ‘to_ubjson(json&, std::ofstream&)’ is ambiguous. The call for the function: json::to_ubjson(epJSON, convertedFS);

The functions for which the error has been raised are:

  1. static std::vector<uint8_t> to_ubjson(const basic_json& j, const bool use_size = false, const bool use_type = false) { std::vector<uint8_t> result; to_ubjson(j, result, use_size, use_type); return result; }

  2. static void to_ubjson(const basic_json& j, detail::output_adapter< uint8_t> o, const bool use_size = false, const bool use_type = false) { binary_writer< uint8_t>(o).write_ubjson(j, use_size, use_type); }

  3. static void to_ubjson(const basic_json& j, detail::output_adapter< char> o, const bool use_size = false, const bool use_type = false) { binary_writer< char>(o).write_ubjson(j, use_size, use_type); }

image description

edit retag flag offensive close merge delete

Comments

Could you tell us exactly what distribution of Linux you use? And the compiler and version you use? Eg output of this:

lsb_release -ds
gcc --version

Also please tell us which commit you're trying to build exactly (the git SHA / tag), cf to the E+ directory and do git rev-parse HEAD

Julien Marrec's avatar Julien Marrec  ( 2022-05-12 01:55:39 -0500 )edit

Hello @Julien, Thank you for your response. The output for the lsb_release -d command is: "CentOS Linux release 7.5.1804 (Core)" and the output for the gcc --version command is: "gcc (GCC) 7.2.0." For the commit I am trying to build, I am following this link as the main source: https://github.com/NREL/EnergyPlus/wi... Through this, I am following the steps to build on a Linux platform. The error is on the last step at the “make” command, while compiling the main.cpp file having the call for the function: json::to_ubjson(epJSON, convertedFS); Please let me know if this helps!

AayushiG's avatar AayushiG  ( 2022-05-13 10:40:01 -0500 )edit

CentOS is not officially supported. What are you trying to do? Just run E+ on centos? If so, for OpenStudio SDK we have prebuilt EnergyPlus V22-1-0 on Centos7, and you can download it from https://openstudio-resources.s3.amazo...

otherwise, if you need to do a debug build or something, I would need the actual git sha (git rev-parse HEAD) to see what's going on, and you should probably also try to pull the latest develop (or checkout the v22.1.0 tag, which I know works)

Julien Marrec's avatar Julien Marrec  ( 2022-05-16 01:45:17 -0500 )edit