You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by ww...@apache.org on 2021/06/07 07:04:39 UTC

[incubator-heron] 01/01: Docker build artifacts working for ARM64, Raspberry Pi 4

This is an automated email from the ASF dual-hosted git repository.

wwong pushed a commit to branch 0.20.4-incubating-rc1-arm64
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git

commit f3bab63b2c289ecbc934c2cae5be73ce613cbe27
Author: Windham Wong <wi...@stormeye.io>
AuthorDate: Mon Jun 7 07:02:53 2021 +0000

    Docker build artifacts working for ARM64, Raspberry Pi 4
    
    Key changes:
    - Bazel build WORKSPACE for ARM64
    - Adding docker compile Dockerfile for ubuntu20.04-arm64
    - Commet out compile-platform bazel build images:heron.tar
    - update libunwind BUILD for ARM64
---
 WORKSPACE                                   | 33 +++++++++---------
 docker/compile/Dockerfile.ubuntu20.04-arm64 | 53 +++++++++++++++++++++++++++++
 docker/scripts/compile-platform.sh          |  2 +-
 third_party/libunwind/libunwind.BUILD       |  6 ++--
 4 files changed, 74 insertions(+), 20 deletions(-)

diff --git a/WORKSPACE b/WORKSPACE
index fb4dfc7..1abcbac 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -158,9 +158,8 @@ pinned_maven_install()
 
 http_archive(
     name = "rules_python",
-    sha256 = "b5668cde8bb6e3515057ef465a35ad712214962f0b3a314e551204266c7be90c",
-    strip_prefix = "rules_python-0.0.2",
-    url = "https://github.com/bazelbuild/rules_python/releases/download/0.0.2/rules_python-0.0.2.tar.gz",
+    url = "https://github.com/bazelbuild/rules_python/releases/download/0.1.0/rules_python-0.1.0.tar.gz",
+    sha256 = "b6d46438523a3ec0f3cead544190ee13223a52f6a6765a29eae7b7cc24cc83a0"
 )
 
 load("@rules_python//python:repositories.bzl", "py_repositories")
