Last active
June 5, 2024 20:08
-
-
Save msgilligan/a36d61953d2caf60d33d233fed281c7b to your computer and use it in GitHub Desktop.
containerFile that builds OP-TEE Rust on both x86_64 and aarch64 (reveals issue on aarch64)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Dockerfile/Containerfile for building Teaclave Trustzone SDK | |
# in either an AMD64 or ARM64 container. | |
# | |
# Use | |
# docker build -f ValidiTEE-build.containerFile --target build-rust-stage -t validitee-build-rust . | |
# | |
# Add `--platform linux/amd64` or `--platform linux/arm64` if you want to overide the | |
# default container architecture for your host. | |
# | |
# Author: Sean Gilligan https://github.com/msgilligan | |
# Date: 2024-06-03 | |
# | |
FROM debian:bookworm-slim AS debian-config-stage | |
ARG DEBIAN_FRONTEND=noninteractive | |
ARG TARGETARCH | |
# Setup Environment for AMD64 build container | |
FROM debian-config-stage AS debian-config-amd64 | |
ENV GCC64="gcc-aarch64-linux-gnu" | |
ENV CROSS_COMPILE="aarch64-linux-gnu-" | |
ENV CROSS_COMPILE64="aarch64-linux-gnu-" | |
ENV CROSS_COMPILE32="arm-linux-gnueabihf-" | |
# Setup Environment for ARM64 build container | |
FROM debian-config-stage AS debian-config-arm64 | |
ENV GCC64="gcc" | |
ENV CROSS_COMPILE="" | |
ENV CROSS_COMPILE64="" | |
ENV CROSS_COMPILE32="arm-linux-gnueabihf-" | |
# Update and isntall APT packages beased upon build container architecture | |
FROM debian-config-${TARGETARCH} as debian-stage | |
RUN apt update && apt upgrade -y | |
RUN apt install -y \ | |
adb \ | |
acpica-tools \ | |
autoconf \ | |
automake \ | |
bc \ | |
bison \ | |
build-essential \ | |
ccache \ | |
cpio \ | |
cscope \ | |
curl \ | |
device-tree-compiler \ | |
e2tools \ | |
expect \ | |
fastboot \ | |
flex \ | |
ftp-upload \ | |
gdisk \ | |
git \ | |
libattr1-dev \ | |
libcap-ng-dev \ | |
libfdt-dev \ | |
libftdi-dev \ | |
libglib2.0-dev \ | |
libgmp3-dev \ | |
libhidapi-dev \ | |
libmpc-dev \ | |
libncurses5-dev \ | |
libpixman-1-dev \ | |
libslirp-dev \ | |
libssl-dev \ | |
libtool \ | |
libusb-1.0-0-dev \ | |
make \ | |
mtools \ | |
netcat-openbsd \ | |
ninja-build \ | |
python3-cryptography \ | |
python3-pip \ | |
python3-pyelftools \ | |
python3-serial \ | |
python-is-python3 \ | |
rsync \ | |
swig \ | |
unzip \ | |
uuid-dev \ | |
wget \ | |
xdg-utils \ | |
xterm \ | |
xz-utils \ | |
zlib1g-dev \ | |
$GCC64 \ | |
gcc-arm-linux-gnueabihf | |
FROM debian-stage AS rust-stage | |
# Install Rust | |
# Note that rustup is available as an Apt package in Trixie | |
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && \ | |
. $HOME/.cargo/env && \ | |
rustup target install aarch64-unknown-linux-gnu && \ | |
rustup target install arm-unknown-linux-gnueabihf && \ | |
rustup default nightly-2023-12-18 && \ | |
rustup component add rust-src | |
ENV PATH="/root/.cargo/bin:$PATH" | |
# Check out OP-TEE OS and Client from GitHub | |
FROM rust-stage AS checkout-optee-stage | |
WORKDIR / | |
RUN mkdir /optee | |
WORKDIR /optee | |
RUN git clone https://github.com/OP-TEE/optee_os.git | |
RUN git clone https://github.com/OP-TEE/optee_client.git | |
# Build OP-TEE OS and Client | |
FROM checkout-optee-stage AS build-optee-stage | |
# Build OP-TEE OS | |
WORKDIR /optee/optee_os | |
RUN make PLATFORM=vexpress-qemu_armv8a | |
# Build OP-TEE client libraries | |
WORKDIR /optee/optee_client | |
RUN make WITH_TEEACL=0 | |
# Check out Teaclve Trustzone SDK (Rust support and examples) | |
FROM build-optee-stage AS checkout-rust-stage | |
ENV OPTEE_RUST_REPO="https://github.com/apache/incubator-teaclave-trustzone-sdk.git" | |
ENV OPTEE_RUST_BRANCH="no-std" | |
WORKDIR /optee | |
RUN git clone --branch $OPTEE_RUST_BRANCH $OPTEE_RUST_REPO optee_rust | |
# Build Rust support and examples | |
FROM checkout-rust-stage AS build-rust-stage | |
ENV OPTEE_DIR="/optee" | |
ENV OPTEE_OS_DIR="$OPTEE_DIR/optee_os" | |
ENV OPTEE_CLIENT_DIR="$OPTEE_DIR/optee_client" | |
ENV OPTEE_CLIENT_EXPORT="$OPTEE_CLIENT_DIR/out/export" | |
ENV TA_DEV_KIT_DIR="$OPTEE_OS_DIR/out/arm-plat-vexpress/export-ta_arm64" | |
ENV TARGET="aarch64-unknown-linux-gnu" | |
WORKDIR /optee/optee_rust/ | |
RUN make | |
The exact error is:
> [build-rust-stage 2/2] RUN make:
0.192 make[1]: Entering directory '/optee/optee_rust/examples/acipher-rs'
0.193 make[2]: Entering directory '/optee/optee_rust/examples/acipher-rs/host'
0.350 info: syncing channel updates for 'nightly-2023-12-18-aarch64-unknown-linux-gnu'
0.506 info: latest update on 2023-12-18, rust version 1.76.0-nightly (6a6287132 2023-12-17)
0.522 info: component 'rust-std' for target 'aarch64-unknown-linux-gnu' is up to date
0.522 info: downloading component 'rust-std' for 'arm-unknown-linux-gnueabihf'
9.083 info: installing component 'rust-std' for 'arm-unknown-linux-gnueabihf'
10.61 Updating crates.io index
10.77 Downloading crates ...
10.84 Downloaded unicode-xid v0.1.0
10.85 Downloaded quote v0.6.13
10.85 Downloaded uuid v0.7.4
10.85 Downloaded hex v0.3.2
10.85 Downloaded proc-macro2 v0.4.30
10.85 Downloaded uuid v1.8.0
10.88 Downloaded syn v0.15.44
11.01 Downloaded libc v0.2.155
11.06 Compiling proc-macro2 v0.4.30
11.06 Compiling unicode-xid v0.1.0
11.06 Compiling libc v0.2.155
11.06 Compiling syn v0.15.44
11.06 Compiling uuid v1.8.0
11.06 Compiling optee-teec-sys v0.2.0 (/optee/optee_rust/optee-teec/optee-teec-sys)
11.06 Compiling uuid v0.7.4
11.07 Compiling hex v0.3.2
11.31 Compiling proto v0.2.0 (/optee/optee_rust/examples/acipher-rs/proto)
11.57 Compiling quote v0.6.13
12.92 Compiling optee-teec-macros v0.2.0 (/optee/optee_rust/optee-teec/macros)
13.16 Compiling optee-teec v0.2.0 (/optee/optee_rust/optee-teec)
13.25 Compiling acipher-rs v0.2.0 (/optee/optee_rust/examples/acipher-rs/host)
16.22 Finished release [optimized] target(s) in 5.69s
16.23 make[2]: Leaving directory '/optee/optee_rust/examples/acipher-rs/host'
16.23 make[2]: Entering directory '/optee/optee_rust/examples/acipher-rs/ta'
16.28 Updating crates.io index
16.33 Downloading crates ...
16.36 Downloaded hex v0.4.3
16.37 Downloaded uuid v0.8.2
16.38 Downloaded libc_alloc v1.0.5
16.38 Downloaded bitflags v1.0.4
16.39 Compiling uuid v1.8.0
16.39 Compiling proc-macro2 v0.4.30
16.39 Compiling unicode-xid v0.1.0
16.39 Compiling syn v0.15.44
16.39 Compiling optee-utee-sys v0.2.0 (/optee/optee_rust/optee-utee/optee-utee-sys)
16.39 Compiling libc_alloc v1.0.5
16.39 Compiling uuid v0.8.2
16.39 Compiling bitflags v1.0.4
16.42 Compiling hex v0.4.3
16.44 error: linking with `ld.bfd` failed: exit status: 1
16.44 |
16.44 = note: LC_ALL="C" PATH="/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin:/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "ld.bfd" "/tmp/rustc6PCro8/symbols.o" "/optee/optee_rust/examples/acipher-rs/ta/target/release/build/optee-utee-sys-ba44db13c5264c52/build_script_build-ba44db13c5264c52.build_script_build.1e5241f6d98158f-cgu.0.rcgu.o" "/optee/optee_rust/examples/acipher-rs/ta/target/release/build/optee-utee-sys-ba44db13c5264c52/build_script_build-ba44db13c5264c52.2l46pofln7xka3v3.rcgu.o" "--as-needed" "-L" "/optee/optee_rust/examples/acipher-rs/ta/target/release/deps" "-L" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib" "-Bstatic" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-cf59f2c17597b3d9.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libpanic_unwind-8f535f48df960590.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libobject-d67feb497d1e63a5.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libmemchr-70b8f4db34cf73b9.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libaddr2line-1b440c2cf263d456.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libgimli-966ed6f97fef1180.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_demangle-c5b96c1bbf2a9ac3.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd_detect-5732d1cd4a81a064.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libhashbrown-2a13d8dbe8a503b5.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-a747a82492cfa49f.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libminiz_oxide-11b720ff8f234cbb.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libadler-6c78e2818dc121b9.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libunwind-426a6726f3a52b5c.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcfg_if-bf93157d645f5523.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/liblibc-cbccd1eea43ebbbb.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/liballoc-0b4655237a1f2f25.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_std_workspace_core-4ce1a30d69fd6755.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcore-bdfe3801ac589305.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcompiler_builtins-76fca0633b54e12b.rlib" "-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "--eh-frame-hdr" "-z" "noexecstack" "-L" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib" "-o" "/optee/optee_rust/examples/acipher-rs/ta/target/release/build/optee-utee-sys-ba44db13c5264c52/build_script_build-ba44db13c5264c52" "--gc-sections" "-pie" "-z" "relro" "-z" "now"
16.44 = note: ld.bfd: cannot find -lgcc_s: No such file or directory
16.44
16.44
16.45 error: could not compile `optee-utee-sys` (build script) due to 1 previous error
16.45 warning: build failed, waiting for other jobs to finish...
16.47 error: linking with `ld.bfd` failed: exit status: 1
16.47 |
16.47 = note: LC_ALL="C" PATH="/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin:/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "ld.bfd" "/tmp/rustcns9cpk/symbols.o" "/optee/optee_rust/examples/acipher-rs/ta/target/release/build/syn-609aa59131ec1a71/build_script_build-609aa59131ec1a71.build_script_build.c9f1ca1df19a8fb9-cgu.0.rcgu.o" "/optee/optee_rust/examples/acipher-rs/ta/target/release/build/syn-609aa59131ec1a71/build_script_build-609aa59131ec1a71.build_script_build.c9f1ca1df19a8fb9-cgu.1.rcgu.o" "/optee/optee_rust/examples/acipher-rs/ta/target/release/build/syn-609aa59131ec1a71/build_script_build-609aa59131ec1a71.6yrm2s6u9uu5uxr.rcgu.o" "--as-needed" "-L" "/optee/optee_rust/examples/acipher-rs/ta/target/release/deps" "-L" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib" "-Bstatic" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-cf59f2c17597b3d9.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libpanic_unwind-8f535f48df960590.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libobject-d67feb497d1e63a5.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libmemchr-70b8f4db34cf73b9.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libaddr2line-1b440c2cf263d456.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libgimli-966ed6f97fef1180.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_demangle-c5b96c1bbf2a9ac3.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd_detect-5732d1cd4a81a064.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libhashbrown-2a13d8dbe8a503b5.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-a747a82492cfa49f.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libminiz_oxide-11b720ff8f234cbb.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libadler-6c78e2818dc121b9.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libunwind-426a6726f3a52b5c.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcfg_if-bf93157d645f5523.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/liblibc-cbccd1eea43ebbbb.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/liballoc-0b4655237a1f2f25.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_std_workspace_core-4ce1a30d69fd6755.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcore-bdfe3801ac589305.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcompiler_builtins-76fca0633b54e12b.rlib" "-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "--eh-frame-hdr" "-z" "noexecstack" "-L" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib" "-o" "/optee/optee_rust/examples/acipher-rs/ta/target/release/build/syn-609aa59131ec1a71/build_script_build-609aa59131ec1a71" "--gc-sections" "-pie" "-z" "relro" "-z" "now"
16.47 = note: ld.bfd: cannot find -lgcc_s: No such file or directory
16.47
16.47
16.47 error: could not compile `syn` (build script) due to 1 previous error
16.48 error: linking with `ld.bfd` failed: exit status: 1
16.48 |
16.48 = note: LC_ALL="C" PATH="/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/bin:/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" VSLANG="1033" "ld.bfd" "/tmp/rustcOMjgkF/symbols.o" "/optee/optee_rust/examples/acipher-rs/ta/target/release/build/proc-macro2-dd342a8c0f6dd24d/build_script_build-dd342a8c0f6dd24d.build_script_build.d59e268df55920a7-cgu.0.rcgu.o" "/optee/optee_rust/examples/acipher-rs/ta/target/release/build/proc-macro2-dd342a8c0f6dd24d/build_script_build-dd342a8c0f6dd24d.build_script_build.d59e268df55920a7-cgu.1.rcgu.o" "/optee/optee_rust/examples/acipher-rs/ta/target/release/build/proc-macro2-dd342a8c0f6dd24d/build_script_build-dd342a8c0f6dd24d.59s3ghtnjm9dm6kw.rcgu.o" "--as-needed" "-L" "/optee/optee_rust/examples/acipher-rs/ta/target/release/deps" "-L" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib" "-Bstatic" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-cf59f2c17597b3d9.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libpanic_unwind-8f535f48df960590.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libobject-d67feb497d1e63a5.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libmemchr-70b8f4db34cf73b9.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libaddr2line-1b440c2cf263d456.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libgimli-966ed6f97fef1180.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_demangle-c5b96c1bbf2a9ac3.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd_detect-5732d1cd4a81a064.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libhashbrown-2a13d8dbe8a503b5.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-a747a82492cfa49f.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libminiz_oxide-11b720ff8f234cbb.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libadler-6c78e2818dc121b9.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libunwind-426a6726f3a52b5c.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcfg_if-bf93157d645f5523.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/liblibc-cbccd1eea43ebbbb.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/liballoc-0b4655237a1f2f25.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/librustc_std_workspace_core-4ce1a30d69fd6755.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcore-bdfe3801ac589305.rlib" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib/libcompiler_builtins-76fca0633b54e12b.rlib" "-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "--eh-frame-hdr" "-z" "noexecstack" "-L" "/root/.rustup/toolchains/nightly-2023-12-18-aarch64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-linux-gnu/lib" "-o" "/optee/optee_rust/examples/acipher-rs/ta/target/release/build/proc-macro2-dd342a8c0f6dd24d/build_script_build-dd342a8c0f6dd24d" "--gc-sections" "-pie" "-z" "relro" "-z" "now"
16.48 = note: ld.bfd: cannot find -lgcc_s: No such file or directory
16.48
16.48
16.48 error: could not compile `proc-macro2` (build script) due to 1 previous error
16.56 make[2]: *** [Makefile:32: ta] Error 101
16.56 make[2]: Leaving directory '/optee/optee_rust/examples/acipher-rs/ta'
16.56 make[1]: Leaving directory '/optee/optee_rust/examples/acipher-rs'
16.56 make[1]: *** [Makefile:30: all] Error 2
16.56 make: *** [Makefile:60: examples/acipher-rs] Error 2
------
ValidiTEE-build.containerFile:135
--------------------
133 | ENV TARGET="aarch64-unknown-linux-gnu"
134 | WORKDIR /optee/optee_rust/
135 | >>> RUN make
136 |
137 |
--------------------
ERROR: failed to solve: process "/bin/sh -c make" did not complete successfully: exit code: 2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This currently fails when building when
TARGETARCH
isarm64
.See: