Open Bug 1909175 Opened 2 months ago Updated 29 days ago

Build SpiderMonkey for WASI with Intl/ICU in debug mode in CI

Categories

(Core :: JavaScript Engine, defect, P1)

Firefox 128
defect

Tracking

()

People

(Reporter: me, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Steps to reproduce:

If you try to build SpiderMonkey for WASI with Intl and in debug mode you will see a linker error.
This is the mozbuild file used:

ac_add_options --enable-project=js
ac_add_options --enable-application=js
ac_add_options --target=wasm32-unknown-wasi
ac_add_options --without-system-zlib
ac_add_options --disable-jit
ac_add_options --disable-shared-js
ac_add_options --disable-shared-memory
ac_add_options --disable-tests
ac_add_options --disable-clang-plugin
ac_add_options --enable-jitspew
ac_add_options --enable-optimize=-O3
ac_add_options --prefix=/Users/jakechampion/Code/js-compute-runtime/runtime/spidermonkey/obj-debug/dist
mk_add_options MOZ_OBJDIR=/Users/jakechampion/Code/js-compute-runtime/runtime/spidermonkey/obj-debug
mk_add_options AUTOCLOBBER=1
ac_add_options --host=aarch64-apple-darwin
ac_add_options --enable-debug

I propose we a debug wasi intl build in CI so that we can ensure it always builds

Actual results:

This is the error:

wasm-ld: warning: function signature mismatch: _ZN7mozilla4intl8Calendar23LegacyIdentifierToBcp47EPKci
>>> defined as () -> void in ../build/libjs_static.a(Unified_cpp_js_src5.o)
>>> defined as (i32, i32, i32) -> void in ../build/libjs_static.a(Unified_cpp_intl_components0.o)
wasm-ld: warning: function signature mismatch: _ZN7mozilla4intl8Collator28KeywordValueToBcp47ExtensionEPKci
>>> defined as () -> void in ../build/libjs_static.a(Unified_cpp_js_src4.o)
>>> defined as (i32, i32, i32) -> void in ../build/libjs_static.a(Unified_cpp_intl_components0.o)

Expected results:

A successful build should have happened

The Bugbug bot thinks this bug should belong to the 'Core::JavaScript Engine' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Assignee: nobody → me
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Blocks: sm-wasi
Severity: -- → S3
Priority: -- → P1

(In reply to jake champion from comment #0)

Steps to reproduce:

If you try to build SpiderMonkey for WASI with Intl and in debug mode you will see a linker error.
This is the mozbuild file used:

ac_add_options --enable-project=js
ac_add_options --enable-application=js
ac_add_options --target=wasm32-unknown-wasi
ac_add_options --without-system-zlib
ac_add_options --disable-jit
ac_add_options --disable-shared-js
ac_add_options --disable-shared-memory
ac_add_options --disable-tests
ac_add_options --disable-clang-plugin
ac_add_options --enable-jitspew
ac_add_options --enable-optimize=-O3
ac_add_options --prefix=/Users/jakechampion/Code/js-compute-runtime/runtime/spidermonkey/obj-debug/dist
mk_add_options MOZ_OBJDIR=/Users/jakechampion/Code/js-compute-runtime/runtime/spidermonkey/obj-debug
mk_add_options AUTOCLOBBER=1
ac_add_options --host=aarch64-apple-darwin
ac_add_options --enable-debug

I propose we a debug wasi intl build in CI so that we can ensure it always builds

Actual results:

This is the error:

wasm-ld: warning: function signature mismatch: _ZN7mozilla4intl8Calendar23LegacyIdentifierToBcp47EPKci
>>> defined as () -> void in ../build/libjs_static.a(Unified_cpp_js_src5.o)
>>> defined as (i32, i32, i32) -> void in ../build/libjs_static.a(Unified_cpp_intl_components0.o)
wasm-ld: warning: function signature mismatch: _ZN7mozilla4intl8Collator28KeywordValueToBcp47ExtensionEPKci
>>> defined as () -> void in ../build/libjs_static.a(Unified_cpp_js_src4.o)
>>> defined as (i32, i32, i32) -> void in ../build/libjs_static.a(Unified_cpp_intl_components0.o)

Expected results:

A successful build should have happened

The full error output is this:

 wasm-ld: warning: function signature mismatch: _ZN7mozilla4intl8Calendar23LegacyIdentifierToBcp47EPKci
 0:19.45 >>> defined as () -> void in ../../../js/src/build/libjs_static.a(Unified_cpp_js_src5.o)
 0:19.45 >>> defined as (i32, i32, i32) -> void in ../../../js/src/build/libjs_static.a(Unified_cpp_intl_components0.o)
 0:19.45 wasm-ld: warning: function signature mismatch: _ZN7mozilla4intl8Collator28KeywordValueToBcp47ExtensionEPKci
 0:19.45 >>> defined as () -> void in ../../../js/src/build/libjs_static.a(Unified_cpp_js_src4.o)
 0:19.45 >>> defined as (i32, i32, i32) -> void in ../../../js/src/build/libjs_static.a(Unified_cpp_intl_components0.o)
 0:19.46 wasm-ld: error: ../../../mozglue/misc/Decimal.o: undefined symbol: char const* mozilla::detail::TypeToFormatString<unsigned long>()
 0:19.47 wasm-ld: error: ../../../mozglue/misc/Decimal.o: undefined symbol: char const* mozilla::detail::TypeToString<unsigned long>()
 0:19.47 wasm-ld: error: ../../../mfbt/Unified_cpp_mfbt0.o: undefined symbol: char const* mozilla::detail::TypeToFormatString<long>()
 0:19.47 wasm-ld: error: ../../../mfbt/Unified_cpp_mfbt0.o: undefined symbol: char const* mozilla::detail::TypeToString<long>()
 0:19.47 wasm-ld: error: ../../../mozglue/misc/Decimal.o: undefined symbol: char const* mozilla::detail::TypeToString<unsigned long>()
 0:19.47 wasm-ld: error: ../../../mozglue/misc/Decimal.o: undefined symbol: char const* mozilla::detail::TypeToString<unsigned long>()
 0:19.47 wasm-ld: error: ../../../mozglue/misc/Decimal.o: undefined symbol: char const* mozilla::detail::TypeToFormatString<unsigned long>()
 0:19.47 wasm-ld: error: ../../../mozglue/misc/Decimal.o: undefined symbol: char const* mozilla::detail::TypeToString<unsigned long>()
 0:19.47 wasm-ld: error: ../../../js/src/build/libjs_static.a(Unified_cpp_js_src_frontend3.o): undefined symbol: pthread_self
 0:19.47 wasm-ld: error: ../../../js/src/build/libjs_static.a(Unified_cpp_js_src_frontend3.o): undefined symbol: pthread_self
 0:19.47 wasm-ld: error: ../../../js/src/build/libjs_static.a(Unified_cpp_js_src_frontend3.o): undefined symbol: pthread_self
 0:19.47 wasm-ld: error: ../../../mozglue/misc/Decimal.o: undefined symbol: char const* mozilla::detail::TypeToFormatString<unsigned long>()
 0:19.47 wasm-ld: error: ../../../mozglue/misc/Decimal.o: undefined symbol: char const* mozilla::detail::TypeToString<unsigned long>()
 0:19.48 clang++: error: linker command failed with exit code 1 (use -v to see invocation)
 0:19.48 gmake[4]: *** [/Users/jakechampion/mozilla-unified/config/rules.mk:420: ../../../dist/bin/js] Error 1
 0:19.48 gmake[3]: *** [/Users/jakechampion/mozilla-unified/config/recurse.mk:72: js/src/shell/target] Error 2
 0:19.48 gmake[2]: *** [/Users/jakechampion/mozilla-unified/config/recurse.mk:34: compile] Error 2
 0:19.48 gmake[1]: *** [/Users/jakechampion/mozilla-unified/config/rules.mk:359: default] Error 2
 0:19.48 gmake: *** [client.mk:60: build] Error 2
 0:19.48 W 12 compiler warnings present.
Depends on: 1909206

Depends on: 1909472

There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:me, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(me)
Flags: needinfo?(jdemooij)

I was laid off from my job along with 11% other employees unfortunately, I won't be working on this any more

Flags: needinfo?(me)
Flags: needinfo?(jdemooij)

I'm very sorry to hear that, Jake :/

The patch is blocked on LLVM bug https://github.com/llvm/llvm-project/issues/100084

Assignee: me → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: