Building a snap from source fails for 92, build errors in angle
Categories
(Core :: Graphics, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox-esr91 | --- | unaffected |
firefox-esr102 | --- | wontfix |
firefox91 | --- | unaffected |
firefox92 | --- | wontfix |
firefox93 | --- | wontfix |
firefox94 | --- | wontfix |
firefox95 | --- | wontfix |
firefox104 | --- | wontfix |
firefox105 | --- | wontfix |
firefox106 | --- | fixed |
People
(Reporter: olivier, Assigned: jgilbert)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(3 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
Steps to reproduce:
Building a firefox snap package from source (https://code.launchpad.net/~mozilla-snaps/+git/firefox-snap) is failing starting with the current beta (version 92).
The build failure doesn't affect upstream builds, only snaps built from source, and is caused by the layout of the snap build environment.
The problem was triggered by recent changes in gfx/angle/moz.build.common
(last two commits on bug 1721962, https://hg.mozilla.org/mozilla-central/rev/89fbf7468841 and https://hg.mozilla.org/mozilla-central/rev/053c9e528b02).
Actual results:
These are the build errors:
32:50.57 /build/firefox/parts/firefox/build/gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp:5605:50: error: no member named 'isnan' in namespace 'sh::BuiltInName'
32:50.57 BuiltInName::isnan,
32:50.57 ~~~~~~~~~~~~~^
32:50.59 /build/firefox/parts/firefox/build/gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp:5613:50: error: no member named 'isnan' in namespace 'sh::BuiltInName'
32:50.59 BuiltInName::isnan,
32:50.59 ~~~~~~~~~~~~~^
32:50.60 /build/firefox/parts/firefox/build/gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp:5621:50: error: no member named 'isnan' in namespace 'sh::BuiltInName'
32:50.60 BuiltInName::isnan,
32:50.60 ~~~~~~~~~~~~~^
32:50.61 /build/firefox/parts/firefox/build/gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp:5629:50: error: no member named 'isnan' in namespace 'sh::BuiltInName'
32:50.61 BuiltInName::isnan,
32:50.61 ~~~~~~~~~~~~~^
32:50.63 /build/firefox/parts/firefox/build/gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp:5637:50: error: no member named 'isinf' in namespace 'sh::BuiltInName'
32:50.63 BuiltInName::isinf,
32:50.63 ~~~~~~~~~~~~~^
32:50.64 /build/firefox/parts/firefox/build/gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp:5645:50: error: no member named 'isinf' in namespace 'sh::BuiltInName'
32:50.64 BuiltInName::isinf,
32:50.64 ~~~~~~~~~~~~~^
32:50.65 /build/firefox/parts/firefox/build/gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp:5653:50: error: no member named 'isinf' in namespace 'sh::BuiltInName'
32:50.65 BuiltInName::isinf,
32:50.65 ~~~~~~~~~~~~~^
32:50.67 /build/firefox/parts/firefox/build/gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp:5661:50: error: no member named 'isinf' in namespace 'sh::BuiltInName'
32:50.67 BuiltInName::isinf,
32:50.67 ~~~~~~~~~~~~~^
32:51.20 8 errors generated.
32:51.22 make[4]: *** [/build/firefox/parts/firefox/build/config/rules.mk:693: SymbolTable_ESSL_autogen.o] Error 1
32:51.22 make[3]: *** [/build/firefox/parts/firefox/build/config/recurse.mk:72: gfx/angle/targets/translator/target-objects] Error 2
Expected results:
I'm opening this bug to keep a track record of my findings while I'm investigating the problem and looking for a decent fix.
I do have a workaround (in the form of a minimal patch to the angle sources that are vendored in the firefox source tree), but we're aiming to build the snap from unmodified sources, so either the patch is good enough to be upstreamed (to angle), or we need to come up with another solution. This is the patch:
--- a/gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp
+++ b/gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp
@@ -11,6 +11,8 @@
#ifdef ANGLE_TRANSLATOR_ESSL_ONLY
+#include <cmath>
+
# include "compiler/translator/SymbolTable.h"
# include "angle_gl.h"
Comment 1•3 years ago
|
||
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.
Reporter | ||
Comment 2•3 years ago
|
||
The problem is caused by pkg-config setting MOZ_X11_CFLAGS
to -I/snap/gnome-3-38-2004-sdk/current/usr/include
, which results in clang resolving include directives differently, and using system headers provided by the gnome-3-38-2004-sdk snap where std::isnan
and std::isinf
are not defined.
Manually editing obj-*/gfx/angle/targets/translator/backend.mk
to remove -I/snap/gnome-3-38-2004-sdk/current/usr/include
from the value of COMPUTED_CXXFLAGS
"fixes" the problem.
As does adding the #include <cmath>
directive to gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp
.
Comment 3•3 years ago
|
||
I'm guessing that this is related to recent sysroot
work, sending this to glandium to confirm.
Reporter | ||
Comment 4•3 years ago
|
||
I don't think so, building the snap from source doesn't make use of a sysroot. It's really a snap-specific problem that wasn't uncovered until the recent changes to gfx/angle/moz.build.common
.
Comment 5•3 years ago
|
||
Ah, I'm assuming that the pkg-config
and sysroot
changes are related.
Updated•3 years ago
|
Reporter | ||
Comment 6•3 years ago
|
||
I'm attaching the contents of obj-*/gfx/angle/targets/translator/.deps/SymbolTable_ESSL_autogen.o.pp when building firefox 92 in the snap build environment, without the patch (fails to build) and with the patch that adds the <cmath> include, for reference and further investigation.
Reporter | ||
Comment 7•3 years ago
|
||
Reporter | ||
Comment 8•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 9•3 years ago
|
||
Set release status flags based on info from the regressing bug 1721962
Reporter | ||
Comment 10•3 years ago
|
||
Seeing that firefox doesn't use angle on Linux, an option would be to not build it at all, thus working around the problem. Unfortunately, I'm not seeing any build option that allows not building it. The targets/translator
library is always being built.
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 12•3 years ago
|
||
(In reply to Olivier Tilloy from comment #10)
Seeing that firefox doesn't use angle on Linux, an option would be to not build it at all, thus working around the problem. Unfortunately, I'm not seeing any build option that allows not building it. The
targets/translator
library is always being built.
We do use (that part of) ANGLE on Linux. ANGLE is has two modules that we use:
- A shader validator and translator (WebGLSL => GLSL/ESSL), which we build and use everywhere. (This is required for our WebGL engine's validation code)
- An OpenGL ES driver that runs on top of D3D, which we build and use only on Windows
Assignee | ||
Comment 13•3 years ago
|
||
I think this is easy to fix upstream.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 14•2 years ago
|
||
The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.
Comment 15•2 years ago
|
||
Kelsey, you mentionned this is easy to fix upstream, Olivier's patch is really simple indeed, is there any reason this is not yet in upstream ?
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 16•2 years ago
|
||
Assignee | ||
Comment 17•2 years ago
|
||
I'm really not sure how vulkan.hpp gets marked for vendoring? It has no references in searchfox outside of itself.
And for some reason it's changed here, even though I don't think I touched it?
I'm just going to leave it for now though, though it'd be nice to not even have these things that we don't use. We "shouldn't" be picking them up for vendoring.
Assignee | ||
Comment 18•2 years ago
|
||
Does this patch fix your issue? I have not built snaps before, so if you can test it and confirm that this fixes it, I can finish landing it.
Reporter | ||
Comment 19•2 years ago
|
||
I'll do a test build with the patch to confirm.
Reporter | ||
Comment 20•2 years ago
|
||
The test build failed, with the same errors as originally reported:
28:33.99 /build/firefox/parts/firefox/build/gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp:6012:50: error: no member named 'isnan' in namespace 'sh::BuiltInName'
28:33.99 BuiltInName::isnan,
28:33.99 ~~~~~~~~~~~~~^
28:33.99 /build/firefox/parts/firefox/build/gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp:6020:50: error: no member named 'isnan' in namespace 'sh::BuiltInName'
28:33.99 BuiltInName::isnan,
28:33.99 ~~~~~~~~~~~~~^
28:33.99 /build/firefox/parts/firefox/build/gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp:6028:50: error: no member named 'isnan' in namespace 'sh::BuiltInName'
28:33.99 BuiltInName::isnan,
28:33.99 ~~~~~~~~~~~~~^
28:33.99 /build/firefox/parts/firefox/build/gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp:6036:50: error: no member named 'isnan' in namespace 'sh::BuiltInName'
28:33.99 BuiltInName::isnan,
28:34.00 ~~~~~~~~~~~~~^
28:34.00 /build/firefox/parts/firefox/build/gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp:6044:50: error: no member named 'isinf' in namespace 'sh::BuiltInName'
28:34.00 BuiltInName::isinf,
28:34.00 ~~~~~~~~~~~~~^
28:34.02 /build/firefox/parts/firefox/build/gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp:6052:50: error: no member named 'isinf' in namespace 'sh::BuiltInName'
28:34.02 BuiltInName::isinf,
28:34.02 ~~~~~~~~~~~~~^
28:34.03 /build/firefox/parts/firefox/build/gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp:6060:50: error: no member named 'isinf' in namespace 'sh::BuiltInName'
28:34.03 BuiltInName::isinf,
28:34.03 ~~~~~~~~~~~~~^
28:34.03 /build/firefox/parts/firefox/build/gfx/angle/checkout/src/compiler/translator/SymbolTable_ESSL_autogen.cpp:6068:50: error: no member named 'isinf' in namespace 'sh::BuiltInName'
28:34.03 BuiltInName::isinf,
28:34.03 ~~~~~~~~~~~~~^
28:34.46 8 errors generated.
Note that I'm not seeing any reference to including <cmath>
in the patch, except in the commit message, is that an oversight?
Reporter | ||
Comment 23•2 years ago
|
||
Yes, with the updated patch the amd64 snap build succeeded. I have now triggered armhf and arm64 builds to make sure all supported architectures (for the snap) build equally well, I'll report back here.
Reporter | ||
Comment 24•2 years ago
|
||
And I can confirm that the patch fixes the build for all supported snap architectures (amd64, armhf, arm64). Thanks!
Comment 25•2 years ago
|
||
Comment 26•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•