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

add BPF GCC support for BPF CI #7737

Closed
wants to merge 2 commits into from

Conversation

cupermir
Copy link
Contributor

This pull requests enables BPF GCC compilation testing for the CI.

Required changes in libbpf/ci where pull requested in libbpf/ci#144

Copy link
Contributor

@chantra chantra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, LGTM. Did not do a throughout review, but just dropping a few comment regarding the failed set_matrix step.

Also, please do this PR against https://github.com/kernel-patches/vmtest/ instead. kernel-patches/bpf pulls the kernel from upstream and then copies kernel-patches/vmtest into it.

@@ -64,6 +71,7 @@ def to_dict(self) -> Dict[str, Union[str, int]]:
class BuildConfig:
arch: Arch
toolchain: Toolchain
bpf_toolchain: Toolchain = Toolchain(compiler=Compiler.LLVM, version=DEFAULT_LLVM_VERSION)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is what seems to cause the set_matrix step failure.

The error is:

Traceback (most recent call last):
  File "/tmp/work/bpf/bpf/.github/scripts/matrix.py", line 70, in <module>
    @dataclasses.dataclass
     ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/dataclasses.py", line 1268, in dataclass
    return wrap(cls)
           ^^^^^^^^^
  File "/usr/lib/python3.12/dataclasses.py", line 12[5](https://github.com/kernel-patches/bpf/actions/runs/10881506538/job/30190585441?pr=7737#step:3:6)8, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/dataclasses.py", line 994, in _process_class
    cls_fields.append(_get_field(cls, name, type, kw_only))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/dataclasses.py", line [8](https://github.com/kernel-patches/bpf/actions/runs/10881506538/job/30190585441?pr=7737#step:3:9)52, in _get_field
    raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class '__main__.Toolchain'> for field bpf_toolchain is not allowed: use default_factory

From https://stackoverflow.com/a/75677129

it seems https://gist.github.com/chantra/b4ac937f0f0e909d238bb03f7aacae49 would work.

Signed-off-by: Cupertino Miranda <cupertino.miranda@oracle.com>
@kernel-patches-daemon-bpf
Copy link

Automatically cleaning up stale PR; feel free to reopen if needed

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