Opened 10 months ago

Closed 8 months ago

#25420 closed task (fixed)

Update gcc to 6.4.0 (Windows)

Reported by: boklm Owned by: tbb-team
Priority: High Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-rbm, boklm201804, TorBrowserTeam201804R
Cc: Actual Points:
Parent ID: #24631 Points:
Reviewer: Sponsor:

Description

We should build Tor Browser for Windows using gcc 6.4.0.

Child Tickets

TicketStatusOwnerSummaryComponent
#20302closedkpdyerFTE compilation in our gitian setup is broken for Windows with GCC 6.2.0Obfuscation/FTE

Change History (14)

comment:1 Changed 10 months ago by boklm

I started a patch for this in branch bug_25420:
https://gitweb.torproject.org/user/boklm/tor-browser-build.git/commit/?h=bug_25420&id=318ab85316b5d2d29084f5c1f9235c8909f8c1b6

Building firefox using mingw and gcc 6.4.0 fails with the following error:

/var/tmp/dist/mingw-w64/helpers/i686-w64-mingw32-g++ -std=gnu++11 -mwindows -o Unified_cpp_media_platforms_wmf0.o -c -I/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist
/stl_wrappers  -DNDEBUG=1 -DTRIMMED=1 -DWIN32_LEAN_AND_MEAN -D_WIN32 -DWIN32 -D_CRT_RAND_S -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DOS_WIN=1 -D_UNICODE -DCHROMIUM_BUILD -DU_
STATIC_IMPLEMENTATION -DUNICODE -D_WINDOWS -D_SECURE_ATL -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/var/tmp/build/firefox-8ee6f
dadea2a/dom/media/platforms/wmf -I/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dom/media/platforms/wmf -I/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/ipc/ipdl/_ipdlhea
ders -I/var/tmp/build/firefox-8ee6fdadea2a/ipc/chromium/src -I/var/tmp/build/firefox-8ee6fdadea2a/ipc/glue -I/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include  
-I/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include/nspr -I/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include/nss         -DMOZILLA_CLIENT -include /var
/tmp/build/firefox-8ee6fdadea2a/obj-mingw/mozilla-config.h -MD -MP -MF .deps/Unified_cpp_media_platforms_wmf0.o.pp  -Wall -Wc++11-compat -Wempty-body -Wignored-qualifier
s -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wno-error=maybe-uninitialize
d -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-format -fno-lifetime-dse -fno-exceptions -fno-strict-aliasing -mms-bitfields -mstackrealign -fno-keep-i
nline-dllexport -fno-rtti -fno-exceptions -fno-math-errno -pipe  -g -O -fno-omit-frame-pointer   -I/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include/cairo  /var
/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dom/media/platforms/wmf/Unified_cpp_media_platforms_wmf0.cpp
In file included from /var/tmp/build/firefox-8ee6fdadea2a/dom/media/platforms/wmf/WMFUtils.cpp:11:0:
/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include/mozilla/WindowsVersion.h:218:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
 #pragma warning(push)
 
/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include/mozilla/WindowsVersion.h:219:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
 #pragma warning(disable:4996)
 
/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include/mozilla/WindowsVersion.h:221:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
 #pragma warning(pop)
In file included from /var/tmp/build/firefox-8ee6fdadea2a/dom/media/platforms/wmf/WMFDecoderModule.cpp:28:0,
                 from /var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dom/media/platforms/wmf/Unified_cpp_media_platforms_wmf0.cpp:29:
/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include/mozilla/WindowsVersion.h:218:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
 #pragma warning(push)
 
/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include/mozilla/WindowsVersion.h:219:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
 #pragma warning(disable:4996)
 
/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include/mozilla/WindowsVersion.h:221:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
 #pragma warning(pop)

In file included from /var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include/mozilla/layers/Compositor.h:15:0,
                 from /var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include/mozilla/layers/TextureD3D11.h:10,
                 from /var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include/mozilla/layers/D3D11ShareHandleImage.h:13,
                 from /var/tmp/build/firefox-8ee6fdadea2a/dom/media/platforms/wmf/DXVA2Manager.cpp:14,
                 from /var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dom/media/platforms/wmf/Unified_cpp_media_platforms_wmf0.cpp:2:
/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include/mozilla/gfx/Polygon.h: In member function 'nsTArray<float> mozilla::gfx::Polygon3DTyped<Units>::CalculateDotProducts(const mozilla::gfx::Polygon3DTyped<Units>&, size_t&, size_t&) const':
/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include/mozilla/gfx/Polygon.h:99:0: note: -Wmisleading-indentation is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers
       dotProducts.AppendElement(dot);
 
