Comments (6)
Just to confirm please check whether bpf/vmlinux.h is empty, if it is, please apt-get install bpftool , make clean, make
from dns.
@l1x please try pulling latest main, make should warn you about missing bpftool now. Please close the issue if this has been resolved for you
from dns.
> git pull origin main
From github.com:facebookincubator/dns
* branch main -> FETCH_HEAD
Already up to date.
l1x@deby ~/c/d/dnswatch (main)> make clean
rm -f snoop/out/dnswatch_bpf_probe_core.o
rm -f bpf/vmlinux.h
l1x@deby ~/c/d/dnswatch (main)> make
clang -g -O2 -Wall -fpie -fno-stack-protector -I /usr/include/bpf -target bpf -D__TARGET_ARCH_x86 -I bpf -c bpf/dnswatch.bpf.c -o snoop/out/dnswatch_bpf_probe_core.o
In file included from bpf/dnswatch.bpf.c:23:
In file included from /usr/include/bpf/bpf_helpers.h:11:
In file included from /usr/include/linux/types.h:9:
/usr/include/linux/posix_types.h:27:3: error: typedef redefinition with different types ('struct __kernel_fd_set' vs 'struct __kernel_fd_set')
} __kernel_fd_set;
^
bpf/vmlinux.h:104571:3: note: previous definition is here
} __kernel_fd_set;
^
In file included from bpf/dnswatch.bpf.c:23:
In file included from /usr/include/bpf/bpf_helpers.h:11:
In file included from /usr/include/linux/types.h:9:
In file included from /usr/include/linux/posix_types.h:36:
In file included from /usr/include/asm/posix_types.h:7:
In file included from /usr/include/asm/posix_types_64.h:18:
/usr/include/asm-generic/posix_types.h:68:22: error: typedef redefinition with different types ('unsigned int' vs '__kernel_ulong_t' (aka 'unsigned long'))
typedef unsigned int __kernel_size_t;
^
bpf/vmlinux.h:55:26: note: previous definition is here
typedef __kernel_ulong_t __kernel_size_t;
^
In file included from bpf/dnswatch.bpf.c:23:
In file included from /usr/include/bpf/bpf_helpers.h:11:
In file included from /usr/include/linux/types.h:9:
In file included from /usr/include/linux/posix_types.h:36:
In file included from /usr/include/asm/posix_types.h:7:
In file included from /usr/include/asm/posix_types_64.h:18:
/usr/include/asm-generic/posix_types.h:69:14: error: typedef redefinition with different types ('int' vs '__kernel_long_t' (aka 'long'))
typedef int __kernel_ssize_t;
^
bpf/vmlinux.h:57:25: note: previous definition is here
typedef __kernel_long_t __kernel_ssize_t;
^
In file included from bpf/dnswatch.bpf.c:23:
In file included from /usr/include/bpf/bpf_helpers.h:11:
In file included from /usr/include/linux/types.h:9:
In file included from /usr/include/linux/posix_types.h:36:
In file included from /usr/include/asm/posix_types.h:7:
In file included from /usr/include/asm/posix_types_64.h:18:
/usr/include/asm-generic/posix_types.h:70:14: error: typedef redefinition with different types ('int' vs '__kernel_long_t' (aka 'long'))
typedef int __kernel_ptrdiff_t;
^
bpf/vmlinux.h:69816:25: note: previous definition is here
typedef __kernel_long_t __kernel_ptrdiff_t;
^
In file included from bpf/dnswatch.bpf.c:23:
In file included from /usr/include/bpf/bpf_helpers.h:11:
In file included from /usr/include/linux/types.h:9:
In file included from /usr/include/linux/posix_types.h:36:
In file included from /usr/include/asm/posix_types.h:7:
In file included from /usr/include/asm/posix_types_64.h:18:
/usr/include/asm-generic/posix_types.h:81:3: error: typedef redefinition with different types ('struct __kernel_fsid_t' vs 'struct __kernel_fsid_t')
} __kernel_fsid_t;
^
bpf/vmlinux.h:19770:3: note: previous definition is here
} __kernel_fsid_t;
^
bpf/dnswatch.bpf.c:151:21: warning: unused variable 'inet' [-Wunused-variable]
struct inet_sock* inet = (struct inet_sock*)sk;
^
bpf/dnswatch.bpf.c:176:21: warning: unused variable 'inet' [-Wunused-variable]
struct inet_sock* inet = (struct inet_sock*)sk;
^
2 warnings and 5 errors generated.
make: *** [Makefile:9: snoop/out/dnswatch_bpf_probe_core.o] Error 1
from dns.
I am updating everything to latest greatest and try to figure out what is causing this.
from dns.
l1x@deby ~/c/d/dnswatch (main) [2]> apt list | egrep 'bpftool|headers' | egrep installed
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
bpftool/testing,now 7.1.0+6.1.27-1 amd64 [installed]
linux-headers-6.1.0-8-amd64/now 6.1.25-1 amd64 [installed,local]
linux-headers-6.1.0-8-common/now 6.1.25-1 all [installed,local]
l1x@deby ~/c/d/dnswatch (main)> make clean && make
rm -f snoop/out/dnswatch_bpf_probe_core.o
rm -f bpf/vmlinux.h
bpftool btf dump file /sys/kernel/btf/vmlinux format c > bpf/vmlinux.h
clang -g -O2 -Wall -fpie -fno-stack-protector -I /usr/include/bpf -target bpf -D__TARGET_ARCH_x86 -I bpf -c bpf/dnswatch.bpf.c -o snoop/out/dnswatch_bpf_probe_core.o
In file included from bpf/dnswatch.bpf.c:23:
In file included from /usr/include/bpf/bpf_helpers.h:11:
In file included from /usr/include/linux/types.h:9:
/usr/include/linux/posix_types.h:27:3: error: typedef redefinition with different types ('struct __kernel_fd_set' vs 'struct __kernel_fd_set')
} __kernel_fd_set;
^
bpf/vmlinux.h:104571:3: note: previous definition is here
} __kernel_fd_set;
^
In file included from bpf/dnswatch.bpf.c:23:
In file included from /usr/include/bpf/bpf_helpers.h:11:
In file included from /usr/include/linux/types.h:9:
In file included from /usr/include/linux/posix_types.h:36:
In file included from /usr/include/asm/posix_types.h:7:
In file included from /usr/include/asm/posix_types_64.h:18:
/usr/include/asm-generic/posix_types.h:68:22: error: typedef redefinition with different types ('unsigned int' vs '__kernel_ulong_t' (aka 'unsigned long'))
typedef unsigned int __kernel_size_t;
^
bpf/vmlinux.h:55:26: note: previous definition is here
typedef __kernel_ulong_t __kernel_size_t;
^
In file included from bpf/dnswatch.bpf.c:23:
In file included from /usr/include/bpf/bpf_helpers.h:11:
In file included from /usr/include/linux/types.h:9:
In file included from /usr/include/linux/posix_types.h:36:
In file included from /usr/include/asm/posix_types.h:7:
In file included from /usr/include/asm/posix_types_64.h:18:
/usr/include/asm-generic/posix_types.h:69:14: error: typedef redefinition with different types ('int' vs '__kernel_long_t' (aka 'long'))
typedef int __kernel_ssize_t;
^
bpf/vmlinux.h:57:25: note: previous definition is here
typedef __kernel_long_t __kernel_ssize_t;
^
In file included from bpf/dnswatch.bpf.c:23:
In file included from /usr/include/bpf/bpf_helpers.h:11:
In file included from /usr/include/linux/types.h:9:
In file included from /usr/include/linux/posix_types.h:36:
In file included from /usr/include/asm/posix_types.h:7:
In file included from /usr/include/asm/posix_types_64.h:18:
/usr/include/asm-generic/posix_types.h:70:14: error: typedef redefinition with different types ('int' vs '__kernel_long_t' (aka 'long'))
typedef int __kernel_ptrdiff_t;
^
bpf/vmlinux.h:69816:25: note: previous definition is here
typedef __kernel_long_t __kernel_ptrdiff_t;
^
In file included from bpf/dnswatch.bpf.c:23:
In file included from /usr/include/bpf/bpf_helpers.h:11:
In file included from /usr/include/linux/types.h:9:
In file included from /usr/include/linux/posix_types.h:36:
In file included from /usr/include/asm/posix_types.h:7:
In file included from /usr/include/asm/posix_types_64.h:18:
/usr/include/asm-generic/posix_types.h:81:3: error: typedef redefinition with different types ('struct __kernel_fsid_t' vs 'struct __kernel_fsid_t')
} __kernel_fsid_t;
^
bpf/vmlinux.h:19770:3: note: previous definition is here
} __kernel_fsid_t;
^
bpf/dnswatch.bpf.c:151:21: warning: unused variable 'inet' [-Wunused-variable]
struct inet_sock* inet = (struct inet_sock*)sk;
^
bpf/dnswatch.bpf.c:176:21: warning: unused variable 'inet' [-Wunused-variable]
struct inet_sock* inet = (struct inet_sock*)sk;
^
2 warnings and 5 errors generated.
make: *** [Makefile:9: snoop/out/dnswatch_bpf_probe_core.o] Error 1
from dns.
So far what I understand is that we have a duplicated definition:
/usr/include/linux/posix_types.h:27:3: error: typedef redefinition with different types ('struct __kernel_fd_set' vs 'struct __kernel_fd_set')
} __kernel_fd_set;
^
bpf/vmlinux.h:104571:3: note: previous definition is here
} __kernel_fd_set;
/usr/include/linux/posix_types.h and bpf/vmlinux.h both have the same __kernel_fd_set type.
from dns.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dns.