Closed Bug 1912092 Opened 7 months ago Closed 7 months ago

Perma [tier 2] Windows MinGW all ld.lld: error: undefined symbol: RoOriginateErrorW | clang: error: linker command failed with exit code 1 (use -v to see invocation)

Categories

(Firefox Build System :: Toolchains, defect, P5)

defect

Tracking

(firefox-esr115 unaffected, firefox-esr128 unaffected, firefox129 unaffected, firefox130 unaffected, firefox131 fixed)

RESOLVED FIXED
131 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox129 --- unaffected
firefox130 --- unaffected
firefox131 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: jimb)

References

(Regression)

Details

(Keywords: intermittent-failure, regression)

Attachments

(1 file)

Filed by: tszentpeteri [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=469583253&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/LfcFP0uiQgO1BvX3nB5nEA/runs/0/artifacts/public/logs/live_backing.log


[task 2024-08-07T17:03:46.931Z] 17:03:46     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/toolkit/library/build'
[task 2024-08-07T17:03:46.932Z] 17:03:46     INFO -  /builds/worker/.mozbuild/srcdirs/gecko-8a5b87fe5d69/_virtualenvs/build/bin/python /builds/worker/checkouts/gecko/config/create_res.py -DDEBUG=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DMOZ_SUPPORT_LEAKCHECKING -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/toolkit/library/build -I/builds/worker/workspace/obj-build/toolkit/library/build -I/builds/worker/workspace/obj-build/accessible/interfaces/gecko -I/builds/worker/checkouts/gecko/widget/windows -I/builds/worker/checkouts/gecko/xpcom/base -I/builds/worker/workspace/obj-build/dist/include  -o xul.dll.res xul.dll.rc
[task 2024-08-07T17:03:46.932Z] 17:03:46     INFO -  Executing: /builds/worker/fetches/clang/bin/x86_64-w64-mingw32-windres -O coff -D DEBUG=1 -D MOZ_HAS_MOZGLUE -D MOZILLA_INTERNAL_API -D IMPL_LIBXUL -D MOZ_SUPPORT_LEAKCHECKING -D STATIC_EXPORTABLE_JS_API --include-dir /builds/worker/checkouts/gecko/toolkit/library/build --include-dir /builds/worker/workspace/obj-build/toolkit/library/build --include-dir /builds/worker/workspace/obj-build/accessible/interfaces/gecko --include-dir /builds/worker/checkouts/gecko/widget/windows --include-dir /builds/worker/checkouts/gecko/xpcom/base --include-dir /builds/worker/workspace/obj-build/dist/include -o xul.dll.res xul.dll.rc
[task 2024-08-07T17:03:46.932Z] 17:03:46     INFO -  In file included from xul.dll.rc:20:
[task 2024-08-07T17:03:46.933Z] 17:03:46  WARNING -  /builds/worker/workspace/obj-build/dist/include/mozilla-config.h:158:9: warning: '_AMD64_' macro redefined [-Wmacro-redefined]
[task 2024-08-07T17:03:46.933Z] 17:03:46     INFO -    158 | #define _AMD64_ 1
[task 2024-08-07T17:03:46.933Z] 17:03:46     INFO -        |         ^
[task 2024-08-07T17:03:46.933Z] 17:03:46     INFO -  /builds/worker/fetches/clang/bin/../x86_64-w64-mingw32/include/winnt.h:33:9: note: previous definition is here
[task 2024-08-07T17:03:46.933Z] 17:03:46     INFO -     33 | #define _AMD64_
[task 2024-08-07T17:03:46.933Z] 17:03:46     INFO -        |         ^
[task 2024-08-07T17:03:46.933Z] 17:03:46     INFO -  1 warning generated.
[task 2024-08-07T17:03:46.933Z] 17:03:46     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/toolkit/library/build'
[task 2024-08-07T17:03:46.934Z] 17:03:46     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/toolkit/library/build'
[task 2024-08-07T17:03:46.934Z] 17:03:46     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/toolkit/library/build'
[task 2024-08-07T17:03:46.934Z] 17:03:46     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/toolkit/library/build'
[task 2024-08-07T17:03:46.934Z] 17:03:46     INFO -  toolkit/library/build/xul.dll
[task 2024-08-07T17:03:46.934Z] 17:03:46     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/toolkit/library/build'
[task 2024-08-07T17:03:46.935Z] 17:03:46     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/toolkit/library/build'
[task 2024-08-07T17:03:46.935Z] 17:03:46     INFO -  rm -f ../../../dist/bin/xul.dll
[task 2024-08-07T17:03:46.935Z] 17:03:46     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/toolkit/library/build'
[task 2024-08-07T17:03:48.249Z] 17:03:48     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/toolkit/library/build'
[task 2024-08-07T17:03:48.251Z] 17:03:48     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/x86_64-w64-mingw32-clang++ -shared -Wl,--gc-sections -Wl,--out-implib -Wl,libxul.a -Wl,-pdb,xul.pdb -o ../../../dist/bin/xul.dll -Wl,@/builds/worker/workspace/obj-build/toolkit/library/build/xul_dll.list xul.dll.res   -Wl,--no-insert-timestamp -Wl,--build-id=sha1 -fstack-protector-strong -Wl,--dynamicbase -Wl,-Xlink=-DELAYLOAD:avrt.dll -Wl,-Xlink=-DELAYLOAD:comdlg32.dll -Wl,-Xlink=-DELAYLOAD:credui.dll -Wl,-Xlink=-DELAYLOAD:d3d11.dll -Wl,-Xlink=-DELAYLOAD:D3DCompiler_47.dll -Wl,-Xlink=-DELAYLOAD:dhcpcsvc.dll -Wl,-Xlink=-DELAYLOAD:dnsapi.dll -Wl,-Xlink=-DELAYLOAD:dwmapi.dll -Wl,-Xlink=-DELAYLOAD:dxgi.dll -Wl,-Xlink=-DELAYLOAD:gdi32.dll -Wl,-Xlink=-DELAYLOAD:hid.dll -Wl,-Xlink=-DELAYLOAD:imm32.dll -Wl,-Xlink=-DELAYLOAD:iphlpapi.dll -Wl,-Xlink=-DELAYLOAD:msi.dll -Wl,-Xlink=-DELAYLOAD:msimg32.dll -Wl,-Xlink=-DELAYLOAD:netapi32.dll -Wl,-Xlink=-DELAYLOAD:ole32.dll -Wl,-Xlink=-DELAYLOAD:oleaut32.dll -Wl,-Xlink=-DELAYLOAD:secur32.dll -Wl,-Xlink=-DELAYLOAD:setupapi.dll -Wl,-Xlink=-DELAYLOAD:shell32.dll -Wl,-Xlink=-DELAYLOAD:shlwapi.dll -Wl,-Xlink=-DELAYLOAD:urlmon.dll -Wl,-Xlink=-DELAYLOAD:user32.dll -Wl,-Xlink=-DELAYLOAD:userenv.dll -Wl,-Xlink=-DELAYLOAD:usp10.dll -Wl,-Xlink=-DELAYLOAD:uxtheme.dll -Wl,-Xlink=-DELAYLOAD:wininet.dll -Wl,-Xlink=-DELAYLOAD:winmm.dll -Wl,-Xlink=-DELAYLOAD:winspool.drv -Wl,-Xlink=-DELAYLOAD:wtsapi32.dll -Wl,-Xlink=-DELAYLOAD:oleacc.dll -Wl,-Xlink=-DELAYLOAD:UIAutomationCore.dll -Wl,-Xlink=-DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll -Wl,-Xlink=-DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll  ../../../js/src/build/libjs_static.a ../../../build/pure_virtual/libpure_virtual.a ../../../x86_64-pc-windows-gnu/debug/libgkrust.a ../../../security/libnss3.a ../../../config/external/gkcodecs/libgkcodecs.a ../../../config/external/lgpllibs/liblgpllibs.a ../../../mozglue/build/libmozglue.a xul.dll.def  -lavrt -lksuser -lshell32 -ldbghelp -lhid -lktmw32 -lrpcrt4 -lurlmon -lwinmm -lntdll -lcredui -lmsi -lbcrypt -lcrypt32 -lpropsys -ladvapi32 -lsynchronization -lmfuuid -lwmcodecdspuuid -lstrmiids -lgdi32 -lole32 -lversion -lwinspool -luserenv -luuid -lcomdlg32 -limm32 -lmsimg32 -lnetapi32 -lshlwapi -lws2_32 -ldnsapi -ldwmapi -liphlpapi -luxtheme -lsetupapi -lsecur32 -lsensorsapi -lportabledeviceguids -lwininet -lwintrust -lwtsapi32 -llocationapi -lsapi -ldxguid -ldhcpcsvc -ld3dcompiler -loleacc -luiautomationcore -lusp10 -loleaut32 -ldelayimp
[task 2024-08-07T17:03:48.251Z] 17:03:48     INFO -  lld: warning: unsupported build id hashing: sha1, using default hashing.
[task 2024-08-07T17:03:48.252Z] 17:03:48    ERROR -  ld.lld: error: undefined symbol: RoOriginateErrorW
[task 2024-08-07T17:03:48.252Z] 17:03:48     INFO -  >>> referenced by src/error.rs:303
[task 2024-08-07T17:03:48.252Z] 17:03:48     INFO -  >>>               libgkrust.a(windows_result-36f01f19712ae9f0.windows_result.b1f77287d71ddb11-cgu.0.rcgu.o):(windows_result::error::error_info::ErrorInfo::originate_error::h7661bf14362504bf)
[task 2024-08-07T17:03:48.252Z] 17:03:48     INFO -  >>> referenced by src/error.rs:303
[task 2024-08-07T17:03:48.252Z] 17:03:48     INFO -  >>>               libgkrust.a(windows_result-36f01f19712ae9f0.windows_result.b1f77287d71ddb11-cgu.0.rcgu.o):(windows_result::error::error_info::ErrorInfo::originate_error::h7661bf14362504bf)
[task 2024-08-07T17:03:48.253Z] 17:03:48     INFO -  >>> referenced by src/error.rs:303
[task 2024-08-07T17:03:48.253Z] 17:03:48     INFO -  >>>               libgkrust.a(windows_result-36f01f19712ae9f0.windows_result.b1f77287d71ddb11-cgu.0.rcgu.o):(windows_result::error::error_info::ErrorInfo::originate_error::h7661bf14362504bf)
[task 2024-08-07T17:03:48.253Z] 17:03:48    ERROR -  clang: error: linker command failed with exit code 1 (use -v to see invocation)
[task 2024-08-07T17:03:48.253Z] 17:03:48    ERROR -  gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:539: ../../../dist/bin/xul.dll] Error 1
[task 2024-08-07T17:03:48.253Z] 17:03:48     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/toolkit/library/build'
[task 2024-08-07T17:03:48.254Z] 17:03:48     INFO -  gmake[4]: Target 'target' not remade because of errors.
[task 2024-08-07T17:03:48.254Z] 17:03:48    ERROR -  gmake[3]: *** [/builds/worker/checkouts/gecko/config/recurse.mk:72: toolkit/library/build/target] Error 2
[task 2024-08-07T17:03:48.950Z] 17:03:48     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/js/src/rust'
[task 2024-08-07T17:03:48.952Z] 17:03:48     INFO -  /builds/worker/fetches/rustc/bin/cargo rustc --timings --keep-going  --frozen --manifest-path /builds/worker/checkouts/gecko/js/src/rust/Cargo.toml -vv    --lib --target=x86_64-pc-windows-gnu --features 'simd-accel moz_memory icu4x mozilla-central-workspace-hack' --
[task 2024-08-07T17:03:48.952Z] 17:03:48     INFO -         Fresh unicode-ident v1.0.6
[task 2024-08-07T17:03:48.952Z] 17:03:48     INFO -         Fresh stable_deref_trait v1.2.0
[task 2024-08-07T17:03:48.952Z] 17:03:48     INFO -         Fresh version_check v0.9.4
[task 2024-08-07T17:03:48.952Z] 17:03:48     INFO -         Fresh writeable v0.5.5
[task 2024-08-07T17:03:48.952Z] 17:03:48     INFO -         Fresh litemap v0.7.3
[task 2024-08-07T17:03:48.953Z] 17:03:48     INFO -         Fresh cfg-if v1.0.0
[task 2024-08-07T17:03:48.953Z] 17:03:48     INFO -         Fresh icu_locid_transform_data v1.5.0
[task 2024-08-07T17:03:48.953Z] 17:03:48     INFO -         Fresh utf8_iter v1.0.4
[task 2024-08-07T17:03:48.953Z] 17:03:48     INFO -         Fresh icu_properties_data v1.5.0
[task 2024-08-07T17:03:48.953Z] 17:03:48     INFO -         Fresh strck v0.1.2
[task 2024-08-07T17:03:48.953Z] 17:03:48     INFO -         Fresh once_cell v1.19.0
[task 2024-08-07T17:03:48.953Z] 17:03:48     INFO -         Fresh zerocopy v0.7.32
[task 2024-08-07T17:03:48.954Z] 17:03:48     INFO -  warning: lint `illegal_floating_point_literal_pattern` has been removed: no longer a warning, float patterns behave the same as `==`
[task 2024-08-07T17:03:48.954Z] 17:03:48     INFO -     --> /builds/worker/checkouts/gecko/third_party/rust/zerocopy/src/lib.rs:161:5
[task 2024-08-07T17:03:48.954Z] 17:03:48     INFO -      |
[task 2024-08-07T17:03:48.954Z] 17:03:48     INFO -  161 |     illegal_floating_point_literal_pattern,
[task 2024-08-07T17:03:48.954Z] 17:03:48     INFO -      |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[task 2024-08-07T17:03:48.954Z] 17:03:48     INFO -      |
[task 2024-08-07T17:03:48.954Z] 17:03:48     INFO -  note: the lint level is defined here

