Bump conan dependencies (which will allow MSVC 2022 and C++20) and clang 13.1+ fixes#4596
Conversation
…plement workaround
Similar to the C++ 20 branch commit: 1a6c628
… am applying it to conan-openstudio-ruby at the same time)
… called with a boost::optional ``` 1596 | BOOST_STATIC_ASSERT_MSG(sizeof(CharType) == 0, "If you want to output boost::optional, include header <boost/optional/optional_io.hpp>"); ```
…:filesystem (which is worse), and doesn't treat a directory with a trailing separator the same way cf https://www.boost.org/doc/libs/1_78_0/libs/filesystem/doc/v4.html
| name: "Conan Dependabot" | ||
| on: | ||
| # schedule: | ||
| # # Every week on Thursdays | ||
| # - cron: '23 10 * * 4' | ||
| push: | ||
| branches: [ bump_deps, dependabot_conan ] | ||
|
|
||
| jobs: |
There was a problem hiding this comment.
I added a dependabot for conan...
ConanInstall.cmake
Outdated
| set(CONAN_RUBY | ||
| "openstudio_ruby/2.7.2@jmarrec/testing#98444b7bc8d391ea1521d7f79d4d4926" | ||
| ) # TODO: pending https://github.com/NREL/conan-openstudio-ruby/pull/39 |
There was a problem hiding this comment.
| "openssl/1.1.1o#213dbdeb846a4b40b4dec36cf2e673d7" # force every package to align on the same as our conan-openstudio-ruby | ||
| "boost/1.79.0#f664bfe40e2245fa9baf1c742591d582" | ||
| "pugixml/1.12.1#5a39f82651eba3e7d6197903a3202e21" | ||
| "jsoncpp/1.9.5#536d080aa154e5853332339bf576747c" | ||
| "minizip/1.2.12#0b5296887a2558500d0323c6c94c8d02" # This depends on zlib/1.2.11, and basically patches it | ||
| "zlib/1.2.12#3b9e037ae1c615d045a06c67d88491ae" # Also needed, so we can find zlib.h and co (+ pinning exactly is good) | ||
| "fmt/8.1.1#b3e969f8561a85087bd0365c09bbf4fb" | ||
| "sqlite3/3.38.5#68f3bf289cde01176e39355869c39ac0" | ||
| "cpprestsdk/2.10.18#df2f6ac88e47cadd9c9e8e0971e00d89" | ||
| "websocketpp/0.8.2#3fd704c4c5388d9c08b11af86f79f616" | ||
| "geographiclib/1.52#76536a9315a003ef3511919310b2fe37" | ||
| "swig/4.0.2#9fcccb1e39eed9acd53a4363d8129be5" |
| import re | ||
| import shlex | ||
| import subprocess | ||
| from pathlib import Path |
| ASSERT_EQ(i_central_hp.getString(CentralHeatPumpSystemFields::CoolingLoopInletNodeName).get(), | ||
| central_hp.supplyInletModelObject().get().nameString()); |
There was a problem hiding this comment.
Lots of these, when EXPECT_EQ is used with one of two arguments being a boost::optional and not a T
1596 | BOOST_STATIC_ASSERT_MSG(sizeof(CharType) == 0, "If you want to output boost::optional, include header <boost/optional/optional_io.hpp>");
| // Boost 1.73.0 has this bit in has_self_intersections.hpp: | ||
| // | ||
| // For backward compatibility | ||
| // template <typename Geometry> | ||
| // inline bool has_self_intersections(Geometry const& geometry, bool throw_on_self_intersection = true) { | ||
| // typedef typename geometry::point_type<Geometry>::type point_type; | ||
| // typedef typename geometry::rescale_policy_type<point_type>::type rescale_policy_type; | ||
|
|
||
| // typename strategy::intersection::services::default_strategy<typename cs_tag<Geometry>::type>::type strategy; | ||
|
|
||
| // rescale_policy_type robust_policy = geometry::get_rescale_policy<rescale_policy_type>(geometry, strategy); | ||
|
|
||
| // return has_self_intersections(geometry, strategy, robust_policy, throw_on_self_intersection); | ||
| // } | ||
|
|
||
| // For backward compatibility | ||
| template <typename Geometry> | ||
| inline bool has_self_intersections(Geometry const& geometry, bool throw_on_self_intersection = true) { | ||
| using point_type = typename boost::geometry::point_type<Geometry>::type; | ||
| using rescale_policy_type = typename boost::geometry::rescale_policy_type<point_type>::type; | ||
|
|
||
| typename boost::geometry::strategies::relate::services::default_strategy<Geometry, Geometry>::type strategy; | ||
|
|
||
| // typename boost::geometry::strategy::intersection::services::default_strategy<typename boost::geometry::cs_tag<Geometry>::type>::type strategy; | ||
|
|
||
| auto robust_policy = boost::geometry::get_rescale_policy<rescale_policy_type>(geometry, strategy); | ||
|
|
||
| return boost::geometry::detail::overlay::has_self_intersections(geometry, strategy, robust_policy, throw_on_self_intersection); | ||
| } | ||
|
|
There was a problem hiding this comment.
An actual change. has_self_intersections overload we're using was finally removed in 1.76. implement workaround
|
|
||
| openstudio::UnzipFile uf(p); | ||
| uf.setChunksize(state.range(0)); | ||
| uf.setChunksize(static_cast<unsigned long>(state.range(0))); |
There was a problem hiding this comment.
MSVC 2022 was complaining here
| #include "../core/Logger.hpp" | ||
| #include "../core/Optional.hpp" | ||
|
|
||
| #include <optional> |
There was a problem hiding this comment.
some includes here and there
| Json::Value defaultValue("."); | ||
| Json::Value root = m_value.get("root", defaultValue); | ||
| return toPath(root.asString()); | ||
| return toPath(root.asString()).remove_trailing_separator(); |
There was a problem hiding this comment.
Boost filesystem in 1.78 is now V4, and it follows the C++17 STL std::filesystem (which is worse), and doesn't treat a directory with a trailing separator the same way
cf https://www.boost.org/doc/libs/1_78_0/libs/filesystem/doc/v4.html
ref c0248cf
|
okay, NatLabRockies/conan-openstudio-ruby#39 is now merged. Do we need to vendor any of deps up to NREL remote before merging this in? Since I don't have an m1 yet I can't build and push conan packages for m1. |
… remote after bumping (I keep reinventing the wheel on that, so committing a clean notebook for future use)
|
Full build running at https://ci.openstudio.net/blue/organizations/jenkins/openstudio-develop-nightly/detail/openstudio-develop-nightly/1534/pipeline/
|
…l be removed) and force a x86_64 arch **BUILD** profile even when targeting x86 (for the win32 nuget...)
…te compiler.cppstd (windows)i
|
Reruning at https://ci.openstudio.net/blue/organizations/jenkins/openstudio-develop-nightly/detail/openstudio-develop-nightly/1537/pipeline after making significant changes to how we use cmake-conan so we can force a build profile with a cf https://www.msys2.org/news/#2020-05-17-32-bit-msys2-no-longer-actively-supported
|
Before it was doing `ASSERT_EQ(cooledBeam.supplyAirVolumetricFlowRate(), cloneBeam.supplyAirVolumetricFlowRate());` when really it didn't have a value. I changed that to ASSERT_EQ(lhs.get(), rhs.get()) and logically it started throwing because it's not initialized
|
Rerunning again at https://ci.openstudio.net/blue/organizations/jenkins/openstudio-develop-nightly/detail/openstudio-develop-nightly/1540/pipeline after I manually built all win32 (x86) deps and uploaded them to NREL's remote. I sincerely hope it works this time... I'm going to be building binary packages with MSVC 2022 and upload them as well in the meantime. Why was openssl not building?It seems it's due to the fact the DevTools were already initialized to x64 in the command prompt. OpenSSL starts by calling vcvarsall.bat As a result later you end up with: I would get that error by doing: If between both cmake command I exit the prompt, start a new one without calling vcvarsall.bat, openssl builds. This problem should not arise when the dependencies are downloaded |
|
I uploaded all x86 (Release) and MSVC 17 (Release and Debug) packages I built on my machine to the NREL remote, so we should be in business! |
BCL.obj : error LNK2038: mismatch detected for 'boost_log_abi': value 'v2s_mt_nt6' doesn't match value 'v2s_mt_nt62' in ruby_OpenStudioUtilitiesCore_wrap.obj [D:\OSN\build\src\cli\openstudio.vcxproj] cf boost: include/boost/winapi/config.hpp
https://ci.openstudio.net/blue/organizations/jenkins/openstudio-develop-nightly/detail/openstudio-develop-nightly/1544/pipeline/51 Logger.obj : error LNK2019: unresolved external symbol "private: static unsigned int __cdecl boost::log::v2s_mt_nt62::attribute_name::get_id_from_string(char const *)" (?get_id_from_string@attribute_name@v2s_mt_nt62@log@boost@@CAIPBD@Z) referenced in function "private: __thiscall openstudio::LoggerSingleton::LoggerSingleton(void)" (??0LoggerSingleton@openstudio@@aae@XZ) [D:\OSN\build\OS-32\src\lib\openstudiolib.vcxproj] [D:\OSN\build\csharp\OS-32.vcxproj]
tijcolem
left a comment
There was a problem hiding this comment.
Great that things are building!
Pull request overview
Boost msut be bumped to 1.78+ for C++20
Pull Request Author
src/model/test)src/energyplus/Test)src/osversion/VersionTranslator.cpp)Labels:
IDDChangeAPIChangePull Request - Ready for CIso that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.