@@ -341,9 +340,9 @@ http_archive(
 http_archive(
     name = "helm_mac",
     build_file = "@//:third_party/helm/helm.BUILD",
-    sha256 = "05c7748da0ea8d5f85576491cd3c615f94063f20986fd82a0f5658ddc286cdb1",
-    strip_prefix = "darwin-amd64",
-    urls = ["https://get.helm.sh/helm-v3.0.2-darwin-amd64.tar.gz"],
+#    sha256 = "05c7748da0ea8d5f85576491cd3c615f94063f20986fd82a0f5658ddc286cdb1",
+    strip_prefix = "darwin-arm64",
+    urls = ["https://get.helm.sh/helm-v3.0.2-darwin-arm64.tar.gz"],
 )
 
 http_archive(
@@ -356,11 +355,11 @@ http_archive(
 # end helm
 
 # for docker image building
-DOCKER_RULES_VERSION = "0.14.4"
+DOCKER_RULES_VERSION = "0.16.0"
 
 http_archive(
     name = "io_bazel_rules_docker",
-    sha256 = "4521794f0fba2e20f3bf15846ab5e01d5332e587e9ce81629c7f96c793bb7036",
+    sha256 = "95d39fd84ff4474babaf190450ee034d958202043e366b9fc38f438c9e6c3334",
     strip_prefix = "rules_docker-%s" % DOCKER_RULES_VERSION,
     urls = ["https://github.com/bazelbuild/rules_docker/archive/v%s.tar.gz" % DOCKER_RULES_VERSION],
 )
@@ -375,22 +374,22 @@ load("@io_bazel_rules_docker//repositories:deps.bzl", container_deps = "deps")
 
 container_deps()
 
-load("@io_bazel_rules_docker//repositories:pip_repositories.bzl", "pip_deps")
+# load("@io_bazel_rules_docker//repositories:pip_repositories.bzl", "pip_deps")
 
-pip_deps()
+# pip_deps()
 
 load(
     "@io_bazel_rules_docker//container:container.bzl",
     "container_pull",
 )
 
-container_pull(
-    name = "heron-base",
-    digest = "sha256:495800e9eb001dfd2fb41d1941155203bb9be06b716b0f8b1b0133eb12ea813c",
-    registry = "index.docker.io",
-    repository = "heron/base",
-    tag = "0.5.0",
-)
+#container_pull(
+#    name = "heron-base",
+#    digest = "sha256:495800e9eb001dfd2fb41d1941155203bb9be06b716b0f8b1b0133eb12ea813c",
+#    registry = "index.docker.io",
+#    repository = "heron/base",
+#    tag = "0.5.0",
+#)
 # end docker image building
 
 http_archive(
diff --git a/docker/compile/Dockerfile.ubuntu20.04-arm64 b/docker/compile/Dockerfile.ubuntu20.04-arm64
new file mode 100644
index 0000000..4ca1206
--- /dev/null
+++ b/docker/compile/Dockerfile.ubuntu20.04-arm64
@@ -0,0 +1,53 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+
+FROM ubuntu:20.04
+
+# This is passed to the heron build command via the --config flag
+ENV TARGET_PLATFORM ubuntu
+
+ARG DEBIAN_FRONTEND=noninteractive
+
+RUN apt-get update && apt-get -y install \
+      ant \
+      g++ \
+      cmake \
+      automake \
+      libtool-bin \
+      libunwind8 \
+      patch \
+      python-is-python3 \
+      python3-dev \
+      python3-venv \
+      pkg-config \
+      wget \
+      zip \
+      unzip \
+      git \
+      curl \
+      tree \
+      openjdk-11-jdk-headless
+
+ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
+
+ENV bazelVersion 3.7.2
+
+RUN wget -O /usr/bin/bazel https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-linux-arm64 \
+      && chmod +x /usr/bin/bazel
+
+ADD bazelrc /root/.bazelrc
+ADD scripts/compile-platform.sh /compile-platform.sh
diff --git a/docker/scripts/compile-platform.sh b/docker/scripts/compile-platform.sh
index 34c4403..9834aa9 100755
--- a/docker/scripts/compile-platform.sh
+++ b/docker/scripts/compile-platform.sh
@@ -64,7 +64,7 @@ bazel clean
 echo "Creating packages"
 bazel build -c opt --jobs 25 --config=$CONFIG_PLATFORM scripts/packages:tarpkgs
 bazel build -c opt --jobs 25 --config=$CONFIG_PLATFORM scripts/packages:binpkgs
-bazel build -c opt --jobs 25 --config=$CONFIG_PLATFORM scripts/images:heron.tar
+#bazel build -c opt --jobs 25 --config=$CONFIG_PLATFORM scripts/images:heron.tar
 
 echo "Moving packages to /$OUTPUT_DIRECTORY"
 for file in ./bazel-bin/scripts/packages/*.tar.gz; do
diff --git a/third_party/libunwind/libunwind.BUILD b/third_party/libunwind/libunwind.BUILD
index a592be5..c1a5e9d 100644
--- a/third_party/libunwind/libunwind.BUILD
+++ b/third_party/libunwind/libunwind.BUILD
@@ -8,13 +8,15 @@ out_files = [
     "include/libunwind-dynamic.h",
     "include/libunwind.h",
     "include/libunwind-ptrace.h",
-    "include/libunwind-x86_64.h",
+#    "include/libunwind-x86_64.h",
+    "include/libunwind-aarch64.h",
     "include/unwind.h",
     "lib/libunwind.a",
     "lib/libunwind-coredump.a",
     "lib/libunwind-ptrace.a",
     "lib/libunwind-setjmp.a",
-    "lib/libunwind-x86_64.a",
+#    "lib/libunwind-x86_64.a",
+    "lib/libunwind-aarch64.a",
 ]
 
 genrule(