The package rpms/xtensor.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/xtensor.git/commit/?id=e9a3c926c8fa6... https://src.fedoraproject.org/cgit/rpms/xtensor.git/commit/?id=2564d7d930119....
Change: +%ifarch s390x +ExcludeArch: ppc64le s390x
Thanks.
Full change: ============
commit e9a3c926c8fa65b70d10f74d7da4544d4ecf9092 Author: serge-sans-paille sguelton@redhat.com Date: Wed Oct 7 07:58:53 2020 +0000
Activate all architectures, fixing the remaining issues in the test suite
diff --git a/0001-Fix-xnpy-save-padding-computation.patch b/0001-Fix-xnpy-save-padding-computation.patch new file mode 100644 index 0000000..3c3921c Binary files /dev/null and b/0001-Fix-xnpy-save-padding-computation.patch differ diff --git a/disable_arch_native.patch b/disable_arch_native.patch new file mode 100644 index 0000000..450993b --- /dev/null +++ b/disable_arch_native.patch @@ -0,0 +1,21 @@ +diff -Naur xtensor-0.21.7.orig/test/CMakeLists.txt xtensor-0.21.7/test/CMakeLists.txt +--- xtensor-0.21.7.orig/test/CMakeLists.txt 2020-10-05 07:58:59.898264285 +0000 ++++ xtensor-0.21.7/test/CMakeLists.txt 2020-10-07 06:49:04.566990256 +0000 +@@ -63,7 +63,7 @@ + endif() + + if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "Intel" AND NOT WIN32)) +- if(NOT CMAKE_CXX_FLAGS MATCHES "-march") ++ if(NOT CMAKE_CXX_FLAGS MATCHES "-march" AND NOT CMAKE_CXX_FLAGS MATCHES "-mcpu") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") + endif() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_cxx_std_flag} -Wunused-parameter -Wextra -Wreorder -Wconversion -Wsign-conversion") +@@ -83,7 +83,7 @@ + endif() + elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + if(NOT WIN32) +- if(NOT CMAKE_CXX_FLAGS MATCHES "-march") ++ if(NOT CMAKE_CXX_FLAGS MATCHES "-march" AND NOT CMAKE_CXX_FLAGS MATCHES "-mcpu") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") + endif() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_cxx_std_flag} -Wunused-parameter -Wextra -Wreorder -Wconversion -Wsign-conversion") diff --git a/xtensor.spec b/xtensor.spec index 871498b..d47d845 100644 --- a/xtensor.spec +++ b/xtensor.spec @@ -2,7 +2,7 @@
Name: xtensor Version: 0.21.7 -Release: 2%{?dist} +Release: 3%{?dist} Summary: C++ tensors with broadcasting and lazy computing License: BSD URL: http://xtensor.readthedocs.io/ @@ -10,17 +10,16 @@ URL: http://xtensor.readthedocs.io/ %global github https://github.com/QuantStack/xtensor Source0: %{github}/archive/%{version}/%{name}-%{version}.tar.gz
-# because tests fail for these archs -ExcludeArch: ppc64le s390x - BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: gtest-devel BuildRequires: xtl-devel BuildRequires: xsimd-devel +BuildRequires: python3-numpy
Patch0: test_portability.patch - +Patch1: 0001-Fix-xnpy-save-padding-computation.patch +Patch2: disable_arch_native.patch
# there is no actual arched content - this is a header only library %global debug_package %{nil} @@ -50,6 +49,10 @@ Requires: xsimd-devel %prep %autosetup -p1
+%ifarch s390x +find -name '*.npy' -exec %{__python3} -c "import numpy as np; np.save('{}', np.load('{}').byteswap().newbyteorder())" ; +%endif + %build %cmake -DBUILD_TESTS=ON %cmake_build @@ -69,6 +72,9 @@ Requires: xsimd-devel %{_libdir}/pkgconfig/%{name}.pc
%changelog +* Tue Oct 06 2020 sguelton@redhat.com - 0.21.7-3 +- Activate all architectures, fixing the remaining issues in the test suite + * Mon Oct 05 2020 sguelton@redhat.com - 0.21.7-2 - Fix UB in upstream testsuite, see https://github.com/xtensor-stack/xtensor/pull/2175 - Activates armv7hl
commit 2564d7d930119fc82a716379659267012518e5bc Author: serge-sans-paille sguelton@redhat.com Date: Mon Oct 5 09:46:47 2020 +0000
Fix UB in upstream testsuite, see https://github.com/xtensor-stack/xtensor/pull/2175 Activates armv7hl
diff --git a/test_portability.patch b/test_portability.patch new file mode 100644 index 0000000..0591eae --- /dev/null +++ b/test_portability.patch @@ -0,0 +1,47 @@ +diff -Naur xtensor-0.21.7.orig/test/test_xoperation.cpp xtensor-0.21.7/test/test_xoperation.cpp +--- xtensor-0.21.7.orig/test/test_xoperation.cpp 2020-10-05 07:58:59.903264307 +0000 ++++ xtensor-0.21.7/test/test_xoperation.cpp 2020-10-05 08:41:21.127559227 +0000 +@@ -807,17 +807,18 @@ + TEST(operation, left_shift) + { + xarray<int> arr({5,1, 1000}); ++ xarray<int> arr2({2,1, 3}); + xarray<int> res1 = left_shift(arr, 4); +- xarray<int> res2 = left_shift(arr, arr); ++ xarray<int> res2 = left_shift(arr, arr2); + EXPECT_EQ(left_shift(arr, 4)(1), 16); + xarray<int> expected1 = {80, 16, 16000}; +- xarray<int> expected2 = {160, 2, 256000}; ++ xarray<int> expected2 = {20, 2, 8000}; + + EXPECT_EQ(expected1, res1); + EXPECT_EQ(expected2, res2); + + xarray<int> res3 = arr << 4; +- xarray<int> res4 = arr << arr; ++ xarray<int> res4 = arr << arr2; + EXPECT_EQ(expected1, res3); + EXPECT_EQ(expected2, res4); + } +@@ -825,17 +826,18 @@ + TEST(operation, right_shift) + { + xarray<int> arr({5,1, 1000}); ++ xarray<int> arr2({2,1, 3}); + xarray<int> res1 = right_shift(arr, 4); +- xarray<int> res2 = right_shift(arr, arr); ++ xarray<int> res2 = right_shift(arr, arr2); + EXPECT_EQ(right_shift(arr, 4)(1), 0); + xarray<int> expected1 = {0, 0, 62}; +- xarray<int> expected2 = {0, 0, 3}; ++ xarray<int> expected2 = {1, 0, 125}; + + EXPECT_EQ(expected1, res1); + EXPECT_EQ(expected2, res2); + + xarray<int> res3 = arr >> 4; +- xarray<int> res4 = arr >> arr; ++ xarray<int> res4 = arr >> arr2; + EXPECT_EQ(expected1, res3); + EXPECT_EQ(expected2, res4); + } diff --git a/xtensor.spec b/xtensor.spec index 5697f87..871498b 100644 --- a/xtensor.spec +++ b/xtensor.spec @@ -2,7 +2,7 @@
Name: xtensor Version: 0.21.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: C++ tensors with broadcasting and lazy computing License: BSD URL: http://xtensor.readthedocs.io/ @@ -11,7 +11,7 @@ URL: http://xtensor.readthedocs.io/ Source0: %{github}/archive/%{version}/%{name}-%{version}.tar.gz
# because tests fail for these archs -ExcludeArch: armv7hl ppc64le s390x +ExcludeArch: ppc64le s390x
BuildRequires: cmake BuildRequires: gcc-c++ @@ -19,6 +19,8 @@ BuildRequires: gtest-devel BuildRequires: xtl-devel BuildRequires: xsimd-devel
+Patch0: test_portability.patch +
# there is no actual arched content - this is a header only library %global debug_package %{nil} @@ -67,6 +69,10 @@ Requires: xsimd-devel %{_libdir}/pkgconfig/%{name}.pc
%changelog +* Mon Oct 05 2020 sguelton@redhat.com - 0.21.7-2 +- Fix UB in upstream testsuite, see https://github.com/xtensor-stack/xtensor/pull/2175 +- Activates armv7hl + * Sat Oct 3 2020 sguelton@redhat.com - 0.21.7-1 - Upstream version bump
arch-excludes@lists.fedoraproject.org