Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make: *** [Makefile:73: inet-ebpf.c] Error 1 #8

Open
zhangbufan opened this issue Dec 8, 2023 · 0 comments
Open

make: *** [Makefile:73: inet-ebpf.c] Error 1 #8

zhangbufan opened this issue Dec 8, 2023 · 0 comments

Comments

@zhangbufan
Copy link

root@VM-0-4-ubuntu:/home/ubuntu/inet-tool-master# make
virtualenv venv --python=python3
created virtual environment CPython3.10.12.final.0-64 in 727ms
creator CPython3Posix(dest=/home/ubuntu/inet-tool-master/venv, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv)
added seed packages: pip==22.0.2, setuptools==59.6.0, wheel==0.37.1
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
./venv/bin/pip3 install pyelftools
Looking in indexes: http://mirrors.tencentyun.com/pypi/simple
Collecting pyelftools
Downloading http://mirrors.tencentyun.com/pypi/packages/33/f9/281a411a5281b674b10830a2f312c64464b49916d097b8919f009de579e0/pyelftools-0.30-py2.py3-none-any.whl (177 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 177.6/177.6 KB 765.7 kB/s eta 0:00:00
Installing collected packages: pyelftools
Successfully installed pyelftools-0.30
touch venv/.ok
clang -Wall -Wextra -O2 --target=bpf -c
-I/usr/include/x86_64-linux-gnu -I/usr/include -I/usr/include
ebpf/inet-kern.c
-o -
| ./venv/bin/python3 tbpf-decode-elf.py /dev/stdin
sk_lookup
> inet-ebpf.c
ebpf/inet-kern.c:5:10: fatal error: 'bpf/bpf_endian.h' file not found
#include <bpf/bpf_endian.h>
^~~~~~~~~~~~~~~~~~
1 error generated.
Traceback (most recent call last):
File "/home/ubuntu/inet-tool-master/tbpf-decode-elf.py", line 63, in
list_of_insns, list_of_relocs = process_file(f, section)
File "/home/ubuntu/inet-tool-master/tbpf-decode-elf.py", line 27, in process_file
elffile = ELFFile(f)
File "/home/ubuntu/inet-tool-master/venv/lib/python3.10/site-packages/elftools/elf/elffile.py", line 84, in init
self._identify_file()
File "/home/ubuntu/inet-tool-master/venv/lib/python3.10/site-packages/elftools/elf/elffile.py", line 570, in _identify_file
elf_assert(magic == b'\x7fELF', 'Magic number does not match')
File "/home/ubuntu/inet-tool-master/venv/lib/python3.10/site-packages/elftools/common/utils.py", line 80, in elf_assert
_assert_with_exception(cond, msg, ELFError)
File "/home/ubuntu/inet-tool-master/venv/lib/python3.10/site-packages/elftools/common/utils.py", line 143, in _assert_with_exception
raise exception_type(msg)
elftools.common.exceptions.ELFError: Magic number does not match
make: *** [Makefile:73: inet-ebpf.c] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant