mirror of
https://github.com/rustfs/rustfs.git
synced 2026-03-17 14:24:08 +00:00
fix: build error on loongarch64 (#904)
Co-authored-by: houseme <housemecn@gmail.com> Co-authored-by: 安正超 <anzhengchao@gmail.com> Co-authored-by: 0xdx2 <xuedamon2@gmail.com>
This commit is contained in:
@@ -31,7 +31,7 @@ detect_platform() {
|
|||||||
echo "armv7-unknown-linux-gnueabihf"
|
echo "armv7-unknown-linux-gnueabihf"
|
||||||
;;
|
;;
|
||||||
"loongarch64")
|
"loongarch64")
|
||||||
echo "loongarch64-unknown-linux-musl"
|
echo "loongarch64-unknown-linux-gnu"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "unknown-platform"
|
echo "unknown-platform"
|
||||||
@@ -126,6 +126,7 @@ usage() {
|
|||||||
echo " Supported platforms:"
|
echo " Supported platforms:"
|
||||||
echo " x86_64-unknown-linux-gnu"
|
echo " x86_64-unknown-linux-gnu"
|
||||||
echo " aarch64-unknown-linux-gnu"
|
echo " aarch64-unknown-linux-gnu"
|
||||||
|
echo " loongarch64-unknown-linux-gnu"
|
||||||
echo " armv7-unknown-linux-gnueabihf"
|
echo " armv7-unknown-linux-gnueabihf"
|
||||||
echo " x86_64-unknown-linux-musl"
|
echo " x86_64-unknown-linux-musl"
|
||||||
echo " aarch64-unknown-linux-musl"
|
echo " aarch64-unknown-linux-musl"
|
||||||
|
|||||||
21
rustfs.spec
21
rustfs.spec
@@ -2,12 +2,12 @@
|
|||||||
%global _empty_manifest_terminate_build 0
|
%global _empty_manifest_terminate_build 0
|
||||||
Name: rustfs
|
Name: rustfs
|
||||||
Version: 1.0.0
|
Version: 1.0.0
|
||||||
Release: alpha.36%{?dist}
|
Release: alpha.81
|
||||||
Summary: High-performance distributed object storage for MinIO alternative
|
Summary: High-performance distributed object storage for MinIO alternative
|
||||||
|
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
URL: https://github.com/rustfs/rustfs
|
URL: https://github.com/rustfs/rustfs
|
||||||
Source0: https://github.com/rustfs/rustfs/archive/refs/tags/%{version}.tar.gz
|
Source0: https://github.com/rustfs/rustfs/archive/refs/tags/%{version}-%{release}.tar.gz
|
||||||
|
|
||||||
BuildRequires: cargo
|
BuildRequires: cargo
|
||||||
BuildRequires: rust
|
BuildRequires: rust
|
||||||
@@ -21,7 +21,6 @@ BuildRequires: gtk3-devel
|
|||||||
BuildRequires: libsoup-devel
|
BuildRequires: libsoup-devel
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: clang-devel
|
BuildRequires: clang-devel
|
||||||
BuildRequires: webkit2gtk4.1-devel >= 2.40
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
RustFS is a high-performance distributed object storage software built using Rust, one of the most popular languages worldwide. Along with MinIO, it shares a range of advantages such as simplicity, S3 compatibility, open-source nature, support for data lakes, AI, and big data. Furthermore, it has a better and more user-friendly open-source license in comparison to other storage systems, being constructed under the Apache license. As Rust serves as its foundation, RustFS provides faster speed and safer distributed features for high-performance object storage.
|
RustFS is a high-performance distributed object storage software built using Rust, one of the most popular languages worldwide. Along with MinIO, it shares a range of advantages such as simplicity, S3 compatibility, open-source nature, support for data lakes, AI, and big data. Furthermore, it has a better and more user-friendly open-source license in comparison to other storage systems, being constructed under the Apache license. As Rust serves as its foundation, RustFS provides faster speed and safer distributed features for high-performance object storage.
|
||||||
@@ -34,7 +33,7 @@ RustFS is a high-performance distributed object storage software built using Rus
|
|||||||
export CMAKE=$(which cmake3)
|
export CMAKE=$(which cmake3)
|
||||||
%ifarch x86_64 || aarch64 || loongarch64
|
%ifarch x86_64 || aarch64 || loongarch64
|
||||||
TARGET_DIR="target/%_arch"
|
TARGET_DIR="target/%_arch"
|
||||||
PLATFORM=%_arch-unknown-linux-musl
|
PLATFORM=%_arch-unknown-linux-gnu
|
||||||
%else
|
%else
|
||||||
TARGET_DIR="target/unknown"
|
TARGET_DIR="target/unknown"
|
||||||
PLATFORM=unknown-platform
|
PLATFORM=unknown-platform
|
||||||
@@ -42,11 +41,15 @@ export CMAKE=$(which cmake3)
|
|||||||
|
|
||||||
# Set CARGO_TARGET_DIR and build the project
|
# Set CARGO_TARGET_DIR and build the project
|
||||||
#CARGO_TARGET_DIR=$TARGET_DIR RUSTFLAGS="-C link-arg=-fuse-ld=mold" cargo build --release --package rustfs
|
#CARGO_TARGET_DIR=$TARGET_DIR RUSTFLAGS="-C link-arg=-fuse-ld=mold" cargo build --release --package rustfs
|
||||||
CARGO_TARGET_DIR=$TARGET_DIR RUSTFLAGS="-C link-arg=-fuse-ld=mold" cargo build --release --target $PLATFORM -p rustfs --bins
|
%ifarch loongarch64
|
||||||
|
CFLAGS="-mcmodel=medium" CARGO_TARGET_DIR=$TARGET_DIR RUSTFLAGS="-C link-arg=-fuse-ld=mold -C link-arg=-lm" cargo build --release --target $PLATFORM -p rustfs --bins
|
||||||
|
%else
|
||||||
|
CARGO_TARGET_DIR=$TARGET_DIR RUSTFLAGS="-C link-arg=-fuse-ld=mold -C link-arg=-lm" cargo build --release --target $PLATFORM -p rustfs --bins
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %buildroot/usr/bin/
|
mkdir -p %buildroot/usr/bin/
|
||||||
install %_builddir/%{name}-%{version}-%{release}/target/%_arch/$PLATFORM/release/rustfs %buildroot/usr/bin/
|
install %_builddir/%{name}-%{version}-%{release}/target/%_arch/%_arch-unknown-linux-gnu/release/rustfs %buildroot/usr/bin/
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
@@ -54,5 +57,11 @@ install %_builddir/%{name}-%{version}-%{release}/target/%_arch/$PLATFORM/release
|
|||||||
%_bindir/rustfs
|
%_bindir/rustfs
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jan 28 2026 houseme <housemecn@gmail.com>
|
||||||
|
- Initial RPM package for RustFS 1.0.0-alpha.81
|
||||||
|
|
||||||
|
* Thu Nov 20 2025 Wenlong Zhang <zhangwenlong@loongson.cn>
|
||||||
|
- Initial RPM package for RustFS 1.0.0-alpha.69
|
||||||
|
|
||||||
* Tue Jul 08 2025 Wenlong Zhang <zhangwenlong@loongson.cn>
|
* Tue Jul 08 2025 Wenlong Zhang <zhangwenlong@loongson.cn>
|
||||||
- Initial RPM package for RustFS 1.0.0-alpha.36
|
- Initial RPM package for RustFS 1.0.0-alpha.36
|
||||||
|
|||||||
Reference in New Issue
Block a user