In file included from /var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include/mozilla/layers/D3D11ShareHandleImage.h:13:0,
                 from /var/tmp/build/firefox-8ee6fdadea2a/dom/media/platforms/wmf/DXVA2Manager.cpp:14,
                 from /var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dom/media/platforms/wmf/Unified_cpp_media_platforms_wmf0.cpp:2:
/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include/mozilla/layers/TextureD3D11.h: In member function 'virtual mozilla::layers::DataTextureSource* mozilla::layers::DataTextureSourceD3D11::AsDataTextureSource()':
/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include/mozilla/layers/TextureD3D11.h:240:0: error: operands to ?: have different types 'mozilla::layers::DataTextureSourceD3D11*' and 'bool'
   virtual DataTextureSource* AsDataTextureSource() override { return mAllowTextureUploads ? this : false; }
 
In file included from /var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dom/media/platforms/wmf/Unified_cpp_media_platforms_wmf0.cpp:20:0:
/var/tmp/build/firefox-8ee6fdadea2a/dom/media/platforms/wmf/WMFAudioMFTManager.cpp: In function 'void mozilla::AACAudioSpecificConfigToUserData(uint8_t, const uint8_t*, uint32_t, nsTArray<unsigned char>&)':
/var/tmp/build/firefox-8ee6fdadea2a/dom/media/platforms/wmf/WMFAudioMFTManager.cpp:68:0: warning: unused variable 'profile' [-Wunused-variable]
     int8_t profile = (aAudioSpecConfig[0] & 0xF8) >> 3;

/var/tmp/build/firefox-8ee6fdadea2a/dom/media/webaudio/MediaBufferDecoder.cpp: In member function 'void mozilla::WebAudioDecodeJob::OnFailure(mozilla::WebAudioDecodeJob:
:ErrorCode)':
/var/tmp/build/firefox-8ee6fdadea2a/dom/media/webaudio/MediaBufferDecoder.cpp:609:48: warning: 'errorMessage' may be used uninitialized in this function [-Wmaybe-uniniti
alized]
                                   errorMessage);
                                                ^
In file included from /var/tmp/build/firefox-8ee6fdadea2a/dom/media/platforms/wmf/WMFDecoderModule.cpp:9:0,
                 from /var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dom/media/platforms/wmf/Unified_cpp_media_platforms_wmf0.cpp:29:
/var/tmp/build/firefox-8ee6fdadea2a/dom/media/platforms/wmf/WMFVideoMFTManager.h: In constructor 'mozilla::WMFVideoMFTManager::WMFVideoMFTManager(const mozilla::VideoInfo&, mozilla::layers::KnowsCompositor*, mozilla::layers::ImageContainer*, bool)':
/var/tmp/build/firefox-8ee6fdadea2a/dom/media/platforms/wmf/WMFVideoMFTManager.h:100:0: warning: 'mozilla::WMFVideoMFTManager::mDXVAEnabled' will be initialized after [-Wreorder]
   bool mDXVAEnabled;
 
/var/tmp/build/firefox-8ee6fdadea2a/dom/media/platforms/wmf/WMFVideoMFTManager.h:91:0: warning:   'RefPtr<mozilla::layers::KnowsCompositor> mozilla::WMFVideoMFTManager::mKnowsCompositor' [-Wreorder]
   RefPtr<layers::KnowsCompositor> mKnowsCompositor;
 