:jimb, since you are the author of the regressor, bug 1910150, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(jimb)

Taking a look right now.

Flags: needinfo?(jimb)

third_party/rust/windows-result/src/bindings.rs refers to RoOriginateErrorW, whose docs say it is provided by RuntimeObject.lib.

It seems that ordinary windows builds do link against RuntimeObject.lib, whereas MinGW builds do not.

The windows-result crate, newly introduced to Mozilla Central by our regressor bug 1910150, expects this function to be found in api-ms-win-core-winrt-error-l1-1-0.dll:

windows_targets::link!("api-ms-win-core-winrt-error-l1-1-0.dll" "system" fn RoOriginateErrorW(error : HRESULT, cchmax : u32, message : PCWSTR) -> BOOL);

and indeed, we do see this option being passed to x86_64-w64-mingw32-clang++ in the logs:

.../x86_64-w64-mingw32-clang++ -shared ... -o ../../../dist/bin/xul.dll ... -Wl,-Xlink=-DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll ...
Assignee: nobody → jimb

Okay, the Windows MinGW all Bd and Bo jobs seem to have worked on that try push, so I think this patch is ready for review.

Set release status flags based on info from the regressing bug 1910150

Pushed by jblandy@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/397b29124fe6 Link against `RuntimeObject.lib` whenever targeting WINNT. r=glandium
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: