Giter Club home page Giter Club logo

Comments (10)

withlin avatar withlin commented on August 15, 2024 2

+1 5.11.0-49-generic

from bpftool.

chenhengqi avatar chenhengqi commented on August 15, 2024 2
diff --git a/src/Makefile b/src/Makefile
index bffd4e7..5fc927e 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -125,7 +125,7 @@ all: $(OUTPUT)bpftool
 
 BFD_SRCS = jit_disasm.c
 
-SRCS = $(filter-out $(BFD_SRCS),$(wildcard *.c))
+SRCS = $(filter-out $(BFD_SRCS) pids.c,$(wildcard *.c))
 
 ifeq ($(feature-libbfd),1)
   LIBS += -lbfd -ldl -lopcodes

from bpftool.

qmonnet avatar qmonnet commented on August 15, 2024 2

I haven't managed to find a fix myself (I was missing the ...___local change), but I believe that the patch currently discussed on the mailing list should address the issue.

https://lore.kernel.org/bpf/[email protected]/T/#u

from bpftool.

qmonnet avatar qmonnet commented on August 15, 2024 1

Apologies, this had taken more time than I expected - or than it should have. At last, we have the fix merged in bpf-next. I'll pull it in this repo at the next sync.

from bpftool.

qmonnet avatar qmonnet commented on August 15, 2024

Hi, thanks for the report!
What's your kernel version, please? I guess it is lower than 5.15? It seems that commit cbdaf71f7e65 introduced requirements for recent structures to be present in kernel's BTF when compiling :/.

from bpftool.

chenhengqi avatar chenhengqi commented on August 15, 2024

Yes, I tried it on 5.4 and 5.11.

from bpftool.

qmonnet avatar qmonnet commented on August 15, 2024

Thanks for the reports!

Since d97300d, kernel 5.15 is a requirement for building bpftool with all its features. The definition may also be missing if the kernel of the host has not been compiled with CONFIG_PERF_EVENTS.

Workarounds:

  • Work with an older version (the latest release should not include this commit and should compile fine).
  • Disable the “skeletons” feature (feature-clang-bpf-co-re), but there's currently no clean way to do this (I'm planning to add Makefile options for that when I have some cycles) so you'll have to edit the Makefile manually.

I'll try to submit a fix upstream.

from bpftool.

liusy58 avatar liusy58 commented on August 15, 2024
diff --git a/src/Makefile b/src/Makefile
index bffd4e7..5fc927e 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -125,7 +125,7 @@ all: $(OUTPUT)bpftool
 
 BFD_SRCS = jit_disasm.c
 
-SRCS = $(filter-out $(BFD_SRCS),$(wildcard *.c))
+SRCS = $(filter-out $(BFD_SRCS) pids.c,$(wildcard *.c))
 
 ifeq ($(feature-libbfd),1)
   LIBS += -lbfd -ldl -lopcodes

This can compile successfully but everytime I execute sudo bpftool prog show, segmentation fault pops up.

from bpftool.

adamzhoul avatar adamzhoul commented on August 15, 2024

same issue. +1

from bpftool.

qmonnet avatar qmonnet commented on August 15, 2024

I re-submitted the patches today (at https://lore.kernel.org/bpf/[email protected]/t/#u).

[EDIT: v2 at https://lore.kernel.org/bpf/[email protected]/t/#u]

from bpftool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.