Skip to content

Conversation

@toolCHAINZ
Copy link
Owner

@toolCHAINZ toolCHAINZ commented May 22, 2025

There are two issues preventing linux wheels from actually working:

  • auditwheel is copying (and renaming) z3 into the wheel. Normally, this is exactly what you want, but we have a special case: this code ONLY work in the presence of the z3 python library and we MUST dynamically link the exact same library that the python z3 bindings do in order for them to play nice.
  • The crackers shared object only looks in standard locations for libraries and does not know to look for the library in the z3 python package's lib folder.

The fix here is twofold:

  • We disable auditwheel on linux to prevent it from renaming libz3, allowing us to link against other z3s.
  • We add an rpath entry (via a RUSTFLAG) to our shared object allowing it to search, via a relative path, for the python z3 binding's shared object.

This does mean the python wheel will only work in the presence of the z3 package, but since everyone is using virtual environments, pip, poetry, or uv, I think this is fine.

@toolCHAINZ toolCHAINZ changed the title Skip Auditwheel on Linux Fix Linux Z3 Dynamic Linking May 23, 2025
@toolCHAINZ toolCHAINZ enabled auto-merge (squash) May 23, 2025 10:53
@toolCHAINZ toolCHAINZ merged commit ad935ee into main May 23, 2025
10 checks passed
@toolCHAINZ toolCHAINZ deleted the auditwheel-skip branch May 23, 2025 11:01
@toolCHAINZ toolCHAINZ mentioned this pull request Aug 6, 2025
@toolCHAINZ toolCHAINZ mentioned this pull request Aug 14, 2025
This was referenced Aug 21, 2025
@toolCHAINZ toolCHAINZ mentioned this pull request Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants