-
-
Notifications
You must be signed in to change notification settings - Fork 504
Open
Description
OS: Rocky Linux 9
ecc version: 0.3.4
> $ ./ecc minimal.bpf.c
INFO [ecc_rs::bpf_compiler] Compiling bpf object...
INFO [ecc_rs::bpf_compiler] $ "clang" CommandArgs { inner: ["-g", "-O2", "-target", "bpf", "-Wno-unknown-attributes", "-D__TARGET_ARCH_x86", "-idirafter", "/usr/bin/../lib/clang/18/include", "-idirafter", "/usr/local/include", "-idirafter", "/usr/include", "-I/tmp/.tmpDVfSiQ/include", "-I/tmp/.tmpDVfSiQ/include/vmlinux/x86", "-I/home/rick/eunomia", "-c", "minimal.bpf.c", "-o", "minimal.bpf.o"] }
INFO [ecc_rs::bpf_compiler]
ERROR [ecc_rs::bpf_compiler] In file included from minimal.bpf.c:3:
In file included from /tmp/.tmpDVfSiQ/include/bpf/bpf_helpers.h:11:
/tmp/.tmpDVfSiQ/include/bpf/bpf_helper_defs.h:78:90: error: unknown type name '__u64'
78 | static long (* const bpf_map_update_elem)(void *map, const void *key, const void *value, __u64 flags) = (void *) 2;
| ^
/tmp/.tmpDVfSiQ/include/bpf/bpf_helper_defs.h:102:49: error: unknown type name '__u32'
102 | static long (* const bpf_probe_read)(void *dst, __u32 size, const void *unsafe_ptr) = (void *) 4;
| ^
ecc compile successfully after change include
as below:
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
#define BPF_NO_GLOBAL_DATA
#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
Metadata
Metadata
Assignees
Labels
No labels