The custom targets repack-xxx-static-libs replace the solver-specific smt-switch libraries with versions that also have the solver libraries themselves along with their dependencies linked into them. This is problematic for multiple reasons:
- It breaks linking conventions. Each static library is only supposed to have its own object files, not those of other libraries that it depends on. That is supposed to be specified separately, e.g., via
pkg-config files.
- Because other targets (tests, python libraries, etc.) depend directly on the solver-specific library targets, there is a race condition between them and the custom target mentioned above. If they link before the custom target gets executed, the original version (without the solver libraries and their dependencies) will get linked in, and importing the
smt-switch module in Python will raise an error.
We should instead leave the static libraries as they are, and generate files for pkg-config that contain the necessary dependency information and linker flags.
The custom targets
repack-xxx-static-libsreplace the solver-specific smt-switch libraries with versions that also have the solver libraries themselves along with their dependencies linked into them. This is problematic for multiple reasons:pkg-configfiles.smt-switchmodule in Python will raise an error.We should instead leave the static libraries as they are, and generate files for
pkg-configthat contain the necessary dependency information and linker flags.