In file included from /var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dom/media/platforms/wmf/Unified_cpp_media_platforms_wmf0.cpp:47:0:
/var/tmp/build/firefox-8ee6fdadea2a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp:81:0: warning:   when initialized here [-Wreorder]
 WMFVideoMFTManager::WMFVideoMFTManager(
 
/var/tmp/build/firefox-8ee6fdadea2a/config/rules.mk:951: recipe for target 'Unified_cpp_media_platforms_wmf0.o' failed
make[5]: *** [Unified_cpp_media_platforms_wmf0.o] Error 1
make[5]: Leaving directory '/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dom/media/platforms/wmf'

comment:2 Changed 10 months ago by gk

Yeah, that's fixed by Jacek's patch for bug 1372870.

comment:3 Changed 10 months ago by boklm

Thanks, this patch is indeed fixing the issue.

The next build issue is:

/var/tmp/dist/mingw-w64/helpers/i686-w64-mingw32-g++ -std=gnu++11 -mwindows -o NameTable.o -c -I/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/stl_wrappers  -DNDEBUG
=1 -DTRIMMED=1 -DGRAPHITE2_STATIC '-DPACKAGE_VERSION="moz"' '-DPACKAGE_BUGREPORT="http://bugzilla.mozilla.org/"' -DGRAPHITE2_NFILEFACE -DGRAPHITE2_NTRACING -DGRAPHITE2_N
SEGCACHE '-DGRAPHITE2_CUSTOM_HEADER="MozGrMalloc.h"' -I/var/tmp/build/firefox-8ee6fdadea2a/gfx/graphite2/src -I/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/gfx/graphite
2/src  -I/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include  -I/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/dist/include/nspr -I/var/tmp/build/firefox-8ee6fdade
a2a/obj-mingw/dist/include/nss         -DMOZILLA_CLIENT -include /var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/mozilla-config.h -MD -MP -MF .deps/NameTable.o.pp  -Wall -
Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offseto
f -Wc++14-compat -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-format -fno-lifetime-dse -fno-exceptions -fno-strict-alia
sing -mms-bitfields -mstackrealign -fno-keep-inline-dllexport -fno-rtti -fno-exceptions -fno-math-errno -pipe  -g -O -fno-omit-frame-pointer    /var/tmp/build/firefox-8e
e6fdadea2a/gfx/graphite2/src/NameTable.cpp
libdom_messagechannel.a.desc
rm -f libdom_messagechannel.a
/var/tmp/build/firefox-8ee6fdadea2a/obj-mingw/_virtualenv/bin/python /var/tmp/build/firefox-8ee6fdadea2a/config/expandlibs_gen.py -o libdom_messagechannel.a.desc Unified
_cpp_dom_messagechannel0.o  
In file included from /var/tmp/build/firefox-8ee6fdadea2a/gfx/graphite2/src/inc/Main.h:33:0,
                 from /var/tmp/build/firefox-8ee6fdadea2a/gfx/graphite2/src/NameTable.cpp:27:
/var/tmp/build/firefox-8ee6fdadea2a/gfx/graphite2/src/MozGrMalloc.h:16:16: error: 'std::moz_xcalloc' has not been declared
 #define calloc moz_xcalloc
                ^
/var/tmp/build/firefox-8ee6fdadea2a/gfx/graphite2/src/MozGrMalloc.h:15:16: error: 'std::moz_xmalloc' has not been declared
 #define malloc moz_xmalloc
                ^
/var/tmp/build/firefox-8ee6fdadea2a/gfx/graphite2/src/MozGrMalloc.h:17:17: error: 'std::moz_xrealloc' has not been declared
 #define realloc moz_xrealloc
                 ^
/var/tmp/build/firefox-8ee6fdadea2a/config/rules.mk:951: recipe for target 'NameTable.o' failed
make[5]: *** [NameTable.o] Error 1

comment:6 Changed 10 months ago by boklm

Taking the 2 patches from bugs 1389965 and 1407601 is fixing the firefox build issues. I am now hitting #20302.

comment:7 Changed 9 months ago by boklm

Parent ID: #24631

comment:8 Changed 9 months ago by boklm

Keywords: boklm201804 added; boklm201803 removed

boklm201803 -> boklm201804

comment:9 Changed 8 months ago by gk

Keywords: TorBrowserTeam201804 added; TorBrowserTeam201803 removed

Moving our tickets to April.

comment:10 Changed 8 months ago by gk

Priority: MediumHigh

comment:12 Changed 8 months ago by gk

Keywords: TorBrowserTeam201804 added; TorBrowserTeam201804R removed
Status: needs_reviewneeds_revision

Okay, we are close! Testing the patches looks good. One thing I'd like to see changed is the way you handle the Firefox patches: we should move them into the tor-browser repo where possible, as it is otherwise hard for folks building the browser part outside of the tor-browser-build environment. Plus it makes it harder to keep track of the various patches we have if they are in different places. Moving the patches to tor-browser should be especially the case when we are unconditionally applying patches as you did in your patch (I guess just enabling the three patches for Windows would have been enough).

comment:13 Changed 8 months ago by boklm

Keywords: TorBrowserTeam201804R added; TorBrowserTeam201804 removed
Status: needs_revisionneeds_review

Yes, I think the tor-browser patches should be moved to tor-browser.git. I only put them in a branch in tor-browser-build for testing.

I created a branch bug_25420 with the patches:
https://github.com/boklm/gecko-dev/commits/bug_25420

The tor-browser-build changes are in branch bug_25420_v4:
https://gitweb.torproject.org/user/boklm/tor-browser-build.git/commit/?h=bug_25420_v4&id=d3e2dd7fad0c5a6fc0171719b6eb3f9e0883d84f

comment:14 Changed 8 months ago by gk

Resolution: fixed
Status: needs_reviewclosed

Alright! The browser patches got applied to tor-browser-52.7.3esr-8.0-1 (commits d463bad82114ae420b165f8c3f2a690b9d663a19, 5a3775152eac3be01e3e947214748e33712bec68, and 645b11df3349f9045779d1d6c82d6c3722b6b2b2). I merged the build related patch to master (commit dcce85b6d858d5438bdc68098e846c8ea73c5df6).

Note: See TracTickets for help on using tickets.