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

CI: mkosi: Fix the lack of gcc-13 for mainline builds #348

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

vt-alt
Copy link
Contributor

@vt-alt vt-alt commented Aug 5, 2024

Description

Installing dkms should be generic enough to bring everything needed to build kernel modules.

This is not 100% solution since exact kernel version may still differ:

$ make ...
The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-3ubuntu1) 13.3.0
You are using: gcc-13 (Ubuntu 13.3.0-4ubuntu1) 13.3.0

But this is best effort.

How Has This Been Tested?

Tested on my GA account.

Installing dkms should be generic enough to bring everything needed to
build kernel modules.

This is not 100% solution since exact kernel version may still differ:

  $ make ...
  The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.3.0-3ubuntu1) 13.3.0
  You are using:           gcc-13 (Ubuntu 13.3.0-4ubuntu1) 13.3.0

But this is best effort.

Fixes: lkrg-org#343
Signed-off-by: Vitaly Chikunov <[email protected]>
@solardiz
Copy link
Contributor

solardiz commented Aug 5, 2024

Thanks @vt-alt!

Now this is failing with:

 /root/src/src/modules/comm_channel/p_comm_channel.c:147:25: error: initialization of 'int (*)(const struct ctl_table *, int,  void *, size_t *, loff_t *)' {aka 'int (*)(const struct ctl_table *, int,  void *, long unsigned int *, long long int *)'} from incompatible pointer type 'int (*)(struct ctl_table *, int,  void *, size_t *, loff_t *)' {aka 'int (*)(struct ctl_table *, int,  void *, long unsigned int *, long long int *)'} [-Werror=incompatible-pointer-types]
  147 |       .proc_handler   = p_sysctl_kint_validate,
      |                         ^~~~~~~~~~~~~~~~~~~~~~

which I guess is related to the recent sysctl changes, so I'll need to look into that and fix it.

@solardiz
Copy link
Contributor

solardiz commented Aug 5, 2024

Installing dkms should be generic enough to bring everything needed to build kernel modules.

I wonder if we should also edit our documentation in some way. Right now, README says:

For example, under Debian and Ubuntu you can install all of these with:

        sudo apt-get install make gcc libelf-dev linux-headers-$(uname -r)

and under Red Hat'ish distributions (e.g. RHEL, CentOS, Fedora) with:

        sudo yum install make gcc elfutils-libelf-devel kernel-devel

@solardiz solardiz merged commit 2bf9cf0 into lkrg-org:main Aug 5, 2024
18 of 19 checks passed
@vt-alt
Copy link
Contributor Author

vt-alt commented Aug 5, 2024

The example isn't incorrect. Additionally, dkms brings some unnecessary packages and is not a requirement. It may be acceptable for CI but is excessive for "Build requirements". However, it may be noted to simplify the installation process, though it might render the "Installing using DKMS" section somewhat redundant.

@vt-alt vt-alt deleted the mainline branch August 6, 2024 14:30
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