-
Notifications
You must be signed in to change notification settings - Fork 17
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
crossbuild arm package #544
Conversation
for cross-compiling to arm, arm64 DEB
a8f3eac
to
b8719d8
Compare
|
||
LABEL org.opencontainers.image.authors="netfoundry.io" | ||
# upstream of Ubuntu Jammy 22.04 LTS | ||
FROM debian:bookworm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debian Bookworm is the contemporary of Ubuntu Jammy, but there's always the possibility that Bookworm will roll forward to a new GLIBC that is unavailable in Jammy. We have the option now, or later, to switch Jammy's build to the predecessor, Debian Bullseye, which will always have a compatible GLIBC, but may introduce other OS differences.
@@ -1,10 +1,11 @@ | |||
ARG CMAKE_VERSION="3.22.3" | |||
|
|||
FROM ubuntu:focal | |||
# upstream of Ubuntu Focal 20.04 LTS | |||
FROM debian:bullseye |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debian Bullseye is the contemporary of Ubuntu Focal, but there's always the possibility that Bullseye will roll forward to a new GLIBC that is unavailable in Focal. We have the option now, or later, to switch Focal's build to the predecessor, Debian Buster, which will always have a compatible GLIBC, but may introduce other OS differences.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the advantage of change the base image? it sounds like ubuntu is the safer bet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It allows us to use Debian MultiArch which is not available in Ubuntu (binary deps not available for foreign archs). This leads to a simpler cross-compile environment setup that's easy to express in a Dockerfile while remaining compatible with Ubuntu.
@@ -28,9 +34,16 @@ RUN apt-get -y update \ | |||
libssl-dev \ | |||
&& rm -rf /var/lib/apt/lists/* | |||
|
|||
RUN curl -L https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}-linux-x86_64.sh -o cmake.sh \ | |||
RUN dpkg --add-architecture arm64 && dpkg --add-architecture armhf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this why you switched to Debian?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. You can add foreign arch in Ubuntu, but apt update
breaks immediately, and adding a new repo sources list for Ubuntu ports doesn't unbreak apt update
.
…wo: cross-build and native
resolves #449