GH-50774: [CI][Python] Restore bundled archive order for Emscripten - #50792
GH-50774: [CI][Python] Restore bundled archive order for Emscripten#50792tadeja wants to merge 6 commits into
Conversation
|
@github-actions crossbow submit test-conda-python-emscripten |
|
|
|
Revision: f5714c0 Submitted crossbow builds: ursacomputing/crossbow @ actions-50e51eced4
|
|
Although the first crossbow run failed with pre-existing ( While in the issue logs The log also shows the export is present in the wheel, meaning that the Locally I traced the cause (with fix reverted failure reproduced), symbolized by patching > await pyodide.loadPackage('/build/python/dist/pyarrow-26.0.0a0-cp312-cp312-pyemscripten_2024_0_wasm32.whl');
Loading pyarrow
ABORT: Error
at abort (/pyodide/pyodide.asm.js:10:6334)
at _abort (/pyodide/pyodide.asm.js:10:289408)
at invoke_v (/pyodide/pyodide.asm.js:10:1224993)
at wasm://wasm/0267d6e2:wasm-function[13105]:0x531c4b
at libarrow_python.so.google::protobuf::FileDescriptorProto::SharedDtor(google::protobuf::MessageLite&) (wasm://wasm/libarrow_python.so-0fa2ac3a:wasm-function[48283]:0x2517a8a)
at invoke_vi (/pyodide/pyodide.asm.js:10:1223725)
at libarrow_python.so.google::protobuf::FileDescriptorProto::~FileDescriptorProto() (wasm://wasm/libarrow_python.so-0fa2ac3a:wasm-function[48282]:0x2517795)
at libarrow_python.so.google::protobuf::EncodedDescriptorDatabase::Add(void const*, int) (wasm://wasm/libarrow_python.so-0fa2ac3a:wasm-function[48600]:0x2527cec)
at invoke_iiii (/pyodide/pyodide.asm.js:10:1223129)
at libarrow_python.so.google::protobuf::internal::AddDescriptors(google::protobuf::internal::DescriptorTable const*) (wasm://wasm/libarrow_python.so-0fa2ac3a:wasm-function[48861]:0x255572e)
Aborted()
Failed to load pyarrow
The following error occurred while loading pyarrow:
Aborted(). Build with -sASSERTIONS for more info.
[]The abort happens during static initialization of |
|
@github-actions crossbow submit test-conda-python-emscripten |
|
Revision: e44aaa2 Submitted crossbow builds: ursacomputing/crossbow @ actions-e7e0e9a62d
|
e44aaa2 to
a7d0931
Compare
|
@github-actions crossbow submit test-conda-python-emscripten r-recheck-most |
|
Revision: a7d0931 Submitted crossbow builds: ursacomputing/crossbow @ actions-c8b74835fc
|
|
@github-actions crossbow submit test-conda-python-emscripten |
|
Revision: 8d456b3 Submitted crossbow builds: ursacomputing/crossbow @ actions-6f85329ef0
|
|
@github-actions crossbow submit test-conda-python-emscripten |
|
Revision: 18130db Submitted crossbow builds: ursacomputing/crossbow @ actions-24de2ba338
|
|
|
||
| add_library(substrait STATIC ${SUBSTRAIT_SOURCES}) | ||
| set_target_properties(substrait PROPERTIES POSITION_INDEPENDENT_CODE ON) | ||
| if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten") |
There was a problem hiding this comment.
Can we remove this condition? (Can we always set CXX_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN?)
|
BTW, can we always use |
Rationale for this change
Fix #50774. After #50650, the Pyodide build failed while loading PyArrow with
ImportError: dynamic module does not define module export function (PyInit_lib)The ImportError is misleading because the export is present. The actual failure is an earlier abort during static initialization of
libarrow_python.so, in Protobuf descriptor registration.#50650 changed the order of libraries merged into
libarrow_bundled_dependencies.a. Because the archive contains duplicate weak Protobuf/Abseil symbols, the new order causes wasm-ld to select definitions from different archive members and aborts.What changes are included in this PR?
Restore the pre-#50650 archive order for Emscripten builds before creating
libarrow_bundled_dependencies.a.Are these changes tested?
Yes,
test-conda-python-emscriptenpasses (Local repro, debug and fix verification withARCH=amd64 archery docker run conda-python-emscripten)Are there any user-facing changes?
No.