fix(build): add z3 include path for RHEL/Fedora bindgen compatibility#1388
Open
russellb wants to merge 1 commit into
Open
fix(build): add z3 include path for RHEL/Fedora bindgen compatibility#1388russellb wants to merge 1 commit into
russellb wants to merge 1 commit into
Conversation
Contributor
Author
|
This seems like a package bug, but I think the cc @maxamillion |
elezar
reviewed
May 15, 2026
elezar
reviewed
May 15, 2026
On RHEL and Fedora, the z3 header is installed to /usr/include/z3/ rather than /usr/include/. The z3-sys crate's bindgen step fails because pkg-config doesn't find z3 on these distros. Add the extra include path via BINDGEN_EXTRA_CLANG_ARGS in mise.toml — the -I flag is silently ignored on systems where the path doesn't exist.
0a34672 to
ca8815a
Compare
Collaborator
|
@russellb I'm good with putting this specifically in the rpm spec file if there's a desire to keep it scoped there, but I agree with you that it's likely harmless to have it project scoped. I'm good with it if @elezar @drew @johntmyers and @TaylorMutch are. |
Contributor
Author
@maxamillion it looks like it's a bug in the z3 package. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
On RHEL and Fedora, the system
z3.pcfile returns a malformed include path (-I/usr/usr/include/z3— double/usrprefix), causing thez3-syscrate's bindgen step to fail with'z3.h' file not found. Add the correct include path via.cargo/config.tomlso bindgen can find the header regardless of the broken pkg-config output.Related Issue
None — discovered while testing the nftables migration (#1335) on a RHEL dev host.
Changes
.cargo/config.tomlwithBINDGEN_EXTRA_CLANG_ARGS = "-I/usr/include/z3"— picked up automatically by cargomise.tomlfor consistency with the mise-based workflow-Iflag for a nonexistent path is silently ignored by clang, so this is harmless on distros where z3 headers are in the default include pathTesting
mise run pre-commitpassescargo buildsucceeds on RHEL without manually settingCPATHChecklist