riscv64: fix build error
Self contained arrow version is 6.0.1 which has no RISC-V
support. The build error looks like:
CMake Error at cmake_modules/SetupCxxFlags.cmake:439 (message):
SSE4.2 required but compiler doesn't support it.
This commit is contained in:
parent
4b5928abc7
commit
37cdfe3032
41
9002-fix-riscv64-build.patch
Normal file
41
9002-fix-riscv64-build.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
diff --git a/src/arrow/cpp/cmake_modules/SetupCxxFlags.cmake b/src/arrow/cpp/cmake_modules/SetupCxxFlags.cmake
|
||||||
|
index c1a1ba0..84f224b 100644
|
||||||
|
--- a/src/arrow/cpp/cmake_modules/SetupCxxFlags.cmake
|
||||||
|
+++ b/src/arrow/cpp/cmake_modules/SetupCxxFlags.cmake
|
||||||
|
@@ -32,6 +32,8 @@ if(NOT DEFINED ARROW_CPU_FLAG)
|
||||||
|
set(ARROW_CPU_FLAG "ppc")
|
||||||
|
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
|
||||||
|
set(ARROW_CPU_FLAG "s390x")
|
||||||
|
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64")
|
||||||
|
+ set(ARROW_CPU_FLAG "riscv64")
|
||||||
|
else()
|
||||||
|
set(ARROW_CPU_FLAG "x86")
|
||||||
|
endif()
|
||||||
|
diff --git a/src/arrow/cpp/src/arrow/vendored/fast_float/float_common.h b/src/arrow/cpp/src/arrow/vendored/fast_float/float_common.h
|
||||||
|
index f7b7662..c1fe08d 100644
|
||||||
|
--- a/src/arrow/cpp/src/arrow/vendored/fast_float/float_common.h
|
||||||
|
+++ b/src/arrow/cpp/src/arrow/vendored/fast_float/float_common.h
|
||||||
|
@@ -10,7 +10,7 @@
|
||||||
|
|| defined(__MINGW64__) \
|
||||||
|
|| defined(__s390x__) \
|
||||||
|
|| (defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || defined(__PPC64LE__)) \
|
||||||
|
- || defined(__EMSCRIPTEN__))
|
||||||
|
+ || defined(__EMSCRIPTEN__) || defined(__riscv))
|
||||||
|
#define FASTFLOAT_64BIT
|
||||||
|
#elif (defined(__i386) || defined(__i386__) || defined(_M_IX86) \
|
||||||
|
|| defined(__arm__) \
|
||||||
|
diff --git a/src/common/Cycles.h b/src/common/Cycles.h
|
||||||
|
index b546479..14bc6bf 100644
|
||||||
|
--- a/src/common/Cycles.h
|
||||||
|
+++ b/src/common/Cycles.h
|
||||||
|
@@ -84,6 +84,10 @@ class Cycles {
|
||||||
|
uint64_t tsc;
|
||||||
|
asm volatile("stck %0" : "=Q" (tsc) : : "cc");
|
||||||
|
return tsc;
|
||||||
|
+#elif defined(__riscv) && __riscv_xlen == 64
|
||||||
|
+ uint64_t tsc;
|
||||||
|
+ asm volatile ("rdtime %0" : "=r" (tsc));
|
||||||
|
+ return tsc;
|
||||||
|
#else
|
||||||
|
#warning No high-precision counter available for your OS/arch
|
||||||
|
return 0;
|
||||||
12
ceph.spec
12
ceph.spec
@ -174,7 +174,7 @@
|
|||||||
#################################################################################
|
#################################################################################
|
||||||
Name: ceph
|
Name: ceph
|
||||||
Version: 18.2.2
|
Version: 18.2.2
|
||||||
Release: 3
|
Release: 4
|
||||||
%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
|
%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
%endif
|
%endif
|
||||||
@ -197,6 +197,10 @@ Patch2: 0002-fix-compilation-with-cython3.patch
|
|||||||
Patch3: 0003-fix-CVE-2023-46159.patch
|
Patch3: 0003-fix-CVE-2023-46159.patch
|
||||||
Patch4: 0004-fix-mds-metadata-lost-in-one-case.patch
|
Patch4: 0004-fix-mds-metadata-lost-in-one-case.patch
|
||||||
|
|
||||||
|
%ifarch riscv64
|
||||||
|
Patch9002: 9002-fix-riscv64-build.patch
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?suse_version}
|
%if 0%{?suse_version}
|
||||||
# _insert_obs_source_lines_here
|
# _insert_obs_source_lines_here
|
||||||
ExclusiveArch: x86_64 aarch64 ppc64le s390x
|
ExclusiveArch: x86_64 aarch64 ppc64le s390x
|
||||||
@ -275,7 +279,9 @@ BuildRequires: snappy-devel
|
|||||||
BuildRequires: sqlite-devel
|
BuildRequires: sqlite-devel
|
||||||
BuildRequires: sudo
|
BuildRequires: sudo
|
||||||
BuildRequires: pkgconfig(udev)
|
BuildRequires: pkgconfig(udev)
|
||||||
|
%ifarch %{valgrind_arches}
|
||||||
BuildRequires: valgrind-devel
|
BuildRequires: valgrind-devel
|
||||||
|
%endif
|
||||||
BuildRequires: which
|
BuildRequires: which
|
||||||
BuildRequires: xfsprogs-devel
|
BuildRequires: xfsprogs-devel
|
||||||
BuildRequires: xmlstarlet
|
BuildRequires: xmlstarlet
|
||||||
@ -2633,6 +2639,10 @@ exit 0
|
|||||||
%{_datadir}/snmp/mibs
|
%{_datadir}/snmp/mibs
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Sep 18 2024 laokz <zhangkai@iscas.ac.cn> - 2:18.2.2-4
|
||||||
|
- let BuildRequires:valgrind-devel depend on system arch macro
|
||||||
|
- fix riscv64 build
|
||||||
|
|
||||||
* Wed Apr 10 2024 cenhuilin <cenhuilin@kylinos.cn> - 2:18.2.2-3
|
* Wed Apr 10 2024 cenhuilin <cenhuilin@kylinos.cn> - 2:18.2.2-3
|
||||||
- mon: fix mds metadata lost in one case
|
- mon: fix mds metadata lost in one case
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user