# Install nodejs and npm
ONBUILD ADD generated/node-v10.23.1-linux-x64.tar.xz /usr/local/
ONBUILD RUN ln -s /usr/local/node-v10.23.1-linux-x64/bin/* /usr/local/bin/
-# On x86, we want some cross-compilation support for arm64
-# Add gcc-aarch64-linux-gnu to compile go binaries for arm64
-ONBUILD RUN /usr/bin/apt-get update && /usr/bin/apt-get install -q -y gcc-aarch64-linux-gnu
-# We also need libpam compiled for arm64
-ONBUILD RUN /usr/bin/dpkg --add-architecture arm64
-ONBUILD RUN /usr/bin/apt-get update && /usr/bin/apt-get install -o APT::Immediate-Configure=0 -q -y libpam0g-dev:arm64
+# No cross compilation support for debian10 because of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983477
FROM debian:buster as build_aarch64
# Install go
ONBUILD RUN /usr/bin/apt-get update && /usr/bin/apt-get install -q -y gcc-aarch64-linux-gnu
# We also need libpam compiled for arm64
ONBUILD RUN /usr/bin/dpkg --add-architecture arm64
-ONBUILD RUN /usr/bin/apt-get update && /usr/bin/apt-get install -o APT::Immediate-Configure=0 -q -y libpam0g-dev:arm64
+ONBUILD RUN /usr/bin/apt-get update && /usr/bin/apt-get install -o APT::Immediate-Configure=0 -q -y libpam0g-dev:arm64 libfuse-dev:arm64
FROM debian:bullseye as build_aarch64
# Install go
# Install nodejs and npm
ONBUILD ADD generated/node-v10.23.1-linux-x64.tar.xz /usr/local/
ONBUILD RUN ln -s /usr/local/node-v10.23.1-linux-x64/bin/* /usr/local/bin/
-# On x86, we want some cross-compilation support for arm64
-# Add gcc-aarch64-linux-gnu to compile go binaries for arm64
-ONBUILD RUN /usr/bin/apt-get update && /usr/bin/apt-get install -q -y gcc-aarch64-linux-gnu
-# We also need libpam compiled for arm64, and that requires some sources.list mangling
-ONBUILD RUN /bin/sed -i 's/deb http/deb [ arch=amd64 ] http/' /etc/apt/sources.list
-ONBUILD ADD ports.list /etc/apt/sources.list.d/
-ONBUILD RUN /usr/bin/dpkg --add-architecture arm64
-ONBUILD RUN /usr/bin/apt-get update && /usr/bin/apt-get install -o APT::Immediate-Configure=0 -q -y libpam0g-dev:arm64
+# No cross compilation support for ubuntu1804 because of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983477
FROM ubuntu:bionic as build_aarch64
# Install go
+++ /dev/null
-# Copyright (C) The Arvados Authors. All rights reserved.
-#
-# SPDX-License-Identifier: AGPL-3.0
-
-deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe multiverse
-deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe multiverse
-deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted universe multiverse
-deb [arch=arm64,armhf,ppc64el,s390x] http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
ONBUILD ADD ports.list /etc/apt/sources.list.d/
ONBUILD RUN /usr/bin/dpkg --add-architecture arm64
ONBUILD RUN /usr/bin/apt-get update && /usr/bin/apt-get install -o APT::Immediate-Configure=0 -q -y libpam0g-dev:arm64
+# Note that cross compilation support for ubuntu2004 is disabled in
+# run-library.sh because of
+# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983477. Hopefully
+# ubuntu2204 will have the fix introduced in debian11.
FROM ubuntu:focal as build_aarch64
# Install go
# No target architecture specified, default to native target. When on amd64 also crosscompile arm64
# but only when building deb packages (centos does not have support for crosscompiling userspace).
archs=($native_arch)
- if [[ "$native_arch" == "amd64" ]] && [[ "$package_format" == "deb" ]]; then
+ if [[ "$native_arch" == "amd64" ]] &&
+ [[ "$package_format" == "deb" ]] &&
+ [[ "$TARGET" != "debian10" ]] &&
+ [[ "$TARGET" != "ubuntu1804" ]] &&
+ [[ "$TARGET" != "ubuntu2004" ]]; then
+ # Due to bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983477 the libfuse-dev package for arm64 does
+ # not install properly side by side with the amd64 version before Debian 11.
archs+=("arm64")
fi
for ta in ${archs[@]}; do