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

crossbuild arm package #544

Merged
merged 2 commits into from
Nov 17, 2022
Merged

crossbuild arm package #544

merged 2 commits into from
Nov 17, 2022

Conversation

qrkourier
Copy link
Member

resolves #449

@qrkourier qrkourier self-assigned this Nov 9, 2022
@qrkourier qrkourier force-pushed the issue-449-crossbuild-arm-package branch from a8f3eac to b8719d8 Compare November 10, 2022 14:18

LABEL org.opencontainers.image.authors="netfoundry.io"
# upstream of Ubuntu Jammy 22.04 LTS
FROM debian:bookworm
Copy link
Member Author

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
Copy link
Member Author

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.

Copy link
Member

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?

Copy link
Member Author

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.

@qrkourier qrkourier marked this pull request as ready for review November 10, 2022 14:28
@qrkourier qrkourier requested a review from a team as a code owner November 10, 2022 14:28
@@ -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
Copy link
Member

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?

Copy link
Member Author

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.

@qrkourier qrkourier merged commit 4be461f into main Nov 17, 2022
@qrkourier qrkourier deleted the issue-449-crossbuild-arm-package branch November 17, 2022 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants