Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data.hpp includes msgpack.hpp #284

Open
LourensVeen opened this issue Jan 5, 2024 · 0 comments
Open

data.hpp includes msgpack.hpp #284

LourensVeen opened this issue Jan 5, 2024 · 0 comments

Comments

@LourensVeen
Copy link
Contributor

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant