"truncated or malformed archive" error on incremental build with kache
Categories
(Firefox Build System :: General, defect, P3)
Tracking
(Not tracked)
People
(Reporter: saschanaz, Unassigned)
References
Details
For now I don't know this is kache problem or general build issue, for now I'm filing it for a record. Will ping kache people about this too.
11:59.95 toolkit/library/build/xul.dll
12:00.03 toolkit/mozapps/pushnotificationhelper/notification-helper.exe
12:05.48 Finished `release` profile [unoptimized] target(s) in 4.94s
12:06.50 toolkit/mozapps/msixcomserver-rust/msixcomserver_s.lib
12:11.11 Finished `release` profile [unoptimized] target(s) in 4.26s
12:11.75 toolkit/mozapps/msixcomserver/msixcomserver.dll
12:11.83 toolkit/crashreporter/mozwer-rust/mozwer_s.lib
12:12.15 E lld-link: error: could not get child name for archive ../../../aarch64-pc-windows-msvc/release/gkrust.lib while loading symbol GkRust_Init: truncated or malformed archive (string table at long name offset 118 not terminated)
12:12.47 E mozmake[4]: *** [D:/firefox/config/rules.mk:480: ../../../dist/bin/xul.dll] Error 1
12:12.48 E mozmake[3]: *** [D:/firefox/config/recurse.mk:79: toolkit/library/build/target] Error 2
12:12.48 E mozmake[3]: *** Waiting for unfinished jobs....
| Reporter | ||
Updated•21 days ago
|
| Reporter | ||
Comment 1•21 days ago
|
||
mozconfig:
mk_add_options AUTOCLOBBER=1
ac_add_options --disable-optimize
ac_add_options --with-compiler-wrapper=kache
mk_add_options "export RUSTC_WRAPPER=kache"
mk_add_options "export CARGO_INCREMENTAL=0"
mk_add_options "export KACHE_BASE_DIR=@TOPSRCDIR@"
mk_add_options "export MOZ_BUILD_DATE=20260101000000"
mk_add_options "export KACHE_PATH_ONLY_ENV_VARS=CONVERSIONS_FILE,GLEAN_METRICS_FILE,BINDINGS,TYPENUM_BUILD_CONSTS,TYPENUM_BUILD_OP,TYPENUM_BUILD_GENERIC_CONSTS,MOZ_TOPOBJDIR,MOZ_TOPSRCDIR"
The MOZ_BUILD_DATE stuff is only recently added to the config, as it is pointed as a culprit to trigger a lot of rebuild. An unconfirmed AI argument is that given I use dev mode, symlink is created by build, and mozmake is not compatible with symlinks and somehow tracks the modification time of the symlink itself instead of the destination file, and causes less rebuild than it should. Hmmmm.
Comment 2•21 days ago
|
||
FYI, my kache options are currently these, in case it makes a difference:
ac_add_options --with-compiler-wrapper=kache
mk_add_options "export RUSTC_WRAPPER=kache"
mk_add_options "export CARGO_INCREMENTAL=0"
mk_add_options "export KACHE_BASE_DIR=@TOPSRCDIR@"
mk_add_options "export MOZ_BUILD_DATE=20260101000000"
mk_add_options "export KACHE_PATH_ONLY_ENV_VARS=CONVERSIONS_FILE,GLEAN_METRICS_FILE,BINDINGS,TYPENUM_BUILD_CONSTS,TYPENUM_BUILD_OP,TYPENUM_BUILD_GENERIC_CONSTS,MOZ_TOPOBJDIR,MOZ_TOPSRCDIR,BUILDCONFIG_RS,xpcom:MOZ_TOPOBJDIR,xpcom_macros:MOZ_TOPOBJDIR,nserror:MOZ_TOPOBJDIR,static_prefs:MOZ_TOPOBJDIR,style:MOZ_TOPOBJDIR,firefox_on_glean:MOZ_TOPOBJDIR,gecko_profiler:MOZ_TOPOBJDIR,gecko_trace:MOZ_TOPOBJDIR,gecko_trace:MOZ_TOPSRCDIR,crashreporter:MOZ_TOPSRCDIR,autofill:OUT_DIR,db_crypto:OUT_DIR,glean_core:OUT_DIR,logins:OUT_DIR,tabs:OUT_DIR,webext_storage:OUT_DIR,RUSTC_LINKER"
(Different last line I think)
Comment 3•21 days ago
|
||
(In reply to Kagami Rosylight 🏳️🌈🏳️⚧️ [:saschanaz] (they/them) from comment #1)
An unconfirmed AI argument is that given I use dev mode, symlink is created by build, and mozmake is not compatible with symlinks and somehow tracks the modification time of the symlink itself instead of the destination file, and causes less rebuild than it should. Hmmmm.
I don't think that's true, but even if it were, why would a stale incremental build create a malformed archive? I don't think that makes sense.
Comment 4•21 days ago
|
||
I think I found the problem, and I think it's in rustc. I have an appointment I need to head out to, so I will follow up later.
An interim workaround: your mk_add_options "export CARGO_INCREMENTAL=0" is not honored by configure. Use ac_add_options --disable-cargo-incremental or mk_add_options "export KACHE_ADAPTIVE_INCREMENTAL=0" instead (Let me know if that doesn't work).
Comment 5•21 days ago
|
||
The fix is in https://github.com/rust-lang/ar_archive_writer/pull/39, but it'll be a while before it reaches a Rust release, so the workaround (ac_add_options --disable-cargo-incremental or mk_add_options "export KACHE_ADAPTIVE_INCREMENTAL=0") will be needed until then.
Updated•21 days ago
|
Updated•21 days ago
|
https://github.com/rust-lang/rust/pull/165809 will pull in the ar_archive_writer fix on the rustc side.
Description
•