Skip to content

Add alpine to libbpf availability #28262

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

patricoferris
Copy link
Contributor

A bit like #27903 but for alpine.

@mseri
Copy link
Member

mseri commented Aug 1, 2025

The whitespace change looks inconsistent with the rest of the file imo.

Unfortunately this is still not working:

libbpf.0.1.0 is not installed. Install it? [y/n] y
  * Missing dependency:
    - libbpf -> conf-clang
    depends on the unavailable system package 'clang'. Use `--no-depexts' to attempt installation anyway, or it is possible that a depext package name in the opam file is incorrect.

@patricoferris
Copy link
Contributor Author

The whitespace change looks inconsistent with the rest of the file imo.

Indeed, the files were all over the place with tabs and spaces. I have updated them to be consistent. I had a look for some opam files formatting tool and couldn't easily find one, did I miss it? It would be nice to not be blocked on that kind of thing I think.

I also added alpine and nixos availability to bpftool too. Waiting to see what CI makes of it.

Thank you for the reviews :)

mseri added a commit to mseri/opam-repository that referenced this pull request Aug 4, 2025
Seen on ocaml#28262

Signed-off-by: Marcello Seri <[email protected]>
@mseri
Copy link
Member

mseri commented Aug 4, 2025

We should re-run the tests once #28290 is merged

mseri added a commit that referenced this pull request Aug 5, 2025
* conf-clang: update alpine depext

Seen on #28262

Signed-off-by: Marcello Seri <[email protected]>

* Update packages/conf-clang/conf-clang.2/opam

* Fix os-version

* Fix syntax

* Update packages/conf-clang/conf-clang.2/opam

---------

Signed-off-by: Marcello Seri <[email protected]>
@mseri
Copy link
Member

mseri commented Aug 5, 2025

Now that alpine works, this is still failing with

#=== ERROR while compiling libbpf.0.1.0 =======================================#
# context              2.3.0 | linux/x86_64 | ocaml-base-compiler.4.14.2 | pinned(https://github.com/koonwen/ocaml-libbpf/releases/download/v0.1.0/libbpf-0.1.0.tbz)
# path                 ~/.opam/4.14/.opam-switch/build/libbpf.0.1.0
# command              ~/.opam/opam-init/hooks/sandbox.sh build dune build -p libbpf -j 255 @install
# exit-code            1
# env-file             ~/.opam/log/libbpf-7-e0d484.env
# output-file          ~/.opam/log/libbpf-7-e0d484.out
### output ###
# File "src/bindings/stubgen/dune", lines 13-18, characters 0-197:
# 13 | (rule
# 14 |  (targets gen_type_bindings_from_c.exe)
# 15 |  (deps gen_type_bindings.c)
# 16 |  (action
# 17 |   (bash
# 18 |    "%{cc} %{deps} -I `dirname %{lib:ctypes:ctypes_cstubs_internals.h}` -I %{ocaml_where} -o %{targets}")))
# (cd _build/default/src/bindings/stubgen && /bin/bash -e -u -o pipefail -c 'gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -D_FILE_OFFSET_BITS=64 -Wall -fdiagnostics-color=always gen_type_bindings.c -I `dirname /home/opam/.opam/4.14/lib/ctypes/ctypes_cstubs_internals.h` -I /home/opam/.opam/4.14/lib/ocaml -o gen_type_bindings_from_c.exe')
# gen_type_bindings.c:1:10: fatal error: bpf/libbpf.h: No such file or directory
#     1 | #include <bpf/libbpf.h>
#       |          ^~~~~~~~~~~~~~
# compilation terminated.

@mseri
Copy link
Member

mseri commented Aug 5, 2025

I think the package may need some further updates to work with alpine

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

Successfully merging this pull request may close these issues.

4 participants