mirror of
https://github.com/Z3Prover/z3
synced 2026-08-05 05:33:35 +00:00
The `build` job in the Pyodide workflow was failing at wheel smoke-test
import time because `libz3.so` was not produced as a proper wasm side
module (`need the dylink section to be first`, missing exported
symbols). This PR restores the required Pyodide linker mode.
- **Root cause**
- Recent Pyodide linker flag changes enabled wasm EH/longjmp but omitted
`-sSIDE_MODULE=1`, so the generated `libz3.so` was not loadable by
Pyodide’s dynamic loader.
- **Changes**
- **`src/api/python/pyproject.toml`**
- Added `-sSIDE_MODULE=1` to `[tool.pyodide.build].ldflags`.
- **`src/api/python/setup.py`**
- Added `-sSIDE_MODULE=1` to the Pyodide `LDFLAGS` path to keep direct
`setup.py`-driven builds aligned with `pyproject.toml` behavior.
- **Flag delta (core fix)**
```toml
# src/api/python/pyproject.toml
[tool.pyodide.build]
ldflags = "-fwasm-exceptions -sSUPPORT_LONGJMP=wasm -sWASM_BIGINT -sSIDE_MODULE=1"
```
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
||
|---|---|---|
| .. | ||
| c++ | ||
| dll | ||
| dotnet | ||
| go | ||
| java | ||
| js | ||
| julia | ||
| mcp | ||
| ml | ||
| python | ||
| api_algebraic.cpp | ||
| api_arith.cpp | ||
| api_array.cpp | ||
| api_ast.cpp | ||
| api_ast_map.cpp | ||
| api_ast_map.h | ||
| api_ast_vector.cpp | ||
| api_ast_vector.h | ||
| api_bv.cpp | ||
| api_config_params.cpp | ||
| api_context.cpp | ||
| api_context.h | ||
| api_datalog.cpp | ||
| api_datalog.h | ||
| api_datatype.cpp | ||
| api_finite_set.cpp | ||
| api_fpa.cpp | ||
| api_goal.cpp | ||
| api_goal.h | ||
| api_log.cpp | ||
| api_model.cpp | ||
| api_model.h | ||
| api_numeral.cpp | ||
| api_opt.cpp | ||
| api_params.cpp | ||
| api_parsers.cpp | ||
| api_pb.cpp | ||
| api_polynomial.cpp | ||
| api_polynomial.h | ||
| api_qe.cpp | ||
| api_quant.cpp | ||
| api_rcf.cpp | ||
| api_seq.cpp | ||
| api_solver.cpp | ||
| api_solver.h | ||
| api_special_relations.cpp | ||
| api_stats.cpp | ||
| api_stats.h | ||
| api_tactic.cpp | ||
| api_tactic.h | ||
| api_util.h | ||
| CMakeLists.txt | ||
| z3.h | ||
| z3_algebraic.h | ||
| z3_api.h | ||
| z3_ast_containers.h | ||
| z3_fixedpoint.h | ||
| z3_fpa.h | ||
| z3_logger.h | ||
| z3_macros.h | ||
| z3_optimization.h | ||
| z3_polynomial.h | ||
| z3_private.h | ||
| z3_rcf.h | ||
| z3_replayer.cpp | ||
| z3_replayer.h | ||
| z3_spacer.h | ||
| z3_v1.h | ||