17417: Because of debian bug #983477, libfuse-dev for arm64 does not
authorWard Vandewege <ward@curii.com>
Wed, 5 Jan 2022 16:20:23 +0000 (11:20 -0500)
committerWard Vandewege <ward@curii.com>
Wed, 5 Jan 2022 18:55:24 +0000 (13:55 -0500)
       install properly beside the amd64 version. This was fixed in
       debian11. Rather than making run-library.sh even more complicated
       by switching out libfuse-dev before every arm64 cross compiled
       build or by building a custom version of libfuse-dev, I disabled
       cross compilation the older Debian-based distributions we support.

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@curii.com>

build/package-build-dockerfiles/debian10/Dockerfile
build/package-build-dockerfiles/debian11/Dockerfile
build/package-build-dockerfiles/ubuntu1804/Dockerfile
build/package-build-dockerfiles/ubuntu1804/ports.list [deleted file]
build/package-build-dockerfiles/ubuntu2004/Dockerfile
build/run-library.sh

index d7c31411f037188fba21e855d07b8faa70940561..efff0acc930564fd2cd801eeaad362c8c0109f91 100644 (file)
@@ -12,12 +12,7 @@ ONBUILD RUN ln -s /usr/local/go/bin/go /usr/local/bin/
 # 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
index e819a28a79b406b0dc822cd3f7c1ba96ad790bc5..54a6a0ec1dd75887d92200c3fbce636a35a476b5 100644 (file)
@@ -17,7 +17,7 @@ ONBUILD RUN ln -s /usr/local/node-v10.23.1-linux-x64/bin/* /usr/local/bin/
 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
index db55a33d47a790e596f61affff1e38693cc603e1..d3727849268ef16d5ce322f58e86e136bf3d98f3 100644 (file)
@@ -11,14 +11,7 @@ ONBUILD RUN ln -s /usr/local/go/bin/go /usr/local/bin/
 # 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
diff --git a/build/package-build-dockerfiles/ubuntu1804/ports.list b/build/package-build-dockerfiles/ubuntu1804/ports.list
deleted file mode 100644 (file)
index 1947c46..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-# 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
index 438bf878a32363fb1f8e073d1d203f99db1ee3da..58b4bc1ed8dcb0d1262d22452b1dcc1556948ab3 100644 (file)
@@ -19,6 +19,10 @@ ONBUILD RUN /bin/sed -i 's/deb http/deb [ arch=amd64 ] http/' /etc/apt/sources.l
 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
index b6bb9ab370e00fa85340605ee42f8285638f2df4..9d0dffc0a069bbce09e7b970d6f7ee5e199fa38e 100755 (executable)
@@ -182,7 +182,13 @@ package_go_binary() {
     # 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