Skip to content

32 bit build broken? #63

@danielocfb

Description

@danielocfb

In response to libbpf/libbpf-rs#500 I created danielocfb@5e93a20 to make sure that libbpf-sys is also tested in a 32 bit setting. That seems to blow up pretty prominently immediately: https://github.com/danielocfb/libbpf-sys/actions/runs/5479871661/jobs/9982296567

--> src/bindings.rs:512:49
    |
512 | pub const PERF_TXN_ABORT_MASK: _bindgen_ty_52 = 18446744069414584320;
    |                                                 ^^^^^^^^^^^^^^^^^^^^
    |
    = note: the literal `18446744069414584320` does not fit into the type `u32` whose range is `0..=4294967295`
    = note: `#[deny(overflowing_literals)]` on by default

error: literal out of range for `u32`
    --> src/bindings.rs:1478:53
     |
1478 | pub const PERF_CONTEXT_HV: perf_callchain_context = 18446744073709551584;
     |                                                     ^^^^^^^^^^^^^^^^^^^^
     |
     = note: the literal `18446744073709551584` does not fit into the type `u32` whose range is `0..=4294967295`

error: literal out of range for `u32`
    --> src/bindings.rs:1479:57
     |
1479 | pub const PERF_CONTEXT_KERNEL: perf_callchain_context = 18446744073709551488;
     |                                                         ^^^^^^^^^^^^^^^^^^^^
     |
     = note: the literal `18446744073709551488` does not fit into the type `u32` whose range is `0..=4294967295`

error: literal out of range for `u32`
    --> src/bindings.rs:1480:55
     |
1480 | pub const PERF_CONTEXT_USER: perf_callchain_context = 18446744073709551104;
     |                                                       ^^^^^^^^^^^^^^^^^^^^
     |
     = note: the literal `18446744073709551104` does not fit into the type `u32` whose range is `0..=4294967295`

error: literal out of range for `u32`
    --> src/bindings.rs:1481:56
     |
1481 | pub const PERF_CONTEXT_GUEST: perf_callchain_context = 18446744073709549568;
     |                                                        ^^^^^^^^^^^^^^^^^^^^
     |
     = note: the literal `18446744073709549568` does not fit into the type `u32` whose range is `0..=4294967295`

error: literal out of range for `u32`
    --> src/bindings.rs:1482:63
     |
1482 | pub const PERF_CONTEXT_GUEST_KERNEL: perf_callchain_context = 18446744073709549440;
     |                                                               ^^^^^^^^^^^^^^^^^^^^
     |
     = note: the literal `18446744073709549440` does not fit into the type `u32` whose range is `0..=4294967295`

error: literal out of range for `u32`
    --> src/bindings.rs:1483:61
     |
1483 | pub const PERF_CONTEXT_GUEST_USER: perf_callchain_context = 18446744073709549056;
     |                                                             ^^^^^^^^^^^^^^^^^^^^
     |
     = note: the literal `18446744073709549056` does not fit into the type `u32` whose range is `0..=4294967295`

error: literal out of range for `u32`
    --> src/bindings.rs:1484:54
     |
1484 | pub const PERF_CONTEXT_MAX: perf_callchain_context = 18446744073709547521;
     |                                                      ^^^^^^^^^^^^^^^^^^^^
     |
     = note: the literal `18446744073709547521` does not fit into the type `u32` whose range is `0..=4294967295`

error: literal out of range for `u32`
    --> src/bindings.rs:2908:47
     |
2908 | pub const BPF_F_CTXLEN_MASK: _bindgen_ty_65 = 4503[59](https://github.com/danielocfb/libbpf-sys/actions/runs/5479871661/jobs/9982296567#step:8:60)5332403200;
     |                                               ^^^^^^^^^^^^^^^^
     |
     = note: the literal `4503595332403200` does not fit into the type `u32` whose range is `0..=4294967295`

error: could not compile `libbpf-sys` (lib) due to 9 previous errors

Any idea how we can adjust the type of those constants, by any chance? I haven't found any knobs.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingduplicateThis issue or pull request already exists

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