Skip to content

Cbindgen 0.29.4 causes Firefox not to build: use of undeclared identifier 'COUNT' #1165

@nteodosio

Description

@nteodosio

With Cbindgen 0.29.4, Firefox ESR, nightly, Thunderbird beta started failing to build on Ubuntu 24.04 on all architectures we build for (ARM and x64):

:: 11:10.89 In file included from /build/firefox/parts/firefox/build/accessible/atk/nsMaiInterfaceComponent.cpp:17:
:: 11:10.89 In file included from /build/firefox/parts/firefox/build/obj-x86_64-pc-linux-gnu/instrumented/dist/include/mozilla/dom/BrowserParent.h:25:
:: 11:10.89 In file included from /build/firefox/parts/firefox/build/obj-x86_64-pc-linux-gnu/instrumented/dist/include/mozilla/layout/RemoteLayerTreeOwner.h:17:
:: 11:10.89 In file included from /build/firefox/parts/firefox/build/obj-x86_64-pc-linux-gnu/instrumented/dist/include/nsDisplayList.h:23:
:: 11:10.89 In file included from /build/firefox/parts/firefox/build/obj-x86_64-pc-linux-gnu/instrumented/dist/include/gfxContext.h:11:
:: 11:10.89 In file included from /build/firefox/parts/firefox/build/obj-x86_64-pc-linux-gnu/instrumented/dist/include/gfxUtils.h:24:
:: 11:10.89 In file included from /build/firefox/parts/firefox/build/obj-x86_64-pc-linux-gnu/instrumented/dist/include/mozilla/webrender/WebRenderTypes.h:11:
:: 11:10.89 In file included from /build/firefox/parts/firefox/build/obj-x86_64-pc-linux-gnu/instrumented/dist/include/mozilla/webrender/webrender_ffi.h:103:
:: 11:10.89 /build/firefox/parts/firefox/build/obj-x86_64-pc-linux-gnu/instrumented/dist/include/mozilla/webrender/webrender_ffi_generated.h:6718:53: error: use of undeclared identifier 'COUNT'
:: 11:10.89 constexpr static const BudgetType BudgetType_VALUES[COUNT] = { BudgetType::SharedColor8Linear, BudgetType::SharedColor8Nearest, BudgetType::SharedColor8Glyphs, BudgetType::SharedAlpha8, BudgetType::SharedAlpha8Glyphs, BudgetType::SharedAlpha16, BudgetType::Standalone, };
:: 11:10.89                                                     ^

(Full log of 140.12.0esr)

With Cbindgen 0.29.2 the build is OK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions