Closed Bug 1718171 Opened 3 years ago Closed 1 year ago

Windows 10 PGO build fails with undefined symbol: __llvm_profile_instrument_memop

Categories

(Firefox Build System :: General, defect, P3)

Firefox 91
defect

Tracking

(firefox113 fixed)

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: ttolonen, Assigned: glandium)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0

Steps to reproduce:

Building Firefox on Windows 10 fails after turning on PGO with ac_add_options MOZ_PGO=1

Actual results:

17:13.67 ipc/mscom/oop/mscom_oop.lib
17:13.75 mozglue/build/mozglue.dll
17:13.78 1 warning generated.
17:13.95 config/external/ffi
17:13.98 lld-link: error: undefined symbol: __llvm_profile_instrument_memop
17:13.98 >>> referenced by ....\memory\build\Unified_cpp_memory_build0.obj:(private: void * __cdecl arena_t::PallocHuge(unsigned __int64, unsigned __int64, bool))
17:13.98 >>> referenced by ....\memory\build\Unified_cpp_memory_build0.obj:(public: void __cdecl arena_t::DallocLarge(struct arena_chunk_t *, void *))
17:13.98 >>> referenced by ....\memory\build\Unified_cpp_memory_build0.obj:(private: void * __cdecl arena_t::RallocSmallOrLarge(void *, unsigned __int64, unsigned __int64))
17:13.98 >>> referenced 325 more times
17:13.98 mozmake[4]: *** [c:/mozilla-source/mozilla-unified/config/rules.mk:544: mozglue.dll] Error 1
17:14.00 mozmake[3]: *** [c:/mozilla-source/mozilla-unified/config/recurse.mk:72: mozglue/build/target] Error 2
17:14.00 mozmake[3]: *** Waiting for unfinished jobs....

The Bugbug bot thinks this bug should belong to the 'Firefox Build System::General' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → General
Product: Firefox → Firefox Build System

Our official builds are cross-compiled from Linux without PGO, so we don't do a lot of Windows PGO work - ergo, the breakage.
If you're interested in digging in and making a patch, then feel free to ask questions in #build ask you go.

Priority: -- → P3

(In reply to Mitchell Hentges [:mhentges] 🦀 from comment #2)

Our official builds are cross-compiled from Linux without PGO

with PGO.

My mistake. Either way, even if we still have Windows machines for gathering profile data, the logic for PGO decision making in the build hasn't been frequently run on Windows anymore.

This is still broken, and it's going to be complicated to investigate a failure that triggers at PGO run step (on taskcluster).

In all likeliness, what's missing is the profile runtime in LDFLAGS. Everything that involves clang runtimes requires manual work on Windows currently (true for sanitizers too)

Duplicate of this bug: 1809850

We currently do so from mozconfigs, but that means this doesn't happen
for local builds.

Assignee: nobody → mh+mozilla
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
See Also: → 1825583
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/896d30925c68
Add the clang runtime directory to LIB during configure. r=firefox-build-system-reviewers,andi
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: