Skip to content

Build failures on i386 / 32bit #131

@bzed

Description

@bzed

Hi,

building on i386 (and most likely also on other 32bit architectures - see https://wiki.debian.org/ArchitectureSpecificsMemo) fails with

In file included from tcp_buffer_tuner.c:8:
1424
./tcp_buffer_tuner.skel.nobtf.h:35889:17: error: static assertion failed due to requirement 'sizeof (s->bss->bpftune_init_net) == 8': unexpected size of 'bpftune_init_net'
1425
 35889 |         _Static_assert(sizeof(s->bss->bpftune_init_net) == 8, "unexpected size of 'bpftune_init_net'");
1426
       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1427
./tcp_buffer_tuner.skel.nobtf.h:35889:50: note: expression evaluates to '4 == 8'
1428
 35889 |         _Static_assert(sizeof(s->bss->bpftune_init_net) == 8, "unexpected size of 'bpftune_init_net'");
1429
       |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
1430
./tcp_buffer_tuner.skel.nobtf.h:35895:17: error: static assertion failed due to requirement 'sizeof (s->bss->nr_free_buffer_pages) == 8': unexpected size of 'nr_free_buffer_pages'
1431
 35895 |         _Static_assert(sizeof(s->bss->nr_free_buffer_pages) == 8, "unexpected size of 'nr_free_buffer_pages'");
1432
       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1433
./tcp_buffer_tuner.skel.nobtf.h:35895:54: note: expression evaluates to '4 == 8'
1434
 35895 |         _Static_assert(sizeof(s->bss->nr_free_buffer_pages) == 8, "unexpected size of 'nr_free_buffer_pages'");
1435
       |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
1436
6 errors generated.

https://salsa.debian.org/debian/bpftune/-/jobs/6742374

A quick look at the code shows more usage of long/unsigned long, so I think this needs a more general fix, like using uint*_t or similar.

Or do you not want to support 32bit architectures?

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