Skip to content

Broken CI with bindgen and anonymous enum in mbed #334

@geonnave

Description

@geonnave

This is blocking new PRs, including #331 and #333 .

See for example https://github.com/openwsn-berkeley/lakers/actions/runs/12909246534/job/35996534344?pr=331#logs

Issue is related to bindgen which is used by lakers-crypto-psa:

  thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.59.2/src/ir/context.rs:878:9:
  "enum_(unnamed_at_/home/runner/work/lakers/lakers/target/debug/build/psa-crypto-sys-748506a5ebbac601/out/include/mbedtls/cipher_h_205_1)" is not a valid Ident
  stack backtrace:
     0: rust_begin_unwind
               at /rustc/c1b336cb6b491b3be02cd821774f03af4992f413/library/std/src/panicking.rs:661:5
     1: core::panicking::panic_fmt
               at /rustc/c1b336cb6b491b3be02cd821774f03af4992f413/library/core/src/panicking.rs:74:14
     2: proc_macro2::fallback::validate_ident
     3: proc_macro2::fallback::Ident::new_checked
     4: proc_macro2::imp::Ident::new_checked
     5: proc_macro2::Ident::new
     6: bindgen::ir::context::BindgenContext::rust_ident_raw
     7: bindgen::ir::context::BindgenContext::rust_ident
     8: <bindgen::ir::enum_ty::Enum as bindgen::codegen::CodeGenerator>::codegen
     9: <bindgen::ir::ty::Type as bindgen::codegen::CodeGenerator>::codegen
    10: <bindgen::ir::item::Item as bindgen::codegen::CodeGenerator>::codegen
    11: <bindgen::ir::module::Module as bindgen::codegen::CodeGenerator>::codegen::{{closure}}
    12: <bindgen::ir::module::Module as bindgen::codegen::CodeGenerator>::codegen
    13: <bindgen::ir::item::Item as bindgen::codegen::CodeGenerator>::codegen
    14: bindgen::codegen::codegen::{{closure}}
    15: bindgen::ir::context::BindgenContext::gen
    16: bindgen::codegen::codegen
    17: bindgen::Bindings::generate
    18: bindgen::Builder::generate
    19: build_script_build::common::generate_mbed_crypto_bindings
    20: build_script_build::operations::script_operations
    21: build_script_build::main
    22: core::ops::function::FnOnce::call_once
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions