You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm seeing an issue on a Mac that has msgpack installed via Homebrew, while compiling a MUSCLE3-using model with XCode's clang. Clang doesn't know about Homebrew, and doesn't add Homebrew's include directory (/usr/local/include on Intel Macs, /opt/homebrew/include on Apple Silicon) to the include paths. See also https://apple.stackexchange.com/questions/414622/installing-a-c-c-library-with-homebrew-on-m1-macs
MUSCLE3's data.hpp includes msgpack.hpp, so if you include data.hpp and don't have the msgpack headers available, compilation fails. And if you compiled MUSCLE3 with Homebrew-installed msgpack, then you won't have the headers.
The SE post suggests some system-wide fixes, but it would be nice if this worked anyway since the model doesn't directly depend on msgpack, only on libmuscle. For the dynamic library this is no problem because we're using macos's rpath facilities, but for the headers it doesn't work.
Possible fixes:
Remove the msgpack include from data.hpp and anywhere else we have one; possibly this will require some explicit template instantiations or something to make it so we don't need it.
Modify the pkg-config files to include a -I/path/to/msgpack so that the headers can be found, the message we print on successful installation should then also be modified.
The text was updated successfully, but these errors were encountered:
I'm seeing an issue on a Mac that has msgpack installed via Homebrew, while compiling a MUSCLE3-using model with XCode's clang. Clang doesn't know about Homebrew, and doesn't add Homebrew's include directory (
/usr/local/include
on Intel Macs,/opt/homebrew/include
on Apple Silicon) to the include paths. See also https://apple.stackexchange.com/questions/414622/installing-a-c-c-library-with-homebrew-on-m1-macsMUSCLE3's
data.hpp
includesmsgpack.hpp
, so if you includedata.hpp
and don't have the msgpack headers available, compilation fails. And if you compiled MUSCLE3 with Homebrew-installed msgpack, then you won't have the headers.The SE post suggests some system-wide fixes, but it would be nice if this worked anyway since the model doesn't directly depend on msgpack, only on libmuscle. For the dynamic library this is no problem because we're using macos's rpath facilities, but for the headers it doesn't work.
Possible fixes:
data.hpp
and anywhere else we have one; possibly this will require some explicit template instantiations or something to make it so we don't need it.-I/path/to/msgpack
so that the headers can be found, the message we print on successful installation should then also be modified.The text was updated successfully, but these errors were encountered: