Opened 4 years ago
Closed 4 years ago
#6219 closed defect (fixed)
OM 1.16.0 release fails to build on MacOS
Reported by: | Adam Dershowitz | Owned by: | Adrian Pop |
---|---|---|---|
Priority: | high | Milestone: | 1.16.0 |
Component: | Third-Party Libraries | Version: | |
Keywords: | Cc: |
Description
I'm trying to build openmodelica-release on a Mac, and it fails to build. I'm getting an error related to a 3rd party library:
:info:build #cp -au 3rdParty/SuiteSparse/build/*. build/lib/x86_64-darwin19.6.0/omc :info:build #mkdir --parent build/include/omc/c/suitesparse :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/src/OMSimulatorLib/BusConnector.cpp:1: :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/src/OMSimulatorLib/../OMSimulatorLib/BusConnector.h:7: :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/src/OMSimulatorLib/../OMSimulatorLib/Connector.h:36: :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/src/OMSimulatorLib/../OMSimulatorLib/ssd/ConnectorGeometry.h:37: :info:build In file included from /opt/local/include/pugixml.hpp:1451: :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11906:15: error: comparison of distinct pointer types ('pugi::xpath_node *' and 'pugi::xpath_node (*)[1]') :info:build if (_begin != &_storage) impl::xml_memory::deallocate(_begin); :info:build ~~~~~~ ^ ~~~~~~~~~ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11909:33: error: array type 'pugi::xpath_node [1]' is not assignable :info:build if (begin_ != end_) _storage = *begin_; :info:build ~~~~~~~~ ^ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11911:13: error: assigning to 'pugi::xpath_node *' from incompatible type 'pugi::xpath_node (*)[1]' :info:build _begin = &_storage; :info:build ^~~~~~~~~ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11912:21: error: assigning to 'pugi::xpath_node *' from incompatible type 'pugi::xpath_node (*)[1]' :info:build _end = &_storage + size_; :info:build ~~~~~~~~~~^~~~~~~ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11932:15: error: comparison of distinct pointer types ('pugi::xpath_node *' and 'pugi::xpath_node (*)[1]') :info:build if (_begin != &_storage) impl::xml_memory::deallocate(_begin); :info:build ~~~~~~ ^ ~~~~~~~~~ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11942:32: error: '_move' is missing exception specification 'noexcept' :info:build PUGI__FN void xpath_node_set::_move(xpath_node_set& rhs) :info:build ^ :info:build noexcept :info:build /opt/local/include/pugixml.hpp:1397:8: note: previous declaration is here :info:build void _move(xpath_node_set& rhs) PUGIXML_NOEXCEPT; :info:build ^ :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/src/OMSimulatorLib/BusConnector.cpp:1: :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/src/OMSimulatorLib/../OMSimulatorLib/BusConnector.h:7: :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/src/OMSimulatorLib/../OMSimulatorLib/Connector.h:36: :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/src/OMSimulatorLib/../OMSimulatorLib/ssd/ConnectorGeometry.h:37: :info:build In file included from /opt/local/include/pugixml.hpp:1451: :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11945:12: error: array type 'pugi::xpath_node [1]' is not assignable :info:build _storage = rhs._storage; :info:build ~~~~~~~~ ^ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11946:24: error: comparison of distinct pointer types ('pugi::xpath_node *' and 'pugi::xpath_node (*)[1]') :info:build _begin = (rhs._begin == &rhs._storage) ? &_storage : rhs._begin; :info:build ~~~~~~~~~~ ^ ~~~~~~~~~~~~~ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11950:16: error: assigning to 'pugi::xpath_node *' from incompatible type 'pugi::xpath_node (*)[1]' :info:build rhs._begin = &rhs._storage; :info:build ^~~~~~~~~~~~~ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11955:67: error: cannot initialize a member subobject of type 'pugi::xpath_node *' with an rvalue of type 'pugi::xpath_node (*)[1]' :info:build PUGI__FN xpath_node_set::xpath_node_set(): _type(type_unsorted), _begin(&_storage), _end(&_storage) :info:build ^ ~~~~~~~~~ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11955:86: error: cannot initialize a member subobject of type 'pugi::xpath_node *' with an rvalue of type 'pugi::xpath_node (*)[1]' :info:build PUGI__FN xpath_node_set::xpath_node_set(): _type(type_unsorted), _begin(&_storage), _end(&_storage) :info:build ^ ~~~~~~~~~ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11959:123: error: cannot initialize a member subobject of type 'pugi::xpath_node *' with an rvalue of type 'pugi::xpath_node (*)[1]' :info:build PUGI__FN xpath_node_set::xpath_node_set(const_iterator begin_, const_iterator end_, type_t type_): _type(type_unsorted), _begin(&_storage), _end(&_storage) :info:build ^ ~~~~~~~~~ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11959:142: error: cannot initialize a member subobject of type 'pugi::xpath_node *' with an rvalue of type 'pugi::xpath_node (*)[1]' :info:build PUGI__FN xpath_node_set::xpath_node_set(const_iterator begin_, const_iterator end_, type_t type_): _type(type_unsorted), _begin(&_storage), _end(&_storage) :info:build ^ ~~~~~~~~~ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11966:14: error: comparison of distinct pointer types ('pugi::xpath_node *' and 'pugi::xpath_node (*)[1]') :info:build if (_begin != &_storage) :info:build ~~~~~~ ^ ~~~~~~~~~ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11970:91: error: cannot initialize a member subobject of type 'pugi::xpath_node *' with an rvalue of type 'pugi::xpath_node (*)[1]' :info:build PUGI__FN xpath_node_set::xpath_node_set(const xpath_node_set& ns): _type(type_unsorted), _begin(&_storage), _end(&_storage) :info:build ^ ~~~~~~~~~ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11970:110: error: cannot initialize a member subobject of type 'pugi::xpath_node *' with an rvalue of type 'pugi::xpath_node (*)[1]' :info:build PUGI__FN xpath_node_set::xpath_node_set(const xpath_node_set& ns): _type(type_unsorted), _begin(&_storage), _end(&_storage) :info:build ^ ~~~~~~~~~ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11985:27: error: 'xpath_node_set' is missing exception specification 'noexcept' :info:build PUGI__FN xpath_node_set::xpath_node_set(xpath_node_set&& rhs): _type(type_unsorted), _begin(&_storage), _end(&_storage) :info:build ^ :info:build noexcept :info:build /opt/local/include/pugixml.hpp:1362:3: note: previous declaration is here :info:build xpath_node_set(xpath_node_set&& rhs) PUGIXML_NOEXCEPT; :info:build ^ :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/src/OMSimulatorLib/BusConnector.cpp:1: :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/src/OMSimulatorLib/../OMSimulatorLib/BusConnector.h:7: :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/src/OMSimulatorLib/../OMSimulatorLib/Connector.h:36: :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/src/OMSimulatorLib/../OMSimulatorLib/ssd/ConnectorGeometry.h:37: :info:build In file included from /opt/local/include/pugixml.hpp:1451: :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11985:87: error: cannot initialize a member subobject of type 'pugi::xpath_node *' with an rvalue of type 'pugi::xpath_node (*)[1]' :info:build PUGI__FN xpath_node_set::xpath_node_set(xpath_node_set&& rhs): _type(type_unsorted), _begin(&_storage), _end(&_storage) :info:build ^ ~~~~~~~~~ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_build.openmodelica.org_macports_lang_openmodelica-release/openmodelica-release/work/openmodelica_1.16.0/OMSimulator/3rdParty/PugiXml/pugixml.cpp:11985:106: error: cannot initialize a member subobject of type 'pugi::xpath_node *' with an rvalue of type 'pugi::xpath_node (*)[1]' :info:build PUGI__FN xpath_node_set::xpath_node_set(xpath_node_set&& rhs): _type(type_unsorted), _begin(&_storage), _end(&_storage) :info:build ^ ~~~~~~~~~ :info:build fatal error: too many errors emitted, stopping now [-ferror-limit=]
I've attached the full log as well. Any guidance is greatly appreciated. I hope that we can get 1.16 to build on Macs.
Thanks,
Attachments (1)
Change History (11)
by , 4 years ago
Attachment: | OM_release_1.16.0.log added |
---|
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Thanks. Yes, if I temporary deactivate the pugixml port, then it does build correctly, and I can then reactivate the port, after, and it seem to work.
Thank you.
comment:4 by , 4 years ago
Component: | *unknown* → Third-Party Libraries |
---|---|
Milestone: | Future → 1.16.0 |
Owner: | changed from | to
Status: | new → assigned |
Summary: | OM 1.16.0 release fails to build → OM 1.16.0 release fails to build on MacOS |
comment:5 by , 4 years ago
If pugixml conflicts with openmodelica, then we should put that conflict into the PortFile.
comment:6 by , 4 years ago
I agree, but myself I have no idea how to do that (yet), @hkiel if you know how, open a PR with a change on this file:
https://github.com/OpenModelica/OpenModelicaBuildScripts/blob/master/macports/Portfile.openmodelica.template
I guess it could be possible to put our header first before the system headers, I will look into that.
comment:8 by , 4 years ago
All that should require is adding the line at line 45:
conflicts pugixml sundials
It seems like it should be possible to get the build process to choose the local version before the MacPorts headers, but I'm not sure how to do that.
comment:10 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
PR: https://github.com/OpenModelica/OpenModelicaBuildScripts/pull/10 should fix this.
I think we have seen this error once before here.
You probably have a recent version
pugixml
installed on your machine. The headers from that installed version seem to be used when compiling thepugixml
source that come withOpenModelica/OMSimulator
itself.The include directories for OMsimulator's pugixml build might be missing from the compile commands. So it ends up picking the installed recent-version one.
Pugixml has added
noexcept
specifiers to some functions in recent versions and that is probably what is causing the mismatch.Maybe someone from who knows more about OMSimulator build can tell you more or fix it.
In the meantime, assuming you don't need it for anything else, you can remove the recent version of pugixml from your system. Another option is to manually update the source files in OMSimulator's pugixml yourself.