[arvados] updated: 2.6.0-407-g1cefd714a

git repository hosting git at public.arvados.org
Mon Jul 31 15:44:53 UTC 2023


Summary of changes:
 build/README         |  6 +++++-
 build/run-library.sh | 36 +++++++++++++++++-------------------
 2 files changed, 22 insertions(+), 20 deletions(-)

       via  1cefd714aed3090435b6fe471dbdf3a1ba12179a (commit)
      from  e0c95f3349e0a78438a379861d97d6a565ee281b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 1cefd714aed3090435b6fe471dbdf3a1ba12179a
Author: Brett Smith <brett.smith at curii.com>
Date:   Mon Jul 31 11:37:38 2023 -0400

    20797: Update cross compilation detection logic
    
    The immediate bug that needs to be fixed is that we currently don't
    support cross compilation on rocky8.
    
    DRY up the code to try to make it easier to follow what's going on
    here.
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/build/README b/build/README
index f31d39a21..212e4586c 100644
--- a/build/README
+++ b/build/README
@@ -14,13 +14,17 @@ Quickstart
 Build and test all the packages for debian10 on your architecture by
 running:
 
-    ./run-build-test-packages-one-target.sh --arch "$(arch)"
+    ./run-build-test-packages-one-target.sh
 
 This will build package build and test Docker images for debian10, build all
 packages in a build container, then test all packages in a test container.
 
 Use a different distro by adding the `--target TARGET` option.
 
+Limit the build to a single architecture by adding the `--arch ARCH`
+option. Supported architectures are amd64 and arm64. Note cross-compilation
+from amd64 to arm64 is currently only supported on Debian 11+.
+
 Limit the build to a single package by adding the `--only-build
 PACKAGE_NAME` option. This is helpful when a build is mostly in good shape
 and you're tracking down last bugs in one or two packages.
diff --git a/build/run-library.sh b/build/run-library.sh
index 49cab6a0f..0766b7364 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -174,25 +174,23 @@ package_go_binary() {
     return 1
   fi
 
-  cross_compilation=1
-  if [[ "$TARGET" == "centos7" ]]; then
-    if [[ "$native_arch" == "amd64" ]] && [[ -n "$target_arch" ]] && [[ "$native_arch" != "$target_arch" ]]; then
-      echo "Error: no cross compilation support for Go on $native_arch for $TARGET, can not build $prog for $target_arch"
-      return 1
-    fi
-    cross_compilation=0
-  fi
-
-  if [[ "$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.
-    if [[ "$native_arch" == "amd64" ]] && [[ -n "$target_arch" ]] && [[ "$native_arch" != "$target_arch" ]]; then
-      echo "Error: no cross compilation support for Go on $native_arch for $TARGET, can not build $prog for $target_arch"
-      return 1
-    fi
-    cross_compilation=0
-  fi
+  case "$package_format-$TARGET" in
+    # Older Debian/Ubuntu do not support cross compilation because the
+    # libfuse package does not support multiarch. See
+    # <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983477>.
+    # Red Hat-based distributions do not support native cross compilation at
+    # all (they use a qemu-based solution we haven't implemented yet).
+    deb-debian10|deb-ubuntu1804|deb-ubuntu2004|rpm-*)
+      cross_compilation=0
+      if [[ "$native_arch" == "amd64" ]] && [[ -n "$target_arch" ]] && [[ "$native_arch" != "$target_arch" ]]; then
+        echo "Error: no cross compilation support for Go on $native_arch for $TARGET, can not build $prog for $target_arch"
+        return 1
+      fi
+      ;;
+    *)
+      cross_compilation=1
+      ;;
+  esac
 
   if [[ -n "$target_arch" ]]; then
     archs=($target_arch)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list