Skip to content

libsel4-sys: bindgen not expanding functional macros #18

Description

@jlamb-at-polysync

When building for arm-sel4-helios, we get an error in the root-task, related to undefined/missing type seL4_WordBits.

cargo fel4 build --target arm-sel4-helios:

error[E0425]: cannot find value `seL4_WordBits` in this scope
  --> src/bin/root-task.rs:57:13
   |
57 |             seL4_WordBits.into(),
   |             ^^^^^^^^^^^^^ did you mean `seL4_GuardBits`?

This is because libsel4 is using a functional macro in (ARM configs, ie libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/constants.h):

#define seL4_WordBits (sizeof(seL4_Word) * 8)

We don't see this with the x86-64 target because it uses #define seL4_WordBits 64.

Seems to be related to this bindgen issue: rust-lang/rust-bindgen#753

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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