Bug 244503

Summary: www/chromium: Fix build with clang 10.0.0
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: freebsd-chromium (Nobody) <chromium>
Status: Closed Overcome By Events    
Severity: Affects Some People CC: emaste, grahamperrin, pizzamig
Priority: --- Flags: bugzilla: maintainer-feedback? (chromium)
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 244251    
Attachments:
Description Flags
Fix www/chromium build with clang 10.0.0
none
Fix www/iridium build with clang 10.0.0
none
Fix devel/electron4 build with clang 10.0.0
none
Fix devel/electron6 build with clang 10.0.0 none

Description Dimitry Andric freebsd_committer freebsd_triage 2020-02-28 17:26:07 UTC
Created attachment 212027 [details]
Fix www/chromium build with clang 10.0.0

As reported in bug 244251, with clang 10.0.0 the www/chromium port fails to build with:

In file included from ../../third_party/angle/src/libANGLE/renderer/vulkan/GlslangWrapper.cpp:18:
In file included from ../../third_party/glslang/src/SPIRV/GlslangToSpv.h:42:
In file included from ../../third_party/glslang/src/SPIRV/SpvTools.h:49:
In file included from ../../third_party/glslang/src/SPIRV/../glslang/MachineIndependent/localintermediate.h:42:
In file included from ../../third_party/glslang/src/glslang/Public/../MachineIndependent/../Include/intermediate.h:55:
In file included from ../../third_party/glslang/src/glslang/Public/../Include/../Include/Common.h:108:
../../third_party/glslang/src/glslang/Public/../Include/PoolAlloc.h:307:54: error: 'operator=' is a private member of 'glslang::TPoolAllocator'
    void setAllocator(TPoolAllocator* a) { allocator = *a; }
                                           ~~~~~~~~~ ^ ~~
../../third_party/glslang/src/glslang/Public/../Include/PoolAlloc.h:244:21: note: declared private here
    TPoolAllocator& operator=(const TPoolAllocator&);  // don't allow assignment operator
                    ^

This can be fixed by applying an upstream commit from the glslang project:

https://github.com/KhronosGroup/glslang/commit/24b3e8384e93f3e73b6aa14ea00a30574112f9ba
Comment 1 Jan Beich freebsd_committer freebsd_triage 2020-02-28 20:00:50 UTC
According to bug 244251 other Chromium-based ports are affected as well:
- www/iridium
- devel/electron4
- devel/electron6
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2020-03-01 08:58:14 UTC
Created attachment 212068 [details]
Fix www/iridium build with clang 10.0.0
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2020-03-01 08:58:52 UTC
Created attachment 212069 [details]
Fix devel/electron4 build with clang 10.0.0
Comment 4 Dimitry Andric freebsd_committer freebsd_triage 2020-03-01 08:59:18 UTC
Created attachment 212070 [details]
Fix devel/electron6 build with clang 10.0.0
Comment 5 Dimitry Andric freebsd_committer freebsd_triage 2020-03-01 09:00:08 UTC
Do the other ports need separate PRs?
Comment 6 Graham Perrin freebsd_committer freebsd_triage 2022-11-20 00:48:51 UTC
With more recent clang, et cetera, is there still a requirement for fixes such as these?

<https://github.com/freebsd/freebsd-src/commit/838e2fa19531c45727938a9160cdd78ecedf8c92>
Comment 7 Dimitry Andric freebsd_committer freebsd_triage 2022-11-20 10:11:33 UTC
(In reply to Graham Perrin from comment #6)
I'm unsure, but the chromium ports have been building for a long time, so it's probably been fixed as a side-effect of something else.