Skip to content

INSTALL.md: add clang for install build dependence#5415

Open
Bojun-Seo wants to merge 1 commit intoiovisor:masterfrom
Bojun-Seo:clang
Open

INSTALL.md: add clang for install build dependence#5415
Bojun-Seo wants to merge 1 commit intoiovisor:masterfrom
Bojun-Seo:clang

Conversation

@Bojun-Seo
Copy link
Contributor

clang is not default package of Ubuntu 24.04. So, add clang for install build dependence on INSTALL.md file.

You will get following error during compiling libbpf-tools on Ubuntu 24.04 without this patch.

  MKDIR    .output                                                                          
  BPF      memleak.bpf.o                                                                                                                                                             
/bin/sh: 1: clang: not found
make: *** [Makefile:209: /home/bojun/bcc/libbpf-tools/.output/memleak.bpf.o] Error 127

I guess other Ubuntu versions also need clang for install dependence. But I didn't test it on other versions.

@Bojun-Seo
Copy link
Contributor Author

I will test this again and change the status to open.

@Bojun-Seo
Copy link
Contributor Author

Bojun-Seo commented Nov 20, 2025

I've tested again on freshly installed Ubuntu 24.04 and clang and llvm packages are necessary to build tools in libbpf-tools

@Bojun-Seo Bojun-Seo marked this pull request as ready for review November 20, 2025 08:27
@ekyooo
Copy link
Collaborator

ekyooo commented Mar 15, 2026

Thank you. The change is only required for building libbpf-tools, not the BCC Python tools. Adding a note (or a dedicated subsection) to clarify this would improve the documentation.

In the longer term, if the BCC Python tools and libbpf-tools diverge significantly in build requirements, splitting them into separate "Install build dependencies" sections would make the document clearer and more user-friendly. A contribution for that would be very welcome.

`clang` and `llvm` are not installed by default on Ubuntu. Add
installation instructions to `INSTALL.md` for these packages so that
`libbpf-tools` can be built successfully.

Tested on Ubuntu 24.04.

Without them, you will see errors like the following during the
build:

  git clone https://github.com/iovisor/bcc.git
  mkdir bcc/build; cd bcc/build
  cmake ..
  cd ../libbpf-tools
  make profile
  ... snip ...
    BPF      profile.bpf.o
  /bin/sh: 1: clang: not found

  or

    BPF      profile.bpf.o
  /bin/sh: 3: llvm-strip: not found
@Bojun-Seo
Copy link
Contributor Author

Thank you. The change is only required for building libbpf-tools, not the BCC Python tools. Adding a note (or a dedicated subsection) to clarify this would improve the documentation.

Thanks for the feedback. I've updated it by adding a dedicated subsection.

In the longer term, if the BCC Python tools and libbpf-tools diverge significantly in build requirements, splitting them into separate "Install build dependencies" sections would make the document clearer and more user-friendly. A contribution for that would be very welcome.

I agree with you.

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

Successfully merging this pull request may close these issues.

2 participants