ESR 78.6 fails to build with cbindgen 0.16.0
Categories
(Core :: Graphics: WebGPU, defect)
Tracking
()
People
(Reporter: jbeich, Assigned: emilio)
References
Details
Attachments
(1 file)
|
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr78+
|
Details | Review |
$ pkg info -x cbindgen
rust-cbindgen-0.16.0
$ ./mach build
[...]
In file included from Unified_cpp_dom_webgpu1.cpp:110:
dom/webgpu/ipc/WebGPUParent.cpp:426:29: error: no member named '_0' in 'mozilla::webgpu::ffi::WGPUBufferBinding'
bgb.resource.buffer._0.buffer = entry.mValue;
~~~~~~~~~~~~~~~~~~~ ^
dom/webgpu/ipc/WebGPUParent.cpp:427:29: error: no member named '_0' in 'mozilla::webgpu::ffi::WGPUBufferBinding'
bgb.resource.buffer._0.offset = entry.mBufferOffset;
~~~~~~~~~~~~~~~~~~~ ^
dom/webgpu/ipc/WebGPUParent.cpp:428:29: error: no member named '_0' in 'mozilla::webgpu::ffi::WGPUBufferBinding'
bgb.resource.buffer._0.size = entry.mBufferSize;
~~~~~~~~~~~~~~~~~~~ ^
dom/webgpu/ipc/WebGPUParent.cpp:432:34: error: member reference base type 'mozilla::webgpu::ffi::WGPUTextureViewId' (aka 'unsigned long long') is not a structure or union
bgb.resource.texture_view._0 = entry.mValue;
~~~~~~~~~~~~~~~~~~~~~~~~~^~~
dom/webgpu/ipc/WebGPUParent.cpp:436:29: error: member reference base type 'mozilla::webgpu::ffi::WGPUSamplerId' (aka 'unsigned long long') is not a structure or union
bgb.resource.sampler._0 = entry.mValue;
~~~~~~~~~~~~~~~~~~~~^~~
5 errors generated.
http://beefy5.nyi.freebsd.org/data/121i386-default/558873/logs/errors/firefox-esr-78.6.0_1,1.log
http://beefy5.nyi.freebsd.org/data/121i386-default/558873/logs/errors/thunderbird-78.6.0_1.log
Comment 1•4 years ago
|
||
i can confirm that tb 76.0 fails to build on OpenBSD/i386 with cbindgen updated to 0.16.0.
Comment 2•4 years ago
|
||
I can see the same build failure under NetBSD/amd64 with cbindgen-0.16.0 and firefox-78.6.0.
| Assignee | ||
Comment 3•4 years ago
|
||
This is kind of expected, cbindgen changed output of Rust tuple structs. The solution is removing the _0s
Comment 4•4 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)
This is kind of expected, cbindgen changed output of Rust tuple structs. The solution is removing the
_0s
is it something that's going to happen in mozilla-esr78 repo (via a cbindgen version check and ifdefs ?), or are downstreams upgrading their cbindgen package supposed to do that locally via patches ?
| Assignee | ||
Comment 5•4 years ago
|
||
I can provide a patch.
| Assignee | ||
Comment 6•4 years ago
|
||
This works both with the old and new cbindgen-generated bindings.
This is effectively dead code on ESR though, because we haven't enabled
WebGPU there, but...
Updated•4 years ago
|
| Assignee | ||
Comment 7•4 years ago
|
||
Comment on attachment 9194817 [details]
Bug 1684180 - Fix ESR build with newer versions of cbindgen. r=kvark
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: Trivial build fix for downstreams with newer cbindgen versions
- User impact if declined: none
- Fix Landed on Version: n/a
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): simple patch to fix build. This code shouldn't even run on ESR anyways because WebGPU is not enabled there.
- String or UUID changes made by this patch: none
Comment 8•4 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #6)
Created attachment 9194817 [details]
Bug 1684180 - Fix ESR build with newer versions of cbindgen. r=kvarkThis works both with the old and new cbindgen-generated bindings.
This is effectively dead code on ESR though, because we haven't enabled
WebGPU there, but...
With this patch and cbindgen-0.15.0, 78.6.0 builds fine under NetBSD/amd64.
Comment 9•4 years ago
|
||
tb & fx esr 78.6.0 build on OpenBSD/amd64 with the patch and cbindgen 0.16.0.
Comment 10•4 years ago
|
||
Comment on attachment 9194817 [details]
Bug 1684180 - Fix ESR build with newer versions of cbindgen. r=kvark
Approved for 78.6.1 & 78.7esr.
Comment 12•4 years ago
|
||
| uplift | ||
https://hg.mozilla.org/releases/mozilla-esr78/rev/a1f99bfc3ee5 (78.7esr)
https://hg.mozilla.org/releases/mozilla-esr78/rev/140e5caa92c3 (78.6.1esr)
Description
•