Skip to content

Commit

Permalink
no idea whats going on
Browse files Browse the repository at this point in the history
  • Loading branch information
iker-barriocanal committed Oct 9, 2023
1 parent 7df98da commit d7ff8a6
Showing 1 changed file with 35 additions and 4 deletions.
39 changes: 35 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,37 @@ RUN yum -y update && yum clean all \
&& rm -rf /var/cache/yum \
&& ln -s /usr/bin/cmake3 /usr/bin/cmake

RUN if [ ${BUILD_ARCH} == "aarch64" ]; then \

# yum -y update && yum clean all && yum -y install centos-release-scl epel-release cmake3 devtoolset-10 git llvm-toolset-7.0-clang-devel && yum clean all && rm -rf /var/cache/yum && ln -s /usr/bin/cmake3 /usr/bin/cmake

# RUN echo 'dont cache mee'
RUN echo "build arch: ${BUILD_ARCH}"

# RUN if [ ${BUILD_ARCH} == "aarch64" ]; then \
RUN if true ; then \
yum -y install git make libffi-devel curl dnf epel-release ca-certificates \
&& curl -L -s https://www.centos.org/keys/RPM-GPG-KEY-CentOS-7-aarch64 > /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64 \
&& cat /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64 >> /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 \
&& yum -y install gcc gcc-aarch64-linux-gnu gcc-aarch64-linux-gnueabi gcc-aarch64-linux-gnueabihf qemu-user \
&& dnf --forcearch aarch64 --release 7 install -y gcc glibc glibc-devel --installroot "/usr/aarch64-linux-gnu/sys-root/" \
&& cat /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64 >> /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 ; \
fi

# yum -y install git make libffi-devel curl dnf epel-release ca-certificates && curl -L -s https://www.centos.org/keys/RPM-GPG-KEY-CentOS-7-aarch64 > /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64 && cat /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7-aarch64 >> /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

RUN echo "arch: ${BUILD_ARCH}"
# RUN if [ ${BUILD_ARCH} == "aarch64" ]; then \
# echo "yes" ; else echo "no"; fi

# qemu-user not found for aarch64
# RUN if [ ${BUILD_ARCH} == "aarch64" ]; then \
RUN if true ; then \
yum -y install gcc glibc glibc-devel \
# dnf --release 7 --forcearch aarch64 install gcc glibc glibc-devel \
# && dnf --release 7 install gcc-aarch64-linux-gnu qemu-user \
&& yum -y install gcc-aarch64-linux-gnu \
# && dnf --release 7 --forcearch aarch64 install gcc-aarch64-linux-gnu \
# && dnf --release 7 --forcearch aarch64 install gcc-aarch64-linux-gnu qemu-user \
&& dnf -y --release 7 --forcearch aarch64 --installroot "/usr/aarch64-linux-gnu/sys-root/" install gcc glibc glibc-devel \
# && dnf -y --release 7 --forcearch aarch64 --installroot "/usr/aarch64-linux-gnu/sys-root/" install gcc-aarch64-linux-gnu \
# && dnf -y --release 7 --forcearch aarch64 --installroot "/usr/aarch64-linux-gnu/sys-root/" install gcc-aarch64-linux-gnu gcc-aarch64-linux-gnueabi gcc-aarch64-linux-gnueabihf qemu-user \
&& ln -s "/usr/aarch64-linux-gnu/sys-root/lib64/libgcc_s.so.1" "/usr/aarch64-linux-gnu/sys-root/lib64/libgcc_s.so" \
# NOTE(iker): work-around to create a cmake toolchain file for arch-specific builds, since only objcopy is needed.
&& rm -rf "/usr/bin/objcopy" && ln -s "/usr/bin/aarch64-linux-gnu-objcopy" "/usr/bin/objcopy" ; \
Expand All @@ -39,6 +64,8 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
&& echo -e '[registries.crates-io]\nprotocol = "sparse"\n[net]\ngit-fetch-with-cli = true' > $CARGO_HOME/config \
&& rustup target add aarch64-unknown-linux-gnu

# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain=${RUST_TOOLCHAIN_VERSION} && echo -e '[registries.crates-io]\nprotocol = "sparse"\n[net]\ngit-fetch-with-cli = true' > $CARGO_HOME/config && rustup target add aarch64-unknown-linux-gnu

COPY --from=sentry-cli /bin/sentry-cli /bin/sentry-cli

WORKDIR /work
Expand All @@ -62,6 +89,10 @@ RUN : \
TARGET=${BUILD_TARGET} \
RELAY_FEATURES=${RELAY_FEATURES}

# export BUILD_TARGET="aarch64-unknown-linux-gnu"
# scl enable devtoolset-10 llvm-toolset-7.0 -- make build-linux-release TARGET=${BUILD_TARGET} RELAY_FEATURES=""
# scl enable devtoolset-10 llvm-toolset-7.0 -- cd relay && cargo build --release --locked --target=aarch64-unknown-linux-gnu

# Collect source bundle
# Produces `relay-bin`, `relay-debug.zip` and `relay.src.zip` in current directory
RUN : \
Expand Down

0 comments on commit d7ff8a6

Please sign in to comment.