Error: call of overloaded ‘to_ubjson(json&, std::ofstream&)’ is ambiguous
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:
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; }
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); }
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); }
Could you tell us exactly what distribution of Linux you use? And the compiler and version you use? Eg output of this:
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
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!
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)I have E+ input files that are of the 9.4 version and unfortunately, I have the 9.6 version installed on my local computer. Due to this, I am trying to build the E+ for the 9.4 version since updating the large volume of files through the IDFVersionUpdater did not work well. It froze after the first hundred files. While building E+ on the Linux Environment, using the "make" command, it shows me this error. As for your question, I did run the git sha (git rev-parse HEAD) and this is what I am getting in return as the output: fatal: Not a git repository. Stopping at filesystem boundary.
You need to change directory to where you clone the git repository obviously :) cd /path/to/EnergyPlus && git rev-parse HEAD