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

new: glibc 2.38 builder #316

Merged
merged 2 commits into from
Feb 28, 2024
Merged

new: glibc 2.38 builder #316

merged 2 commits into from
Feb 28, 2024

Conversation

FedeDP
Copy link
Contributor

@FedeDP FedeDP commented Jan 5, 2024

What type of PR is this?

/kind feature

Any specific area of the project related to this PR?

/area build
/area pkg

What this PR does / why we need it:

This PR introduces a new fedora based any builder to be able to build recent kernels (6.6+) that require glibc 2.38.

Which issue(s) this PR fixes:

Fixes #303

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

new: added a new glibc 2.38 gcc 13 based builder image.

FedeDP added 2 commits January 5, 2024 14:46
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Moreover, switch to setup-go@v4 that supports caching by default.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
@poiana poiana added kind/feature New feature or request dco-signoff: yes area/build Further information is requested area/pkg labels Jan 5, 2024
@poiana poiana requested review from EXONER4TED and leodido January 5, 2024 13:48
@FedeDP
Copy link
Contributor Author

FedeDP commented Jan 5, 2024

I was able to successfully build a kernel module for 6.6.5 arch kernel (that #303 complained we weren't able to build):

level=DEBUG msg="+ modinfo /tmp/driver/module.ko"
level=DEBUG msg="filename:       /tmp/driver/module.ko"
level=DEBUG msg="schema_version: 2.14.0"
level=DEBUG msg="api_version:    8.0.1"
level=DEBUG msg="build_commit:   master"
level=DEBUG msg="version:        master"
level=DEBUG msg="author:         the Falco authors"
level=DEBUG msg="license:        Dual MIT/GPL"
level=DEBUG msg="srcversion:     B7CD20CDABA5D0C1C1FB08F"
level=DEBUG msg="depends:        "
level=DEBUG msg="retpoline:      Y"
level=DEBUG msg="name:           falco"
level=DEBUG msg="vermagic:       6.6.5-arch1-1 SMP preempt mod_unload "
level=DEBUG msg="parm:           g_buffer_bytes_dim:This is the dimension of a single per-CPU buffer in bytes. Please note: this buffer will be mapped twice in the process virtual memory, so pay attention to its size."
level=DEBUG msg="parm:           max_consumers:Maximum number of consumers that can simultaneously open the devices (uint)"
level=DEBUG msg="parm:           verbose:Enable verbose logging (bool)"
level=DEBUG msg="log pipe close"
level=INFO msg="kernel module available" path=/tmp/mod.ko

I built the new builder image for x86_64 and pushed it to my own dockerhub repository; then:

./_output/bin/driverkit docker --target arch --kernelrelease 6.6.5.arch1-1 --output-module /tmp/mod.ko --loglevel debug --builderimage auto:latest --builderrepo docker.io/fededp/driverkit-builder

@@ -135,6 +135,11 @@ type GCCVersionRequestor interface {

func defaultGCC(kr kernelrelease.KernelRelease) semver.Version {
switch kr.Major {
case 6:
if kr.Minor >= 6 {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

6.6+ will use gcc 13.

@@ -150,7 +155,7 @@ func defaultGCC(kr kernelrelease.KernelRelease) semver.Version {
case 2:
return semver.Version{Major: 4, Minor: 8}
default:
return semver.Version{Major: 12}
return semver.Version{Major: 13}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Linux 7.x will default at using gcc 13 :D

@FedeDP
Copy link
Contributor Author

FedeDP commented Jan 5, 2024

/cc @EXONER4TED @dwindsor

@poiana poiana requested a review from dwindsor January 5, 2024 15:40
@FedeDP
Copy link
Contributor Author

FedeDP commented Jan 5, 2024

/hold for eventual discussion.

Copy link
Contributor

@EXONER4TED EXONER4TED left a comment

Choose a reason for hiding this comment

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

This is something we actually have been needing downstream as well. All for this 🙂

/approve

@poiana
Copy link

poiana commented Feb 28, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: EXONER4TED, FedeDP

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@FedeDP
Copy link
Contributor Author

FedeDP commented Feb 28, 2024

/unhold

@poiana poiana merged commit 522466a into master Feb 28, 2024
5 checks passed
@poiana poiana deleted the new/glibc238_builder branch February 28, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failure in building kmod against recent archlinux kernels
3 participants