Skip to content

setup-build-env: Fix cross compilation toolchain#179

Merged
theihor merged 2 commits intolibbpf:mainfrom
theihor:cross-compilers
Apr 17, 2025
Merged

setup-build-env: Fix cross compilation toolchain#179
theihor merged 2 commits intolibbpf:mainfrom
theihor:cross-compilers

Conversation

@theihor
Copy link
Contributor

@theihor theihor commented Apr 17, 2025

No description provided.

theihor added a commit to kernel-patches/vmtest that referenced this pull request Apr 17, 2025
Allow action caller to skip building pahole by passing 'none' as the
target revision.

See: https://lore.kernel.org/dwarves/8f5711430e4f9bb02fd06d3a5b00d46d8643fea1@linux.dev/
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
@theihor theihor force-pushed the cross-compilers branch 4 times, most recently from d163719 to bc6d680 Compare April 17, 2025 19:44
theihor added a commit to kernel-patches/vmtest that referenced this pull request Apr 17, 2025
Cross compilation is broken due to apt packages conflicts. Switch to
native builds for now.

See: libbpf/ci#179
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
theihor added a commit to kernel-patches/vmtest that referenced this pull request Apr 17, 2025
Cross compilation is broken due to apt packages conflicts. Switch to
native builds for now.

See: libbpf/ci#179
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
BPF CI got broken due to apt errors when installing cross compilers:
* https://github.com/kernel-patches/bpf/actions/runs/14519065074/job/40735249827

dpkg --add-architecture now breaks apt config. Looks like there were
changes in Ubuntu that require migrating to deb822 [1][2] format of
apt package lists.

In our case not only target arch repos need to be added, but also
default /etc/apt/sources.list.d/ubuntu.sources needs to be modified.
The host architecture has to be whitelisted, otherwise apt attempts
fetching target arch packages from archive and security, and they are
not there.

Another issue was with libelf-dev:s390x dependencies. Current
linux-libc-dev breaks linux-libc-dev:s390x, and unfortunately we need
both for a proper cross-compilation build. Using aptituide I found
that downgrading linux-libc-dev:amd64 resolves this conflict.

[1] actions/runner-images#10901
[2] https://discourse.ubuntu.com/t/ubuntu-24-04-lts-noble-numbat-release-notes/39890#p-99950-deb822-sources-management

Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
@theihor
Copy link
Contributor Author

theihor commented Apr 17, 2025

Apparently, downgrade of linux-libc-dev:amd64 helps: https://github.com/kernel-patches/vmtest/actions/runs/14520463948/job/40756555954

Merging this in.

@theihor theihor merged commit 3bcbbf8 into libbpf:main Apr 17, 2025
6 checks passed
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.

1 participant