Skip to content

cpython linux build mode & python modules build#247

Open
qianxichen233 wants to merge 7 commits into
mainfrom
cpython-test
Open

cpython linux build mode & python modules build#247
qianxichen233 wants to merge 7 commits into
mainfrom
cpython-test

Conversation

@qianxichen233

Copy link
Copy Markdown
Contributor

use BUILD_MODE=linux to run cpython linux build mode

build process and testing process is exactly the same as before

will need to build with fpcast for better testing success ratio

full command:
build: BUILD_MODE=linux LIND_DYLINK=1 LIND_FPCAST=1 make cpython
install: make install-cpython
test: BUILD_MODE=linux LIND_DYLINK=1 APP=cpython make test TESTTIMEOUT=120 (timeout might be too aggressive, depends on how fast you want to run the test)

Introduces BUILD_MODE=linux to compile_cpython.sh alongside the existing
default WASI mode. Linux mode presents ac_sys_system=Linux to configure,
enabling shared extension modules, full POSIX APIs, and the lind-run-python
HOSTRUNNER wrapper. Source modifications needed for the lind-wasm test runner
(pid==1 collision fixes, JSON parsing in run_workers) are now kept as patch
files under patches/ and applied to Lib/ before make, reverted after make
install — so the installed tree and the native test runner both see them
while the source stays clean. WASI mode and all existing behavior is
completely unchanged when BUILD_MODE is not set.
@qianxichen233 qianxichen233 changed the title cpython linux build mode cpython linux build mode & python modules build May 10, 2026
@vidyalakshmir

Copy link
Copy Markdown
Contributor

@qianxichen233

Ran this.

Output is:

Total tests: run=2,324 failures=8 skipped=351
Total test files: run=489/491 failed=371 skipped=24 resource_denied=2
Result: FAILURE

Most test failures was due to

thread 'main' (15392) panicked at /home/lind/lind-wasm/src/wasmtime/crates/sysdefs/src/logging.rs:6:5:
LIND DEBUG PANIC: dlopen within threads is currently not supported!

@vidyalakshmir vidyalakshmir mentioned this pull request May 27, 2026
@vidyalakshmir

Copy link
Copy Markdown
Contributor

@qianxichen233 There should be an automated way to run the tests with different grates. As of now, changes has to be done to the exec command within build-wasm/lind-run-python (which is generated during the python build process) to run different grates. One way is by passing grate type as an argument and handling it within run_tests.sh where it edits the build-wasm/lind-run-python to run the specific grate passed as the argument.

@vidyalakshmir vidyalakshmir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qianxichen233 There should be an automated way to run the tests with different grates. As of now, changes has to be done to the exec command within build-wasm/lind-run-python (which is generated during the python build process) to run different grates. One way is by passing grate type as an argument and handling it within run_tests.sh where it edits the build-wasm/lind-run-python to run the specific grate passed as the argument.

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