Opened 7 years ago

Closed 6 years ago

#10715 closed defect (fixed)

Cross-Compiling WebGL with mingw-w64 is broken

Reported by: gk Owned by: erinn
Priority: Medium Milestone:
Component: Applications/Tor bundles/installation Version:
Severity: Keywords: tbb-3.5, tbb-usability
Cc: Actual Points:
Parent ID: #12460 Points:
Reviewer: Sponsor:

Description

Enabling WebGL in the Windows .mozconfig leads to:

Blit.cpp
i686-w64-mingw32-g++ -mwindows -o Blit.o -c   -DANGLE_BUILD -DNOMINMAX -DLIBGLESV2_EXPORTS -D_CRT_SECURE_NO_DEPRECATE -D_SECURE_SCL=0 -DANGLE_DISABLE_TRACE -DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1 -DCOMPILER_IMPLEMENTATION -DNO_NSPR_10_SUPPORT -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../../include -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../../include/KHR -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/.. -I"/include" -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2 -I. -I../../../../dist/include  -I/home/ubuntu/build/tor-browser/obj-mingw/dist/include/nspr -I/home/ubuntu/build/tor-browser/obj-mingw/dist/include/nss        -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wcast-align -Wno-format -fno-strict-aliasing -mms-bitfields -mstackrealign -fno-keep-inline-dllexport -fno-rtti -ffunction-sections -fdata-sections -std=gnu++0x -pipe -DNDEBUG -DTRIMMED -g -fexceptions -O -fomit-frame-pointer     /home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/Blit.cpp
Buffer.cpp
i686-w64-mingw32-g++ -mwindows -o Buffer.o -c   -DANGLE_BUILD -DNOMINMAX -DLIBGLESV2_EXPORTS -D_CRT_SECURE_NO_DEPRECATE -D_SECURE_SCL=0 -DANGLE_DISABLE_TRACE -DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1 -DCOMPILER_IMPLEMENTATION -DNO_NSPR_10_SUPPORT -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../../include -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../../include/KHR -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/.. -I"/include" -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2 -I. -I../../../../dist/include  -I/home/ubuntu/build/tor-browser/obj-mingw/dist/include/nspr -I/home/ubuntu/build/tor-browser/obj-mingw/dist/include/nss        -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wcast-align -Wno-format -fno-strict-aliasing -mms-bitfields -mstackrealign -fno-keep-inline-dllexport -fno-rtti -ffunction-sections -fdata-sections -std=gnu++0x -pipe -DNDEBUG -DTRIMMED -g -fexceptions -O -fomit-frame-pointer     /home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/Buffer.cpp
BuiltInFunctionEmulator.cpp
i686-w64-mingw32-g++ -mwindows -o BuiltInFunctionEmulator.o -c   -DANGLE_BUILD -DNOMINMAX -DLIBGLESV2_EXPORTS -D_CRT_SECURE_NO_DEPRECATE -D_SECURE_SCL=0 -DANGLE_DISABLE_TRACE -DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1 -DCOMPILER_IMPLEMENTATION -DNO_NSPR_10_SUPPORT -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../../include -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../../include/KHR -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/.. -I"/include" -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2 -I. -I../../../../dist/include  -I/home/ubuntu/build/tor-browser/obj-mingw/dist/include/nspr -I/home/ubuntu/build/tor-browser/obj-mingw/dist/include/nss        -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wcast-align -Wno-format -fno-strict-aliasing -mms-bitfields -mstackrealign -fno-keep-inline-dllexport -fno-rtti -ffunction-sections -fdata-sections -std=gnu++0x -pipe -DNDEBUG -DTRIMMED -g -fexceptions -O -fomit-frame-pointer     /home/ubuntu/build/tor-browser/gfx/angle/src/compiler/BuiltInFunctionEmulator.cpp
CodeGenHLSL.cpp
i686-w64-mingw32-g++ -mwindows -o CodeGenHLSL.o -c   -DANGLE_BUILD -DNOMINMAX -DLIBGLESV2_EXPORTS -D_CRT_SECURE_NO_DEPRECATE -D_SECURE_SCL=0 -DANGLE_DISABLE_TRACE -DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1 -DCOMPILER_IMPLEMENTATION -DNO_NSPR_10_SUPPORT -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../../include -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../../include/KHR -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/.. -I"/include" -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2 -I. -I../../../../dist/include  -I/home/ubuntu/build/tor-browser/obj-mingw/dist/include/nspr -I/home/ubuntu/build/tor-browser/obj-mingw/dist/include/nss        -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wcast-align -Wno-format -fno-strict-aliasing -mms-bitfields -mstackrealign -fno-keep-inline-dllexport -fno-rtti -ffunction-sections -fdata-sections -std=gnu++0x -pipe -DNDEBUG -DTRIMMED -g -fexceptions -O -fomit-frame-pointer     /home/ubuntu/build/tor-browser/gfx/angle/src/compiler/CodeGenHLSL.cpp
Compiler.cpp
i686-w64-mingw32-g++ -mwindows -o Compiler.o -c   -DANGLE_BUILD -DNOMINMAX -DLIBGLESV2_EXPORTS -D_CRT_SECURE_NO_DEPRECATE -D_SECURE_SCL=0 -DANGLE_DISABLE_TRACE -DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1 -DCOMPILER_IMPLEMENTATION -DNO_NSPR_10_SUPPORT -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../../include -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../../include/KHR -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/.. -I"/include" -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2 -I. -I../../../../dist/include  -I/home/ubuntu/build/tor-browser/obj-mingw/dist/include/nspr -I/home/ubuntu/build/tor-browser/obj-mingw/dist/include/nss        -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wcast-align -Wno-format -fno-strict-aliasing -mms-bitfields -mstackrealign -fno-keep-inline-dllexport -fno-rtti -ffunction-sections -fdata-sections -std=gnu++0x -pipe -DNDEBUG -DTRIMMED -g -fexceptions -O -fomit-frame-pointer     /home/ubuntu/build/tor-browser/gfx/angle/src/compiler/Compiler.cpp
Context.cpp
i686-w64-mingw32-g++ -mwindows -o Context.o -c   -DANGLE_BUILD -DNOMINMAX -DLIBGLESV2_EXPORTS -D_CRT_SECURE_NO_DEPRECATE -D_SECURE_SCL=0 -DANGLE_DISABLE_TRACE -DANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1 -DCOMPILER_IMPLEMENTATION -DNO_NSPR_10_SUPPORT -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../../include -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../../include/KHR -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/.. -I"/include" -I/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2 -I. -I../../../../dist/include  -I/home/ubuntu/build/tor-browser/obj-mingw/dist/include/nspr -I/home/ubuntu/build/tor-browser/obj-mingw/dist/include/nss        -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wcast-align -Wno-format -fno-strict-aliasing -mms-bitfields -mstackrealign -fno-keep-inline-dllexport -fno-rtti -ffunction-sections -fdata-sections -std=gnu++0x -pipe -DNDEBUG -DTRIMMED -g -fexceptions -O -fomit-frame-pointer     /home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/Context.cpp
D3DConstantTable.cpp
In file included from /home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../libEGL/Display.h:23:0,
                 from /home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../libGLESv2/main.h:17,
                 from /home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/Buffer.cpp:13:
