-
Notifications
You must be signed in to change notification settings - Fork 219
Conflicting versions of toml11 and nlohmann_json when used as internally shipped dependencies at multiple points in the software stack #5355
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
Comments
This is a case often encountered (for example with alpaka). We typically make sure that PIConGPU explicitly sets all the shipped dependencies in all packages to its own versions. For example, we force mallocMC to use the version shipped with PIConGPU here: picongpu/include/pmacc/PMaccConfig.cmake Line 388 in f101f25
I would suggest that we do the same for openPMD-api. |
This solution only works for header-only libraries; the conflicting versions of nlohmann-json and toml11 are at this point already compiled as part of libopenPMD.so. I guess that we will need to do this the other way around, re-export both libraries (or at least their versions) from openPMD so PIConGPU can pick them up in the right versions; also find some way to deal with current openPMD versions that do not reexport the libraries. |
Does openPMD-api have those libraries in the interface? |
No, but this does not fix the problem, which occurs not at an API level, but at an ABI level. The current setup means that both The most instantly applicable workaround seems to be patching the internally shipped dependencies with |
Both PIConGPU and the openPMD-api internally ship with the header-only dependencies toml11 and nlohmann_json. These internally shipped versions are used by default in both software packages.
When setting up a default installation of PIConGPU with openPMD-api enabled, this may lead to conflicts when both ship with different versions of one such library. (This is even when they are header-only, since they might still contain symbols with the same name, leading to undefined behavior since the loader jumps to the wrong function, or the same datatype might exist in two non-compatible layouts, …).
I'm not really sure how to best solve this, some ideas:
I don't really like any of these ideas, so feel free to suggest solutions.
The text was updated successfully, but these errors were encountered: