From c2ccc7344b3f28eb57e311f4a37deb431d486a83 Mon Sep 17 00:00:00 2001 From: "Peter M. Stahl" Date: Tue, 5 Mar 2024 21:20:58 +0100 Subject: [PATCH] Try to fix build for ARM64 Linux --- .cargo/config.toml | 17 +++++++++++++++++ .github/workflows/release.yml | 8 ++++++-- .github/workflows/rust-build.yml | 4 ---- Cargo.toml | 5 +---- README.md | 4 ++-- 5 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 00000000..31c00e80 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,17 @@ +# +# Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com +# +# Licensed 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 expressed or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[target.aarch64-unknown-linux-gnu] +linker = "aarch64-linux-gnu-gcc" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dd60f693..2ae2aa47 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,8 +33,8 @@ jobs: include: - os: ubuntu-latest name: Rust Release Build on Linux - x86_64-target: x86_64-unknown-linux-musl - aarch64-target: aarch64-unknown-linux-musl + x86_64-target: x86_64-unknown-linux-gnu + aarch64-target: aarch64-unknown-linux-gnu - os: macos-latest name: Rust Release Build on MacOS @@ -50,6 +50,10 @@ jobs: - name: Check out repository uses: actions/checkout@v4 + - name: Install gcc-aarch64-linux-gnu + if: ${{ matrix.os == 'ubuntu-latest' }} + run: sudo apt-get install gcc-aarch64-linux-gnu + - name: Add rustup x86_64 target run: rustup target add ${{ matrix.x86_64-target }} diff --git a/.github/workflows/rust-build.yml b/.github/workflows/rust-build.yml index b9b78093..1755e175 100644 --- a/.github/workflows/rust-build.yml +++ b/.github/workflows/rust-build.yml @@ -67,10 +67,6 @@ jobs: - name: Add rustup target run: rustup target add ${{ matrix.target }} - - name: Install MUSL tools for Linux - if: ${{ matrix.os == 'ubuntu-latest' }} - run: sudo apt-get install musl-tools libssl-dev - - name: Store or retrieve cargo caches uses: actions/cache@v4 with: diff --git a/Cargo.toml b/Cargo.toml index 24174501..ade92470 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,4 @@ +# # Copyright © 2019-today Peter M. Stahl pemistahl@gmail.com # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -62,10 +63,6 @@ tempfile = "3.10.1" [target.'cfg(target_family = "wasm")'.dev-dependencies] wasm-bindgen-test = "0.3.42" -[target.aarch64-unknown-linux-musl] -linker = "aarch64-linux-gnu-gcc" -rustflags = ["-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc"] - [features] default = ["cli"] cli = ["clap"] diff --git a/README.md b/README.md index fc412c19..613f68d6 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ [![pypi](https://img.shields.io/badge/PYPI-v1.0.1-blue?logo=PyPI&logoColor=yellow)](https://pypi.org/project/grex) [![license](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0) - [![Linux 64-bit Download](https://img.shields.io/badge/Linux%2064bit%20Download-v1.4.5-blue?logo=Linux)](https://github.com/pemistahl/grex/releases/download/v1.4.5/grex-v1.4.5-x86_64-unknown-linux-musl.tar.gz) - [![Linux ARM64 Download](https://img.shields.io/badge/Linux%20ARM64%20Download-v1.4.5-blue?logo=Linux)](https://github.com/pemistahl/grex/releases/download/v1.4.5/grex-v1.4.5-aarch64-unknown-linux-musl.tar.gz) + [![Linux 64-bit Download](https://img.shields.io/badge/Linux%2064bit%20Download-v1.4.5-blue?logo=Linux)](https://github.com/pemistahl/grex/releases/download/v1.4.5/grex-v1.4.5-x86_64-unknown-linux-gnu.tar.gz) + [![Linux ARM64 Download](https://img.shields.io/badge/Linux%20ARM64%20Download-v1.4.5-blue?logo=Linux)](https://github.com/pemistahl/grex/releases/download/v1.4.5/grex-v1.4.5-aarch64-unknown-linux-gnu.tar.gz) [![MacOS 64-bit Download](https://img.shields.io/badge/macOS%2064bit%20Download-v1.4.5-blue?logo=Apple)](https://github.com/pemistahl/grex/releases/download/v1.4.5/grex-v1.4.5-x86_64-apple-darwin.tar.gz) [![MacOS ARM64 Download](https://img.shields.io/badge/macOS%20ARM64%20Download-v1.4.5-blue?logo=Apple)](https://github.com/pemistahl/grex/releases/download/v1.4.5/grex-v1.4.5-aarch64-apple-darwin.tar.gz)