/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../libEGL/Config.h:97:5: error: a class-key must be used when declaring a friend
/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../libEGL/Config.h:97:5: error: friend declaration does not name a class or function
make[7]: *** [Buffer.o] Error 1
make[7]: *** Waiting for unfinished jobs....
In file included from /home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../libEGL/Display.h:23:0,
                 from /home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../libGLESv2/Blit.h:21,
                 from /home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/Blit.cpp:9:
/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../libEGL/Config.h:97:5: error: a class-key must be used when declaring a friend
/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../libEGL/Config.h:97:5: error: friend declaration does not name a class or function
make[7]: *** [Blit.o] Error 1
In file included from /home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../libEGL/Display.h:23:0,
                 from /home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/Context.cpp:15:
/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../libEGL/Config.h:97:5: error: a class-key must be used when declaring a friend
/home/ubuntu/build/tor-browser/gfx/angle/src/libGLESv2/../libEGL/Config.h:97:5: error: friend declaration does not name a class or function
make[7]: *** [Context.o] Error 1
make[7]: Leaving directory `/home/ubuntu/build/tor-browser/obj-mingw/gfx/angle/src/libGLESv2'
make[6]: *** [libs] Error 2
make[6]: Leaving directory `/home/ubuntu/build/tor-browser/obj-mingw/gfx/angle'
make[5]: *** [libs] Error 2
make[5]: Leaving directory `/home/ubuntu/build/tor-browser/obj-mingw/gfx'
make[4]: *** [libs_tier_platform] Error 2
make[4]: Leaving directory `/home/ubuntu/build/tor-browser/obj-mingw'
make[3]: *** [tier_platform] Error 2
make[3]: Leaving directory `/home/ubuntu/build/tor-browser/obj-mingw'
make[2]: *** [default] Error 2
make[2]: Leaving directory `/home/ubuntu/build/tor-browser/obj-mingw'
make[1]: *** [realbuild] Error 2
make[1]: Leaving directory `/home/ubuntu/build/tor-browser'
make: *** [build] Error 2

Child Tickets

Change History (8)

comment:1 Changed 7 years ago by gk

Since https://bugzilla.mozilla.org/show_bug.cgi?id=787653 landed compiling WebGL with mingw-w64 should be possible generally, I think. Maybe we could try updating ANGLE (https://bugzilla.mozilla.org/show_bug.cgi?id=883478) and see if that helps.

comment:2 Changed 7 years ago by gk

Taking Fx 26 and fixing some obvious compile bugs helps me getting beyond the problems of Fx 24. But still the compilation does not succeed. I think we should maybe poke Jacek here and ask whether he ran into similar issues.

comment:3 Changed 7 years ago by gk

Jacek points me to https://bugzilla.mozilla.org/show_bug.cgi?id=945292 which should fix the problem on m-c (when it finally lands).

comment:4 Changed 7 years ago by gk

Jacek's fix landed but I could not test it with the latest m-c. Nor did rev 165409 succeed. Both failed due to other breakage happening earlier in the build process. I might be inclined to backport the fix to ESR 24 (which is a good idea anyways) and test it there.

comment:5 Changed 6 years ago by erinn

Keywords: needs-triage added

comment:6 Changed 6 years ago by gk

Keywords: ff31-esr added; needs-triage removed

Using ESR 31 fixes the compilation issues. We should remove the --disable-webgl flag then.

comment:7 Changed 6 years ago by mikeperry

Keywords: ff31-esr removed
Parent ID: #12460

comment:8 Changed 6 years ago by gk

Resolution: fixed
Status: newclosed

Fixed in commit c2a5e4b513677a02a57709a6fff4ed9d5d3629c3.

Note: See TracTickets for help on using tickets.