Replace vendored STP with system package #563
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As much as the goal of #554 was to see the gcc errors again, I have decided that I don't actually like them. Since most of them come from compiling STP, this PR seeks to remove the vendored version within BSC and instead require it as a pre-installed dependency.
It was surprisingly easy to achieve this goal of removing STP. The first two commits deal with removing all references outside of vendor/stp to STP, and replace them with the locations of system installed packages (here /usr/lib/ and /usr/include/). The foreign function interface definition for Haskell is kept.
The third commit removes all code inside vendor/stp/ except for the aforementioned Haskell FFI. Most of the ~560 files changed are indeed deletions for this reason.
In all honesty, I didn't expect all that to even work first try. But whatever test I throw at it, it refuses to fail during compilation or testing. It does however fail if I remove the system package, so it clearly uses that.
The CI will need to be adapted to this change too. Incidentally, Homebrew provides an STP package, Ubuntu however does not. Afaict, only Arch Linux, Fedora, FreeBSD, and OpenSuse actually provide a system package for STP by default.
On the other hand, BSC already needs to be compiled by almost everyone, so maybe we can get away with saying:
Compile STP yourself
?Tasks: