linking issues if parallel (MPI) and serial version are present
Open
Component - Build
Component - Parallel
- Dominant language
- C
- Stars
- 988
- Forks
- 355
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 12
Description
I have a library `A` that requires hdf5. It only needs the serial version.
However, it also links with `B` that is linked with the parallel version, as it uses some of the parallel symbols.
While linking, I link like `-lhdf5 -lB`, which returns without errors, as all symbols in `A` are satisfied, but fails later at run time, because `B` has undefined symbols, as the serial version of `hdf5` is linked.
I am not sure about this, but I think the clean solution would be to split out the parallel symbols into a sub-library, and if parallel symbols are expected, pull in the sub-library.
That way the serial version cannot conflict with the parallel version.
Contributor guide
Assessment
This issue has not been assessed yet.