Could you provide an ARM64 version in a next release ?
Thanks.
It looks like rust-cross can help with cross-compiling for ARM — the next time I make a new release I’ll see what I can do.
I'm was looking for a version to run on my RBPi 3B+.
I boot up a Ubuntu Docker Image(docker run -it ubuntu /bin/bash) and run:
apt update
apt install -y git curl gcc-arm-linux-gnueabihf
pushd /usr/local/src && git clone https://github.com/ogham/exa.git && popd
curl https://sh.rustup.rs -sSf | sh
export PATH=$PATH:/root/.cargo/bin
rustup target add armv7-unknown-linux-gnueabihf
cat >>/root/.cargo/config <<EOF
[target.armv7-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc"
EOF
cd /usr/local/src/exa
cargo build --release --no-default-features --features "default" --target=armv7-unknown-linux-gnueabihf
The binary will be in target/armv7-unknown-linux-gnueabihf/release folder:
$ file target/armv7-unknown-linux-gnueabihf/release/exa
target/armv7-unknown-linux-gnueabihf/release/exa: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-, for GNU/Linux 3.2.0, BuildID[sha1]=071f9344646fa0987b828ef0d22dc6a6938c119a, with debug_info, not stripped
Hope it helps.
Came here looking for an ARM release for the Pinebook Pro. I'll try compiling it tomorrow.
Easier method using @messense docker images for cross compiling:
# Clone exa
cd /tmp && git clone https://github.com/ogham/exa.git && cd exa
# Build using Cocker
docker run --rm -it -v "$(pwd)":/home/rust/src \
messense/rust-musl-cross:armv7-musleabihf \
cargo build --release --no-default-features --features "default"
@0x3333 I just tried that on my RasPi and got this:
$ docker run --rm -it -v "$(pwd)":/home/rust/src \
> messense/rust-musl-cross:armv7-musleabihf \
> cargo build --release --no-default-features --features "default"
Unable to find image 'messense/rust-musl-cross:armv7-musleabihf' locally
armv7-musleabihf: Pulling from messense/rust-musl-cross
0a01a72a686c: Pull complete
cc899a5544da: Pull complete
19197c550755: Pull complete
716d454e56b6: Pull complete
0a77a23e0dee: Pull complete
bbff17155c2b: Pull complete
612c3a644b80: Pull complete
8519af83d421: Pull complete
326a732d16f5: Pull complete
7a257df52adb: Pull complete
3ce39ca01a36: Pull complete
0dd626b267ed: Pull complete
Digest: sha256:cd4e4cbce6d8b1b0f21eb14925e1b444e4ed3c80d77069f165725b62c8b45779
Status: Downloaded newer image for messense/rust-musl-cross:armv7-musleabihf
standard_init_linux.go:211: exec user process caused "exec format error"
Any idea what's going here?
Has anybody got a static binary compiled on ARM that they could share?
@eggbean, my command is to cross-compile exa for Pi on an x86 machine... I just run it and it worked flawless.
Cloning into 'exa'...
remote: Enumerating objects: 6903, done.
remote: Total 6903 (delta 0), reused 0 (delta 0), pack-reused 6903
Receiving objects: 100% (6903/6903), 3.24 MiB | 4.11 MiB/s, done.
Resolving deltas: 100% (4917/4917), done.
Updating crates.io index
Downloaded number_prefix v0.3.0
Downloaded unicode-width v0.1.5
Downloaded log v0.4.7
Downloaded datetime v0.4.7
Downloaded scoped_threadpool v0.1.9
Downloaded term_size v0.3.1
Downloaded libc v0.2.60
Downloaded zoneinfo_compiled v0.4.8
Downloaded users v0.9.1
Downloaded natord v1.0.9
Downloaded ansi_term v0.12.0
Downloaded glob v0.3.0
Downloaded locale v0.2.2
Downloaded lazy_static v1.3.0
Downloaded term_grid v0.1.7
Downloaded num_cpus v1.10.1
Downloaded env_logger v0.6.2
Downloaded byteorder v1.3.2
Downloaded pad v0.1.5
Downloaded iso8601 v0.1.1
Downloaded num-traits v0.1.43
Downloaded cfg-if v0.1.9
Downloaded atty v0.2.13
Downloaded termcolor v1.0.5
Downloaded regex v1.1.9
Downloaded humantime v1.2.0
Downloaded num-traits v0.2.8
Downloaded aho-corasick v0.7.4
Downloaded regex-syntax v0.6.8
Downloaded git2 v0.9.1
Downloaded url v1.7.2
Downloaded memchr v2.2.1
Downloaded utf8-ranges v1.0.3
Downloaded thread_local v0.3.6
Downloaded bitflags v1.1.0
Downloaded autocfg v0.1.5
Downloaded quick-error v1.2.2
Downloaded ucd-util v0.1.3
Downloaded nom v1.2.4
Downloaded percent-encoding v1.0.1
Downloaded idna v0.1.5
Downloaded unicode-bidi v0.3.4
Downloaded unicode-normalization v0.1.8
Downloaded matches v0.1.8
Downloaded libgit2-sys v0.8.1
Downloaded smallvec v0.6.10
Downloaded libz-sys v1.0.25
Downloaded pkg-config v0.3.14
Downloaded cc v1.0.37
Compiling libc v0.2.60
Compiling autocfg v0.1.5
Compiling pkg-config v0.3.14
Compiling cc v1.0.37
Compiling memchr v2.2.1
Compiling log v0.4.7
Compiling matches v0.1.8
Compiling unicode-width v0.1.5
Compiling nom v1.2.4
Compiling smallvec v0.6.10
Compiling byteorder v1.3.2
Compiling lazy_static v1.3.0
Compiling bitflags v1.1.0
Compiling ucd-util v0.1.3
Compiling regex v1.1.9
Compiling cfg-if v0.1.9
Compiling percent-encoding v1.0.1
Compiling quick-error v1.2.2
Compiling utf8-ranges v1.0.3
Compiling termcolor v1.0.5
Compiling natord v1.0.9
Compiling glob v0.3.0
Compiling scoped_threadpool v0.1.9
Compiling number_prefix v0.3.0
Compiling ansi_term v0.12.0
Compiling num-traits v0.2.8
Compiling unicode-bidi v0.3.4
Compiling pad v0.1.5
Compiling term_grid v0.1.7
Compiling unicode-normalization v0.1.8
Compiling iso8601 v0.1.1
Compiling thread_local v0.3.6
Compiling regex-syntax v0.6.8
Compiling humantime v1.2.0
Compiling libz-sys v1.0.25
Compiling libgit2-sys v0.8.1
Compiling idna v0.1.5
Compiling locale v0.2.2
Compiling atty v0.2.13
Compiling num_cpus v1.10.1
Compiling users v0.9.1
Compiling term_size v0.3.1
Compiling aho-corasick v0.7.4
Compiling url v1.7.2
Compiling num-traits v0.1.43
Compiling datetime v0.4.7
Compiling env_logger v0.6.2
Compiling exa v0.9.0 (/home/rust/src)
Compiling zoneinfo_compiled v0.4.8
Compiling git2 v0.9.1
Finished release [optimized] target(s) in 3m 42s
Thanks, I misread. I didn't even realise that was possible. Cheers.
@0x3333 Do you have this issue?
@eggbean, yes I do have it...
@eggbean if you're looking for an armhf binary, it is actually available in debian repositories, although the version that they have is 0.8.0-2. For arm64 I had to compile it myself. I did it on a target machine and it worked, but I forgot to save the deb package that I made with cargo deb
I can still upload the exa binary directly from my path if you (or anyone else) need/s it, but you may need to resolve some dependencies.
@ickam Cross-compiling it using the method 0x3333 explained worked fine. Cheers.
Most helpful comment
It looks like rust-cross can help with cross-compiling for ARM — the next time I make a new release I’ll see what I can do.