Closed Bug 1579743 Opened 5 years ago Closed 5 years ago

Build fails after 13282d7a47a5 error: static_assert failed due to requirement 'std::is_trivially_constructible<std::atomic<std::mutex *>>::value' at gfx/angle/checkout/src/libGLESv2/global_state.cpp(39,1)

Categories

(Core :: Graphics, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox67 --- unaffected
firefox68 --- unaffected
firefox69 --- unaffected
firefox70 --- unaffected
firefox71 + fixed

People

(Reporter: kontakt, Assigned: mikokm)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Attached file build.log

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

Steps to reproduce:

System information:
Windwos 10 ver. 1903 (OS Build 18362.295)
Visual Studio 2019 16.2.4
MozillaBuild 3.2
If any other system information is required please let me know.

hg up 3064469c073d
./mach build
-> Build succeed

hg up 13282d7a47a5
./mach build
-> Build fails

Bug that this rev. is related to: https://bugzilla.mozilla.org/show_bug.cgi?id=1578576

Actual results:

The following error occured:

1:59.08 c:/mozilla-source/mozilla-central/gfx/angle/checkout/src/libGLESv2/global_state.cpp(39,1): error: static_assert failed due to requirement 'std::is_trivially_constructible<std::atomic<std::mutex *>>::value' "global mutex is not trivially constructible"
1:59.08 static_assert(std::is_trivially_constructible<decltype(g_Mutex)>::value,
1:59.09 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1:59.58 1 error generated.
1:59.62 mozmake.EXE[4]: *** [c:/mozilla-source/mozilla-central/config/rules.mk:789: global_state.obj] Error 1
1:59.63 mozmake.EXE[3]: *** [c:/mozilla-source/mozilla-central/config/recurse.mk:74: gfx/angle/targets/libGLESv2/target-objects] Error 2
1:59.64 mozmake.EXE[3]: *** Waiting for unfinished jobs....
3:02.77 mozmake.EXE[2]: *** [c:/mozilla-source/mozilla-central/config/recurse.mk:34: compile] Error 2
3:02.77 mozmake.EXE[1]: *** [c:/mozilla-source/mozilla-central/config/rules.mk:391: default] Error 2
3:02.77 mozmake.EXE: *** [client.mk:125: build] Error 2
3:02.81 310 compiler warnings present.

Expected results:

The build succeeds.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → General
Product: Firefox → Firefox Build System
Status: UNCONFIRMED → NEW
Component: General → Graphics
Ever confirmed: true
Priority: -- → P3
Product: Firefox Build System → Core
Regressed by: angle-72

How can this only be P3? Can't build anymore :(

std::atomic is not required to be trivially constructible.

In fact, it seems it could not be guaranteed:
https://developercommunity.visualstudio.com/content/problem/416343/stdatomic-no-longer-is-trivially-constructible.html
"std::atomic no longer is trivially constructible"
Response by MS:

This change is by design. The standard doesn't require atomic to have trivial constructors; =default is not sufficient to do that. In fact, =default in the synopsis doesn't have any observable impact on the resulting type.

(More details at the link.)

So this static_assert should definitely be removed.

(In reply to Gerald Squelart [:gerald] from comment #3)

Maybe because the m-c official builds seem unaffected? https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&group_state=expanded&revision=171d5f099ad0d22feda354c74182703ed02842a7
(Which explains how bug 1578576 made it through to central.)

In the meantime, https://hg.mozilla.org/mozilla-central/rev/7500139f15c0 is the last central that doesn't have bug 1578576.

All m-c builds fail with the same error after https://hg.mozilla.org/mozilla-central/rev/7500139f15c0 on my machine, so this may very well be an error on my end. I am on Win10SDK_10.0.18362.0. If you cannot reproduce this, try matching my SDK version. When I get access to my home machine again I will also try downgrading to Win10SDK_10.0.17763.0 to see if that fixes the error.

(In reply to Gerald Squelart [:gerald] from comment #3)

Maybe because the m-c official builds seem unaffected? https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&group_state=expanded&revision=171d5f099ad0d22feda354c74182703ed02842a7
(Which explains how bug 1578576 made it through to central.)

Yes, the automation is running Visual Studio 2017 1.
This looks like it could cause more problems in the future, since the build instructions "default" to Visual Studio 2019 2. We should definitely get Visual Studio 2019 running on CI.

(In reply to Gerald Squelart [:gerald] from comment #4)

https://developercommunity.visualstudio.com/content/problem/416343/stdatomic-no-longer-is-trivially-constructible.html
"std::atomic no longer is trivially constructible"
So this static_assert should definitely be removed.

Thank you for figuring this out, I will write a patch to fix this.

Assignee: nobody → mikokm
Status: NEW → ASSIGNED
Priority: P3 → P1
Blocks: 1581930

Discussed during platform triage. adding a ni to see the status of this fix. Thanks.

Flags: needinfo?(mikokm)

(In reply to Marcia Knous [:marcia - needinfo? me] from comment #9)

Discussed during platform triage. adding a ni to see the status of this fix. Thanks.

The original bug 1578576 was backed out, and has not been relanded yet. This has been fixed there.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Flags: needinfo?(mikokm)
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: