-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
xmake error: cannot build elfutils #14
Comments
stack trace
|
This |
I confirm, that commit solves the issue. I've tested it with curl -fsSL https://xmake.io/shget.text | bash -s dev
source $HOME/.xmake/profile Or otherwise, wait for Output: [vscode@codespaces-5a7c8f traffico]$ xmake f --generate-vmlinux=y
checking for platform ... linux
checking for architecture ... x86_64
updating repositories .. ok
note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
-> cmake 3.26.4 [from:llvm,cjson]
-> elfutils 0.183 [from:libbpf]
-> cjson 1.7.15
in l13o:
-> libbpf v0.8.0
-> bats v1.7.0
-> mini_httpd 1.30
please input: y (y/n/m)
y
=> download https://github.com/bats-core/bats-core/archive/refs/tags/v1.7.0.tar.gz .. ok
Installed Bats to /home/vscode/.xmake/packages/b/bats/v1.7.0/ccbbe97a924a460eb1cc8066487eb7d3/bin/bats
=> install bats v1.7.0 .. ok
=> download https://acme.com/software/mini_httpd/mini_httpd-1.30.tar.gz .. ok
=> downloading cmake, elfutils, installing mini_httpd .. (3/curl,make) mini_httpd/1.30 26Oct2018
=> install mini_httpd 1.30 .. ok
=> download https://sourceware.org/elfutils/ftp/0.183/elfutils-0.183.tar.bz2 .. ok
=> download https://cmake.org/files/v3.26/cmake-3.26.4-linux-x86_64.tar.gz .. ok
=> install cmake 3.26.4 .. ok
=> download https://github.com/DaveGamble/cJSON/archive/v1.7.15.zip .. ok
=> install cjson 1.7.15 .. ok
=> install elfutils 0.183 .. ok
=> download https://github.com/libbpf/libbpf/archive/v0.8.0.tar.gz .. ok
=> install libbpf v0.8.0 .. ok
generating /tmp/.xmake1000/230714/api.nop.h.in ... ok
generating /tmp/.xmake1000/230714/api.block_private_ipv4.h.in ... ok
generating /tmp/.xmake1000/230714/api.block_port.h.in ... ok
generating /tmp/.xmake1000/230714/api.block_ip.h.in ... ok
generating /workspaces/traffico/api/api.h.in ... ok
generating /tmp/.xmake1000/230714/api.block_private_ipv4.h.in ... cache
generating /tmp/.xmake1000/230714/api.block_port.h.in ... cache
generating /tmp/.xmake1000/230714/api.block_ip.h.in ... cache
generating /tmp/.xmake1000/230714/api.nop.h.in ... cache
generating /workspaces/traffico/api/api.h.in ... cache Building tests now: [vscode@codespaces-5a7c8f traffico]$ xmake -b test
generating /tmp/.xmake1000/230714/api.block_private_ipv4.h.in ... cache
generating /tmp/.xmake1000/230714/api.nop.h.in ... cache
generating /tmp/.xmake1000/230714/api.block_ip.h.in ... cache
generating /tmp/.xmake1000/230714/api.block_port.h.in ... cache
generating /tmp/.xmake1000/230714/api.nop.h.in ... cache
generating /tmp/.xmake1000/230714/api.block_ip.h.in ... cache
generating /tmp/.xmake1000/230714/api.block_private_ipv4.h.in ... cache
generating /tmp/.xmake1000/230714/api.block_port.h.in ... cache
generating /tmp/.xmake1000/230714/api.nop.h.in ... cache
generating /tmp/.xmake1000/230714/api.block_ip.h.in ... cache
generating /tmp/.xmake1000/230714/api.block_private_ipv4.h.in ... cache
generating /tmp/.xmake1000/230714/api.block_port.h.in ... cache
[ 10%]: providing.bpftool tools/bpftool
[ 20%]: generating.vmlinux vmlinux/vmlinux.h
[ 29%]: compiling.bpf bpf/block_ip.bpf.c
[ 29%]: compiling.bpf bpf/nop.bpf.c
[ 29%]: compiling.bpf bpf/block_port.bpf.c
[ 29%]: compiling.bpf bpf/block_private_ipv4.bpf.c
[ 29%]: compiling.bpf.o build/.gens/bpf/linux/x86_64/release/rules/bpf/block_port.bpf.o
[ 29%]: compiling.bpf.o build/.gens/bpf/linux/x86_64/release/rules/bpf/block_ip.bpf.o
[ 29%]: compiling.bpf.o build/.gens/bpf/linux/x86_64/release/rules/bpf/nop.bpf.o
[ 29%]: compiling.bpf.o build/.gens/bpf/linux/x86_64/release/rules/bpf/block_private_ipv4.bpf.o
[ 29%]: generating.skel.h build/.gens/bpf/linux/x86_64/release/rules/bpf/nop.skel.h
[ 29%]: generating.skel.h build/.gens/bpf/linux/x86_64/release/rules/bpf/block_port.skel.h
[ 29%]: generating.skel.h build/.gens/bpf/linux/x86_64/release/rules/bpf/block_ip.skel.h
[ 29%]: generating.skel.h build/.gens/bpf/linux/x86_64/release/rules/bpf/block_private_ipv4.skel.h
[ 70%]: cache compiling.release traffico.c
[ 70%]: cache compiling.release traffico-cni.c
[ 79%]: linking.release traffico
[ 79%]: linking.release traffico-cni
[100%]: build ok, spent 1.548s Then, running those tests: [vscode@codespaces-5a7c8f traffico]$ xmake run test
generating /tmp/.xmake1000/230714/api.block_port.h.in ... cache
generating /tmp/.xmake1000/230714/api.nop.h.in ... cache
generating /tmp/.xmake1000/230714/api.block_ip.h.in ... cache
generating /tmp/.xmake1000/230714/api.block_private_ipv4.h.in ... cache
generating /tmp/.xmake1000/230714/api.block_ip.h.in ... cache
generating /tmp/.xmake1000/230714/api.block_port.h.in ... cache
generating /tmp/.xmake1000/230714/api.block_private_ipv4.h.in ... cache
generating /tmp/.xmake1000/230714/api.nop.h.in ... cache
1..14
# setup:
# remove namespace ns9 (if it exists)
# create namespace ns9
# create veth link veth0 <-> peer0
# assign device peer0 to namespace ns9
# setup address of veth0
# setup address of peer0
# teardown:
# delete device veth0
# remove namespace ns9 (if it exists)
ok 1 cli: install nop program at egress
# setup:
# remove namespace ns9 (if it exists)
# create namespace ns9
# create veth link veth0 <-> peer0
# assign device peer0 to namespace ns9
# setup address of veth0
# setup address of peer0
# teardown:
# delete device veth0
# remove namespace ns9 (if it exists)
ok 2 cli: install nop program at ingress
# setup:
# remove namespace ns3 (if it exists)
# create namespace ns3
# create veth link veth0 <-> peer0
# assign device peer0 to namespace ns3
# setup address of veth0
# setup address of peer0
# traffico up at interface peer0
# traffico down
# tc qdisc still there
# BPF program still there
# teardown:
# delete device veth0
# remove namespace ns3 (if it exists)
ok 3 cli: --no-cleanup works
# setup:
# remove namespace ns4 (if it exists)
# create namespace ns4
# create veth link veth0 <-> peer0
# assign device peer0 to namespace ns4
# setup address of veth0
# setup address of peer0
# teardown:
# delete device veth0
# remove namespace ns4 (if it exists)
ok 4 cli: block_private_ipv4 blocks ICMP packets
ok 5 cli: help
ok 6 cli: usage
ok 7 cli: invalid option
ok 8 cli: unrecognized option
ok 9 cli: missing program
ok 10 cli: unavailable program
ok 11 cli: unavailable network interface
ok 12 cli: unavailable network interface (long)
ok 13 cli: unsupported attach point
# setup:
# remove namespace ns6 (if it exists)
# create namespace ns6
# create veth link veth0 <-> peer0
# assign device peer0 to namespace ns6
# setup address of veth0
# setup address of peer0
# serving /tmp at 8787
# can reach 10.22.1.1:8787
# can reach 10.22.1.1:8787 from the namespace
# installing block_private_ipv4 in the namespace
# attach ok
# qdisc ok
# cannot reach 10.22.1.1:8787 from the namespace
# teardown:
# delete device veth0
# remove namespace ns6 (if it exists)
# shutdown server
ok 14 cni: block_private_ipv4
[vscode@codespaces-5a7c8f traffico]$ echo $?
0 Verdict: it works! 🥳 |
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I get this error while compiling traffico with xmake.
I made a repro xmake.lua for testing
Same result, so it's not related to traffico per se.
The text was updated successfully, but these errors were encountered: