deno
deno copied to clipboard
[WIP] Arm64/Aarch64 ci builds
Will create a PR when I have this working and cleaned up, at the moment the repo-history is a mess. Utilising some of the work from rusty_v8's arm 64 ci.yml done by afinch7. I'm trying out a community gh-action that allows running on non-intel cpus by utilising docker. I'm also looking into cargo runners, which I think provide the list of executables which can be stored and run on this docker instance. 🤞
i'm somewhat close after two solid days of head scratching. i ran a built debug version on a RPi3 and got an error relating to V8. here's my work so far https://github.com/sunsetkookaburra/deno/tree/arm64_ci main problem now is that the github actions instance runs out of space when building it as debug
Feeling like I've hit somewhat of a dead end myself, and don't know enough about rust and the build process to do this justice. Passing this on to whoever wants to work on this. I've come close with sunsetkookaburra/deno@b09ef29 and with sunsetkookaburra/deno@a248afb
This image shows the result when running the aarch64 target binary on Ubuntu 18.04LTS on a RPi3, AARCH64
for anyone who knows something about linux binary builds:
this is at sunsetkookaburra/deno@f0249dd
if it helps, deno --version
and deno help
are able to run successfuly.
(for my reference, first round of attempts: sunsetkookaburra/deno@2ef273a)
If you can get v8 to compile successfully the only other major issue you are going to run into is snapshots. Snapshots generated using a x86 compiles of v8 are not compatible with arm compiles of v8. It took me a long time to figure this out the first time around, but It makes more sense when you realize that a snapshot is mostly compiled bytecode from v8's JIT compiler. The only solution I managed to get working here is just don't use snapshots for arm builds, but I would be happier if we could generate arm snapshots.
I did try (at one point) forcing it to build v8 (on arm), and that didnt work.
How can i reproduce that kind of behavior on my setup? Or this just can be reproduced on the CI?
@ktfth this was trying to build using the ci, but following the steps for aarch64 on your machine should do much the same. Rust-Cross looks promising, but I couldn't figure out how to install python in that image or rust, it also needs docker installed locally.
Rust cross (https://github.com/rust-embedded/cross) is so close to an answer I feel, you just need to figure out installing the build tools onto that image (rust+python+...)
Running the following command "cross build --target aarch64-unknown-linux-gnu"
I have getted the output:
error: failed to run custom build command for rusty_v8 v0.4.2
Caused by:
process didn't exit successfully: /target/debug/build/rusty_v8-a9c2e62a39932a56/build-script-build
(exit code: 101)
--- stdout
static lib URL: https://github.com/denoland/rusty_v8/releases/download/v0.4.2/librusty_v8_debug_aarch64-unknown-linux-gnu.a
cargo:rustc-link-search=/target/aarch64-unknown-linux-gnu/debug/gn_out/obj
Downloading https://github.com/denoland/rusty_v8/releases/download/v0.4.2/librusty_v8_debug_aarch64-unknown-linux-gnu.a
--- stderr
thread 'main' panicked at 'called Result::unwrap()
on an Err
value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /cargo/registry/src/github.com-1ecc6299db9ec823/rusty_v8-0.4.2/build.rs:221:18
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish... error: build failed
You have passed this step?
@ktfth I did manage to. I used docker run -v /host/directory:/container/directory
to map the repo inside the root of the docker container, but I don't think with rust cross.
So if you can find another way to add the folder (ADD
command in a custom dockerfile for rust-cross I think) that should get you further along.
I used this dockerfile with rust-cross: (I didn't try using ADD)
FROM rustembedded/cross:aarch64-unknown-linux-gnu-0.2.0
RUN apt update && apt install -yq --no-install-suggests --no-install-recommends python && ls /usr/bin
It's a good place to put docker file on the project?
https://github.com/ktfth/deno/blob/feature/aarch64/Dockerfile
I have updated the docker file to act as multi-stage and work well now i need to solve that part.
error: failed to parse manifest at /deno/cli/Cargo.toml
Caused by:
the default-run
manifest key is unstable
Caused by:
feature default-run
is required
this Cargo does not support nightly features, but if you
switch to nightly channel you can add
cargo-features = ["default-run"]
to enable this feature
Have any tip for that?
The build with "cross build --target aarch64-unknown-linux-gnu" work well
Have you managed to run the binary successfully? I did manage to build it, but at runtime it would fail.
note to self, i found this in the v8-flags
--arm-arch (generate instructions for the selected ARM architecture if available: armv6, armv7, armv7+sudiv or armv8)
type: string default: armv8
@sunsetkookaburra So I have a Raspberry Pi 4 (8GB) that's running the 64bit Version of Raspberry Pi OS. And I have another version of Raspberry Pi 4 (4GB) that's running the 32bit version of Raspberry Pi OS. What can I do to help you?
Do you have a list of requirement that are needed to be installed so that people like me can run along with you? I'm a C programmer, but only in so far as I've written some C programs. I'm not actually good at it. But I'd love to get Deno working on the Raspberry Pi as that's the vast majority of my development target.
@Dygear First step is to follow the general instructions for installing deno for building it, if your doing it locally. When installing Rust, I think you need the arm64/aarch64 target. I experimented with all this using GitHub actions on my own forked repository: https://github.com/sunsetkookaburra/deno/tree/arm64_ci Just look through the commits in that branch, and you should find the docker files, github action files, etc, that I played around with to try and build.
To run it on my RPi3, I use a function of github actions to bundle a file from the build. I did try building on the RPi3 but it got very hot very quick so I bailed on that, but that might prove successful if you can build on RPi4. The main issue was with V8, from memory I could get something out of it but not alot. The deno v8-options might be worth a try if you get to the stage of a successful build (without necessarily a successfu runtime).
If you look at past issues about Arm64/Aarch64 there was something about snapshots that I wasn't able to figure. I did try for a while (buried somewhere in those commits). There is a build.rs
file which is one part of the puzzle I think.
Best help I can give is just to look through the commits that I did make in that fork, and maybe try them either on your RPi or on your own fork. And if they're still there, to look at the github actions and try and find ones from my pull-request... https://github.com/sunsetkookaburra/deno/actions?query=workflow%3Aci
I do feel like I got close, so maybe do some digging around the V8 part of the build - there is some stuff to do with snapshots being arch/os specific, from what I recall (to do with compilation).
@sunsetkookaburra Do we have somewhere, where we can have an on going conversation about this? I'm on the Deno Discord server with the username @Dygear#1056
. Right now what I'm going to do is blow away my current install of the Raspberry Pi 4 8GB install that I have running Raspberry Pi OS (64bit) and start from scratch on that. I've followed the same method for other open source projects that use the Raspberry Pi so that I can start making documentation should this all start working. (One such example can be found here ... Trunk-Recorder Raspberry Pi Setup.)
Having gotten this working in the past I figure I should help clear up some of the confusion here.
You can already build and run deno directly on most arm64 platforms(as long as you don't run out of memory compiling). Platforms I have already tested include a pi 4 4gb, pi 3 1gb, and several Android phones(and tablets) using termux proot and Ubuntu. This should be pretty simple on most distros. Just clone the main deno repo and submodules and run 'cargo build'. You might need to install a few deps on most distros. On Ubuntu I only needed to install gcc, rust, and git, but this might very a bit on your install.
For armhf/armv7/arm32 platforms things are a little more complicated, since we don't currently have a build process for 'rusty_v8'. I started poking at this part today, but I think it's going to be a lot more complicated than just copying and modifying the arm64 build. For most people I would just avoid 32-bit arm platforms and os distros if possible.
The cross compile situation is very complicated. It all revolves around snapshots. When v8 loads Javascript code into memory it essentially compiles it to bytecode(bit of a simplification here) hence v8 being a JIT compiler. On a x86 platform running a native executable this means that the bytecode is x86 bytecode. When we create a snapshot of v8 state it mostly includes this bytecode. If we are cross compiling this snapshot is generated by running a native executable ('build.rs') thus the snapshot generated is native to the compiler host and is not compatible with the platform we are compiling for. If we can either find a way to execute a arm native version of the snapshot generator at compile time or disable snapshots for cross compiles(my previous solution), we should be able to cross compile for arm64.
I hope this clears up where arm support is at currently and what issues still need to be solved here.
@afinch7 Thanks! That was helpful.
I blew away my older install for Raspberry Pi OS 64 Bit and started fresh. For those that want to follow along, I'm using a Raspberry Pi 4 8GB with a 64 GB SD Card (Samsung Pro Endurance), the official power supply and the FLIRC case.
I downloaded the latest version of Raspberry Pi OS Buster arm64 from here. I'm using the 2020-08-20-raspios-buster-arm64.zip file. I copied that over using the Raspberry Pi Imager.
Once booted I enabled SSH and did the rest of the setup from an SSH session. I did the normal.
-
sudo apt update
-
sudo apt upgrade
And then started following the build from source documentation from here. -
git clone --recurse-submodules https://github.com/denoland/deno.git
-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Keeping the defaults, I entered 1 and then pressed Enter
- Note: My triple target detected as
aarch64-unknown-linux-gnu
-
source $HOME/.cargo/env
to make rust available in my current SSH session. -
cd deno/
where the git clone command above cloned it to. -
rustup target add wasm32-unknown-unknown
-
rustup target add wasm32-wasi
-
V8_FROM_SOURCE=1 cargo build -vv
During the failed build process I noticed this ...
[rusty_v8 0.11.0] Downloading https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-llvmorg-12-init-4187-g33ce275f-1.tgz .......... Done.
[rusty_v8 0.11.0] cargo:warning=Not using sccache or ccache
[rusty_v8 0.11.0] Installing Debian sid arm64 root image: /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/rusty_v8-0.11.0/build/linux/debian_sid_arm64-sysroot
[rusty_v8 0.11.0] Downloading https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6/debian_sid_arm64_sysroot.tar.xz
Good, it sees that I'm an arm64 system.
[rusty_v8 0.11.0] The current directory is /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/rusty_v8-0.11.0
[rusty_v8 0.11.0] gn gen --root=/home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/rusty_v8-0.11.0 /home/pi/deno/target/debug/gn_out
[rusty_v8 0.11.0] running: "/home/pi/deno/target/debug/ninja_gn_binaries-20200827/linux64/gn" "--root=/home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/rusty_v8-0.11.0" "gen" "/home/pi/deno/target/debug/gn_out" "--args=is_debug=true clang_base_path=\"/home/pi/deno/target/debug/clang\" target_cpu=\"arm64\" use_sysroot=true"
[rusty_v8 0.11.0] /home/pi/deno/target/debug/ninja_gn_binaries-20200827/linux64/gn: 1: /home/pi/deno/target/debug/ninja_gn_binaries-20200827/linux64/gn: Syntax error: "(" unexpected
[rusty_v8 0.11.0] thread 'main' panicked at '
[rusty_v8 0.11.0] command did not execute successfully, got: exit code: 2
[rusty_v8 0.11.0]
[rusty_v8 0.11.0] build script failed, must exit now', /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo_gn-0.0.15/src/lib.rs:203:3
[rusty_v8 0.11.0] note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
The following warnings were emitted during compilation:
warning: Not using sccache or ccache
error: failed to run custom build command for `rusty_v8 v0.11.0`
Caused by:
process didn't exit successfully: `/home/pi/deno/target/debug/build/rusty_v8-fe6d99f25981b70d/build-script-build` (exit code: 101)
--- stdout
Downloading https://github.com/denoland/ninja_gn_binaries/archive/20200827.tar.gz... Done.
using Chromiums clang
clang_base_path /home/pi/deno/target/debug/clang
Downloading https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-llvmorg-12-init-4187-g33ce275f-1.tgz .......... Done.
cargo:warning=Not using sccache or ccache
Installing Debian sid arm64 root image: /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/rusty_v8-0.11.0/build/linux/debian_sid_arm64-sysroot
Downloading https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/ef67b6ca8fd6e2e51515a243d043d1ea4caf45e6/debian_sid_arm64_sysroot.tar.xz
Installing Debian sid amd64 root image: /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/rusty_v8-0.11.0/build/linux/debian_sid_amd64-sysroot
Downloading https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/5f64b417e1018dcf8fcc81dc2714e0f264b9b911/debian_sid_amd64_sysroot.tar.xz
The current directory is /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/rusty_v8-0.11.0
gn gen --root=/home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/rusty_v8-0.11.0 /home/pi/deno/target/debug/gn_out
running: "/home/pi/deno/target/debug/ninja_gn_binaries-20200827/linux64/gn" "--root=/home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/rusty_v8-0.11.0" "gen" "/home/pi/deno/target/debug/gn_out" "--args=is_debug=true clang_base_path=\"/home/pi/deno/target/debug/clang\" target_cpu=\"arm64\" use_sysroot=true"
--- stderr
/home/pi/deno/target/debug/ninja_gn_binaries-20200827/linux64/gn: 1: /home/pi/deno/target/debug/ninja_gn_binaries-20200827/linux64/gn: Syntax error: "(" unexpected
thread 'main' panicked at '
command did not execute successfully, got: exit code: 2
build script failed, must exit now', /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo_gn-0.0.15/src/lib.rs:203:3
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
I noticed that @afinch7 said just run cargo build
so I do that this time around and got the following results.
-
cargo build -vv
Full build log can be found here for both the failure and success.
I re-read your last paragraph @afinch7 and I realize the problem you are facing is much larger because of CI builds. So you are attempting to solve the systematic problem of CI on cross platform code. I think what you really need is a Raspberry Pi 8GB in order to check the CI build on that platform. The cross compile JIT giving you x86 byte code instead of ARM native byte code seems like a total nightmare. Perhaps it would simply be better if the arm builds happened on a native arm stack ... On a fairly cheap Raspberry Pi 4. Just for reference a fresh / cold cargo build --production
run took Finished release [optimized] target(s) in 43m 52s
Granted it's not blindly fast, but it works.
pi@deno:~ $ sudo ln -s /home/pi/deno/target/release/deno /bin/deno
pi@deno:~ $ deno run https://deno.land/std/examples/welcome.ts
Download https://deno.land/std/examples/welcome.ts
Warning Implicitly using latest version (0.74.0) for https://deno.land/std/examples/welcome.ts
Download https://deno.land/[email protected]/examples/welcome.ts
Check https://deno.land/[email protected]/examples/welcome.ts
Welcome to Deno 🦕
pi@deno:~ $ uname -a
Linux deno 5.4.51-v8+ #1333 SMP PREEMPT Mon Aug 10 16:58:35 BST 2020 aarch64 GNU/Linux
pi@deno:~ $ cd deno/target/release/
pi@deno:~/deno/target/release $ file ./deno
./deno: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=90cab7be098b765ec16edbb92c0c3a2d73f23819, with debug_info, not stripped
After install the nightly version of rustup for aarch64-apple-darwin
triple. The system fails to compile with on an arm64-apple-darwin
system with the following error.
Compiling twoway v0.1.8
Running `CARGO=/Users/dygear/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo CARGO_CRATE_NAME=twoway CARGO_MANIFEST_DIR=/Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/twoway-0.1.8 CARGO_PKG_AUTHORS=bluss CARGO_PKG_DESCRIPTION='Fast substring search for strings and byte strings. Optional SSE4.2 acceleration (requires nightly and cargo feature flag pcmp) using pcmpestri. Memchr is the only mandatory dependency. The two way algorithm is also used by rust'\''s libstd itself, but here it is exposed both for byte strings, using memchr, and optionally using a SSE4.2 accelerated version.' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE=MIT/Apache-2.0 CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=twoway CARGO_PKG_REPOSITORY='https://github.com/bluss/twoway' CARGO_PKG_VERSION=0.1.8 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=1 CARGO_PKG_VERSION_PATCH=8 CARGO_PKG_VERSION_PRE='' DYLD_FALLBACK_LIBRARY_PATH='/Users/dygear/deno/target/debug/deps:/Users/dygear/.rustup/toolchains/nightly-aarch64-apple-darwin/lib:/Users/dygear/.rustup/toolchains/nightly-aarch64-apple-darwin/lib:/Users/dygear/lib:/usr/local/lib:/usr/lib' rustc --crate-name twoway /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/twoway-0.1.8/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="use_std"' -C metadata=f3b0ff8dd39c9c7a -C extra-filename=-f3b0ff8dd39c9c7a --out-dir /Users/dygear/deno/target/debug/deps -L dependency=/Users/dygear/deno/target/debug/deps --extern memchr=/Users/dygear/deno/target/debug/deps/libmemchr-3d00714d604632d0.rmeta --cap-lints warn`
[ring 0.16.15] /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:18:17: error: unexpected token in '.section' directive
[ring 0.16.15] .section .rodata
[ring 0.16.15] ^
[ring 0.16.15] /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:28:1: error: unknown directive
[ring 0.16.15] .hidden GFp_aes_hw_set_encrypt_key
[ring 0.16.15] ^
[ring 0.16.15] /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:29:1: error: unknown directive
[ring 0.16.15] .type GFp_aes_hw_set_encrypt_key,%function
[ring 0.16.15] ^
[ring 0.16.15] /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:161:1: error: unknown directive
[ring 0.16.15] .size GFp_aes_hw_set_encrypt_key,.-GFp_aes_hw_set_encrypt_key
[ring 0.16.15] ^
[ring 0.16.15] /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:163:1: error: unknown directive
[ring 0.16.15] .hidden GFp_aes_hw_encrypt
[ring 0.16.15] ^
[ring 0.16.15] /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:164:1: error: unknown directive
[ring 0.16.15] .type GFp_aes_hw_encrypt,%function
[ring 0.16.15] ^
[ring 0.16.15] /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:191:1: error: unknown directive
[ring 0.16.15] .size GFp_aes_hw_encrypt,.-GFp_aes_hw_encrypt
[ring 0.16.15] ^
[ring 0.16.15] /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:193:1: error: unknown directive
[ring 0.16.15] .hidden GFp_aes_hw_decrypt
[ring 0.16.15] ^
[ring 0.16.15] /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:194:1: error: unknown directive
[ring 0.16.15] .type GFp_aes_hw_decrypt,%function
[ring 0.16.15] ^
[ring 0.16.15] /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:221:1: error: unknown directive
[ring 0.16.15] .size GFp_aes_hw_decrypt,.-GFp_aes_hw_decrypt
[ring 0.16.15] ^
[ring 0.16.15] /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:223:1: error: unknown directive
[ring 0.16.15] .hidden GFp_aes_hw_ctr32_encrypt_blocks
[ring 0.16.15] ^
[ring 0.16.15] /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:224:1: error: unknown directive
[ring 0.16.15] .type GFp_aes_hw_ctr32_encrypt_blocks,%function
[ring 0.16.15] ^
[ring 0.16.15] /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:403:1: error: unknown directive
[ring 0.16.15] .size GFp_aes_hw_ctr32_encrypt_blocks,.-GFp_aes_hw_ctr32_encrypt_blocks
[ring 0.16.15] ^
[ring 0.16.15] /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:407:19: error: unexpected token in '.section' directive
[ring 0.16.15] .section .note.GNU-stack,"",%progbits
[ring 0.16.15] ^
[ring 0.16.15] thread 'main' panicked at 'execution failed', /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/build.rs:664:9
[ring 0.16.15] note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: failed to run custom build command for `ring v0.16.15`
Caused by:
process didn't exit successfully: `/Users/dygear/deno/target/debug/build/ring-6754f2719fc74212/build-script-build` (exit code: 101)
--- stdout
OPT_LEVEL = Some("0")
TARGET = Some("aarch64-apple-darwin")
HOST = Some("aarch64-apple-darwin")
CC_aarch64-apple-darwin = None
CC_aarch64_apple_darwin = None
HOST_CC = None
CC = None
CFLAGS_aarch64-apple-darwin = None
CFLAGS_aarch64_apple_darwin = None
HOST_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("true")
CARGO_CFG_TARGET_FEATURE = Some("crc,crypto,fp,fp16,lse,neon,ras,rcpc,rdm,v8.1a,v8.2a,v8.3a")
--- stderr
ENV CARGO=/Users/dygear/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/cargo
ENV CARGO_CFG_TARGET_ARCH=aarch64
ENV CARGO_CFG_TARGET_ENDIAN=little
ENV CARGO_CFG_TARGET_ENV=
ENV CARGO_CFG_TARGET_FAMILY=unix
ENV CARGO_CFG_TARGET_FEATURE=crc,crypto,fp,fp16,lse,neon,ras,rcpc,rdm,v8.1a,v8.2a,v8.3a
ENV CARGO_CFG_TARGET_HAS_ATOMIC=128,16,32,64,8,ptr
ENV CARGO_CFG_TARGET_HAS_ATOMIC_EQUAL_ALIGNMENT=128,16,32,64,8,ptr
ENV CARGO_CFG_TARGET_HAS_ATOMIC_LOAD_STORE=128,16,32,64,8,ptr
ENV CARGO_CFG_TARGET_OS=macos
ENV CARGO_CFG_TARGET_POINTER_WIDTH=64
ENV CARGO_CFG_TARGET_THREAD_LOCAL=
ENV CARGO_CFG_TARGET_VENDOR=apple
ENV CARGO_CFG_UNIX=
ENV CARGO_FEATURE_ALLOC=1
ENV CARGO_FEATURE_DEFAULT=1
ENV CARGO_FEATURE_DEV_URANDOM_FALLBACK=1
ENV CARGO_FEATURE_ONCE_CELL=1
ENV CARGO_HOME=/Users/dygear/.cargo
ENV CARGO_MAKEFLAGS=--jobserver-fds=3,12 -j --jobserver-auth=3,12 -j
ENV CARGO_MANIFEST_DIR=/Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15
ENV CARGO_MANIFEST_LINKS=ring-asm
ENV CARGO_PKG_AUTHORS=Brian Smith <[email protected]>
ENV CARGO_PKG_DESCRIPTION=Safe, fast, small crypto using Rust.
ENV CARGO_PKG_HOMEPAGE=
ENV CARGO_PKG_LICENSE=
ENV CARGO_PKG_LICENSE_FILE=LICENSE
ENV CARGO_PKG_NAME=ring
ENV CARGO_PKG_REPOSITORY=https://github.com/briansmith/ring
ENV CARGO_PKG_VERSION=0.16.15
ENV CARGO_PKG_VERSION_MAJOR=0
ENV CARGO_PKG_VERSION_MINOR=16
ENV CARGO_PKG_VERSION_PATCH=15
ENV CARGO_PKG_VERSION_PRE=
ENV DEBUG=true
ENV DYLD_FALLBACK_LIBRARY_PATH=/Users/dygear/deno/target/debug/deps:/Users/dygear/deno/target/debug:/Users/dygear/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib:/Users/dygear/.rustup/toolchains/nightly-aarch64-apple-darwin/lib:/Users/dygear/lib:/usr/local/lib:/usr/lib
ENV HOME=/Users/dygear
ENV HOST=aarch64-apple-darwin
ENV LANG=en_US.UTF-8
ENV LC_ADDRESS=en_US.UTF-8
ENV LC_IDENTIFICATION=en_US.UTF-8
ENV LC_MEASUREMENT=en_US.UTF-8
ENV LC_MONETARY=en_US.UTF-8
ENV LC_NAME=en_US.UTF-8
ENV LC_NUMERIC=en_US.UTF-8
ENV LC_PAPER=en_US.UTF-8
ENV LC_TELEPHONE=en_US.UTF-8
ENV LC_TIME=en_US.UTF-8
ENV LOGNAME=dygear
ENV NUM_JOBS=8
ENV OLDPWD=/Users/dygear
ENV OPT_LEVEL=0
ENV OUT_DIR=/Users/dygear/deno/target/debug/build/ring-9b085abccc41b327/out
ENV PATH=/Users/dygear/.cargo/bin:/Users/dygear/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
ENV PROFILE=debug
ENV PWD=/Users/dygear/deno
ENV RUSTC=rustc
ENV RUSTDOC=rustdoc
ENV RUSTUP_HOME=/Users/dygear/.rustup
ENV RUSTUP_TOOLCHAIN=nightly-aarch64-apple-darwin
ENV RUST_RECURSION_COUNT=1
ENV SHELL=/bin/zsh
ENV SHLVL=1
ENV SSH_CLIENT=192.168.1.191 46322 22
ENV SSH_CONNECTION=192.168.1.191 46322 192.168.1.217 22
ENV SSH_TTY=/dev/ttys000
ENV TARGET=aarch64-apple-darwin
ENV TERM=xterm-256color
ENV TMPDIR=/var/folders/30/854r8_h92rz7f6cw1pdg6lfc0000gn/T/
ENV USER=dygear
ENV _=/Users/dygear/.cargo/bin/cargo
ENV __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
running "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-arch" "arm64" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-gfull" "-DNDEBUG" "-c" "-o/Users/dygear/deno/target/debug/build/ring-9b085abccc41b327/out/aesv8-armx-linux64.o" "/Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S"
/Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:18:17: error: unexpected token in '.section' directive
.section .rodata
^
/Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:28:1: error: unknown directive
.hidden GFp_aes_hw_set_encrypt_key
^
/Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:29:1: error: unknown directive
.type GFp_aes_hw_set_encrypt_key,%function
^
/Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:161:1: error: unknown directive
.size GFp_aes_hw_set_encrypt_key,.-GFp_aes_hw_set_encrypt_key
^
/Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:163:1: error: unknown directive
.hidden GFp_aes_hw_encrypt
^
/Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:164:1: error: unknown directive
.type GFp_aes_hw_encrypt,%function
^
/Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:191:1: error: unknown directive
.size GFp_aes_hw_encrypt,.-GFp_aes_hw_encrypt
^
/Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:193:1: error: unknown directive
.hidden GFp_aes_hw_decrypt
^
/Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:194:1: error: unknown directive
.type GFp_aes_hw_decrypt,%function
^
/Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:221:1: error: unknown directive
.size GFp_aes_hw_decrypt,.-GFp_aes_hw_decrypt
^
/Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:223:1: error: unknown directive
.hidden GFp_aes_hw_ctr32_encrypt_blocks
^
/Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:224:1: error: unknown directive
.type GFp_aes_hw_ctr32_encrypt_blocks,%function
^
/Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:403:1: error: unknown directive
.size GFp_aes_hw_ctr32_encrypt_blocks,.-GFp_aes_hw_ctr32_encrypt_blocks
^
/Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/pregenerated/aesv8-armx-linux64.S:407:19: error: unexpected token in '.section' directive
.section .note.GNU-stack,"",%progbits
^
thread 'main' panicked at 'execution failed', /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.15/build.rs:664:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
warning: trait objects without an explicit `dyn` are deprecated
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/buf_redux-0.8.4/src/lib.rs:373:45
|
373 | pub fn boxed<'a>(self) -> BufReader<Box<Read + 'a>, P> where R: 'a {
| ^^^^^^^^^ help: use `dyn`: `dyn Read + 'a`
|
= note: `#[warn(bare_trait_objects)]` on by default
warning: trait objects without an explicit `dyn` are deprecated
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/buf_redux-0.8.4/src/lib.rs:374:24
|
374 | let inner: Box<Read + 'a> = Box::new(self.inner);
| ^^^^^^^^^ help: use `dyn`: `dyn Read + 'a`
warning: trait objects without an explicit `dyn` are deprecated
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/buf_redux-0.8.4/src/lib.rs:871:32
|
871 | fn cause(&self) -> Option<&error::Error> {
| ^^^^^^^^^^^^ help: use `dyn`: `dyn error::Error`
warning: trait objects without an explicit `dyn` are deprecated
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/buf_redux-0.8.4/src/lib.rs:1273:42
|
1273 | static DROP_ERR_HANDLER: RefCell<Box<Fn(&mut Write, &mut Buffer, io::Error)>>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn Fn(&mut Write, &mut Buffer, io::Error)`
warning: trait objects without an explicit `dyn` are deprecated
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/buf_redux-0.8.4/src/lib.rs:1273:50
|
1273 | static DROP_ERR_HANDLER: RefCell<Box<Fn(&mut Write, &mut Buffer, io::Error)>>
| ^^^^^ help: use `dyn`: `dyn Write`
warning: trait objects without an explicit `dyn` are deprecated
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/buf_redux-0.8.4/src/lib.rs:1286:18
|
1286 | where F: Fn(&mut Write, &mut Buffer, io::Error)
| ^^^^^ help: use `dyn`: `dyn Write`
warning: use of deprecated associated function `std::error::Error::description`: use the Display impl or to_string()
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/buf_redux-0.8.4/src/lib.rs:868:9
|
868 | error::Error::description(self.error())
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
warning: use of deprecated function `std::mem::uninitialized`: use `mem::MaybeUninit` instead
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/encoding_rs-0.8.24/src/handles.rs:113:30
|
113 | let mut u: u16 = ::std::mem::uninitialized();
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
warning: variable does not need to be mutable
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/buf_redux-0.8.4/src/lib.rs:1050:17
|
1050 | let mut buf = unsafe { self.buf.write_buf() };
| ----^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
warning: variable does not need to be mutable
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/buf_redux-0.8.4/src/lib.rs:1068:17
|
1068 | let mut buf = self.buf.write_buf();
| ----^^^
| |
| help: remove this `mut`
warning: 9 warnings emitted
warning: 24 warnings emitted
warning: unused return value of `core::mem::replace` that must be used
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-decompressor-2.3.1/src/huffman/mod.rs:69:9
|
69 | / core::mem::replace(&mut self.htrees,
70 | | alloc_u32.alloc_cell(nt));
| |_____________________________________________________^
|
= note: `#[warn(unused_must_use)]` on by default
= note: if you don't need the old value, you can just assign the new value directly
warning: unused return value of `core::mem::replace` that must be used
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-decompressor-2.3.1/src/huffman/mod.rs:71:9
|
71 | / core::mem::replace(&mut self.codes,
72 | | alloc_hc.alloc_cell(nt * BROTLI_HUFFMAN_MAX_TABLE_SIZE as usize));
| |_____________________________________________________________________________________________^
|
= note: if you don't need the old value, you can just assign the new value directly
warning: unused return value of `core::mem::replace` that must be used
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-decompressor-2.3.1/src/decode.rs:1199:5
|
1199 | / mem::replace(&mut s.literal_hgroup.codes,
1200 | | mem::replace(&mut hcodes, AllocHC::AllocatedMemory::default()));
| |_________________________________________________________________________________^
|
= note: if you don't need the old value, you can just assign the new value directly
warning: unused return value of `core::mem::replace` that must be used
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-decompressor-2.3.1/src/decode.rs:1201:5
|
1201 | / mem::replace(&mut s.literal_hgroup.htrees,
1202 | | mem::replace(&mut htrees, AllocU32::AllocatedMemory::default()));
| |__________________________________________________________________________________^
|
= note: if you don't need the old value, you can just assign the new value directly
warning: unused return value of `core::mem::replace` that must be used
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-decompressor-2.3.1/src/decode.rs:1204:5
|
1204 | / mem::replace(&mut s.insert_copy_hgroup.codes,
1205 | | mem::replace(&mut hcodes, AllocHC::AllocatedMemory::default()));
| |_________________________________________________________________________________^
|
= note: if you don't need the old value, you can just assign the new value directly
warning: unused return value of `core::mem::replace` that must be used
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-decompressor-2.3.1/src/decode.rs:1206:5
|
1206 | / mem::replace(&mut s.insert_copy_hgroup.htrees,
1207 | | mem::replace(&mut htrees, AllocU32::AllocatedMemory::default()));
| |__________________________________________________________________________________^
|
= note: if you don't need the old value, you can just assign the new value directly
warning: unused return value of `core::mem::replace` that must be used
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-decompressor-2.3.1/src/decode.rs:1209:5
|
1209 | / mem::replace(&mut s.distance_hgroup.codes,
1210 | | mem::replace(&mut hcodes, AllocHC::AllocatedMemory::default()));
| |_________________________________________________________________________________^
|
= note: if you don't need the old value, you can just assign the new value directly
warning: unused return value of `core::mem::replace` that must be used
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-decompressor-2.3.1/src/decode.rs:1211:5
|
1211 | / mem::replace(&mut s.distance_hgroup.htrees,
1212 | | mem::replace(&mut htrees, AllocU32::AllocatedMemory::default()));
| |__________________________________________________________________________________^
|
= note: if you don't need the old value, you can just assign the new value directly
warning: unused return value of `core::mem::replace` that must be used
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-decompressor-2.3.1/src/decode.rs:1336:9
|
1336 | / mem::replace(&mut s.context_map_table,
1337 | | mem::replace(&mut local_context_map_table,
1338 | | AllocHC::AllocatedMemory::default()));
| |________________________________________________________________________^
|
= note: if you don't need the old value, you can just assign the new value directly
warning: unused return value of `core::mem::replace` that must be used
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-decompressor-2.3.1/src/decode.rs:1456:5
|
1456 | / mem::replace(&mut s.dist_context_map,
1457 | | mem::replace(&mut context_map_arg, AllocU8::AllocatedMemory::default()));
| |__________________________________________________________________________________________^
|
= note: if you don't need the old value, you can just assign the new value directly
warning: unused return value of `core::mem::replace` that must be used
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-decompressor-2.3.1/src/decode.rs:1460:5
|
1460 | / mem::replace(&mut s.context_map,
1461 | | mem::replace(&mut context_map_arg, AllocU8::AllocatedMemory::default()));
| |__________________________________________________________________________________________^
|
= note: if you don't need the old value, you can just assign the new value directly
warning: unused return value of `core::mem::replace` that must be used
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-decompressor-2.3.1/src/decode.rs:2596:3
|
2596 | / core::mem::replace(&mut s.literal_hgroup,
2597 | | core::mem::replace(&mut saved_literal_hgroup,
2598 | | HuffmanTreeGroup::<AllocU32, AllocHC>::default()));
| |___________________________________________________________________________________________^
|
= note: if you don't need the old value, you can just assign the new value directly
warning: unused return value of `core::mem::replace` that must be used
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-decompressor-2.3.1/src/decode.rs:2600:3
|
2600 | / core::mem::replace(&mut s.distance_hgroup,
2601 | | core::mem::replace(&mut saved_distance_hgroup,
2602 | | HuffmanTreeGroup::<AllocU32, AllocHC>::default()));
| |___________________________________________________________________________________________^
|
= note: if you don't need the old value, you can just assign the new value directly
warning: unused return value of `core::mem::replace` that must be used
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-decompressor-2.3.1/src/decode.rs:2604:3
|
2604 | / core::mem::replace(&mut s.insert_copy_hgroup,
2605 | | core::mem::replace(&mut saved_insert_copy_hgroup,
2606 | | HuffmanTreeGroup::<AllocU32, AllocHC>::default()));
| |___________________________________________________________________________________________^
|
= note: if you don't need the old value, you can just assign the new value directly
warning: unused return value of `core::mem::replace` that must be used
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-decompressor-2.3.1/src/decode.rs:2945:11
|
2945 | / mem::replace(&mut s.block_type_length_state.block_type_trees,
2946 | | new_huffman_table);
| |__________________________________________^
|
= note: if you don't need the old value, you can just assign the new value directly
warning: unused return value of `core::mem::replace` that must be used
--> /Users/dygear/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-decompressor-2.3.1/src/decode.rs:2964:11
|
2964 | / mem::replace(&mut s.block_type_length_state.block_len_trees,
2965 | | new_huffman_table);
| |__________________________________________^
|
= note: if you don't need the old value, you can just assign the new value directly
warning: 34 warnings emitted
warning: 18 warnings emitted
error: build failed
Looks like a dependency problem with ring v0.16.15
not liking the aarch64
or arm64
target for the apple darwin system.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Reopening, this is still relevant.
Just a though... but is there a Dockerfile that can do Linux platform builds on? If that was in place, would be possible to build, then pluck the executable from the image... with qemu/buildx can pretty easily target linux/amd64, linux/arm/v7 and linux/arm64 support... One stage for build, and another with the raw executable copied to /usr/local/bin/deno
Tried installing from source with cargo install deno --locked
on the latest Raspberry Pi 64-Bit OS on an 8 GB Raspberry Pi 400 last night.
It made it to the final step before erroring out. I didn't get the debug log because it was late, but I can repro if that's relevant to this thread.
I guess my question: would deno need to be compiled for the architecture before running that command or is that command all that's needed to get deno compiled from source?
Hi! I'm just chiming in that it'd be super sweet to have linux arm64 binaries. It'd make deploying deno
on RPIs so much easier.
Thank you for your work on this!
@tychi-nflx it should just work. However, you mention RPi OS; if i remember correctly, RPi OS doesnt have glibc (or an old version), and as such that wont work.
@crowlKats when i'd tried getting deno on RPi OS previously, it failed pretty early iirc. Afaik, this new release makes the os more debian than raspbian: https://www.raspberrypi.com/news/raspberry-pi-os-64-bit/
idk if that changes anything with glibc or not though. i'll give the install another try tonight and report back.
It builds fine on Raspberry Pi OS with 8GB. I had maintained a build set on my own website but one of the main devs started to keep a list and I stopped doing it as it’s a way more trusted resource to get it from an actual dev here.
If you want to build your own I recommend an 8GB Raspberry Pi 4, the 64bit Raspberry Pi OS (you can not compile for 32bit) and make a 2GB swap file. After all of these steps it takes about an hour and a half to compile as it used about 9GB of memory so it swaps out a lot to the SD card making it slow.
Sent from my iPhone
On Feb 8, 2022, at 12:18, tychi-nflx @.***> wrote:
@crowlKats when i'd tried getting deno on RPi OS previously, it failed pretty early iirc. Afaik, this new release makes the os more debian than raspbian: https://www.raspberrypi.com/news/raspberry-pi-os-64-bit/
idk if that changes anything with glibc or not though. i'll give the install another try tonight and report back.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.