You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Command to build _testexternalinspection.o gets truncated when building under WASI #116229
z stack-size=524288 -Wl,--stack-first -Wl,--initial-memory=10485760 Modules/_testexternalinspection.o -o Modules/_testexternalinspection.cpython-313d-wasm32-wasi.so
/bin/sh: 1: z: not found
It seems like the command is partially from CONFIGURE_LDFLAGS_NODIST= -z stack-size=524288 -Wl,--stack-first -Wl,--initial-memory=10485760.
@brettcannon, how can I reproduce? I tried following the instructions in Tools/wasm/README.md but got no build failure.
@erlend-aasland the overall build will succeed, but _testexternalinspection won't be kept due to not being imported. I only noticed this because I had another build failure related to that module that I have fixed.
If I understand correctly, WASI doesn't actually support building shared library modules at all, so it doesn't set BLDSHARED. But _testexternalinspection was added to a small list of test modules at the bottom of Setup.stdlib.in which "MUST be built as shared libraries". The reason this has never caused a problem for WASI before is that all the other modules in the list are skipped due to WASI not supporting dlopen.
@mhsmith Correct, but all the other modules fail due to not being importable (I have #115983 to track turning off building them in the first place). For some reason with _testkexternalinspection I see this odd situation where the command run gets truncated down to z and causes the compilation to fail.
If we don't want to bother trying to figure out why the truncation is occurring I can just turn off trying to build this module under WASI (and all the other ones listed there).
I turned off building _testexternalinspection under WASI in #116528 . I'm going to close this as indirectly fixed, but if someone wanted to continue to dig into why the command is getting truncated I can open it again.
Activity
erlend-aasland commentedon Mar 2, 2024
cc. @mhsmith
mhsmith commentedon Mar 2, 2024
I'm not sure what's going on here, but I don't think it's caused by any of the things I've changed recently.
erlend-aasland commentedon Mar 2, 2024
@brettcannon, how can I reproduce? I tried following the instructions in
Tools/wasm/README.mdbut got no build failure.brettcannon commentedon Mar 4, 2024
@erlend-aasland the overall build will succeed, but
_testexternalinspectionwon't be kept due to not being imported. I only noticed this because I had another build failure related to that module that I have fixed.mhsmith commentedon Mar 6, 2024
If I understand correctly, WASI doesn't actually support building shared library modules at all, so it doesn't set
BLDSHARED. But_testexternalinspectionwas added to a small list of test modules at the bottom of Setup.stdlib.in which "MUST be built as shared libraries". The reason this has never caused a problem for WASI before is that all the other modules in the list are skipped due to WASI not supportingdlopen.brettcannon commentedon Mar 7, 2024
@mhsmith Correct, but all the other modules fail due to not being importable (I have #115983 to track turning off building them in the first place). For some reason with
_testkexternalinspectionI see this odd situation where the command run gets truncated down tozand causes the compilation to fail.brettcannon commentedon Mar 8, 2024
The list of modules that @mhsmith referred to:
cpython/Modules/Setup.stdlib.in
Lines 170 to 180 in c951e25
If we don't want to bother trying to figure out why the truncation is occurring I can just turn off trying to build this module under WASI (and all the other ones listed there).
sobolevn commentedon Mar 9, 2024
I just tried the whole thing on my mac, I got expected result:
BLDSHARED= $(CC) -bundle -undefined dynamic_lookup $(PY_CORE_LDFLAGS)No warning happened when running
make.mhsmith commentedon Mar 11, 2024
@sobolevn: From that command line, it looks like you were building for macOS, not WASI.
brettcannon commentedon Mar 13, 2024
I turned off building
_testexternalinspectionunder WASI in #116528 . I'm going to close this as indirectly fixed, but if someone wanted to continue to dig into why the command is getting truncated I can open it again.