diff --git a/boost-1.83-fix-no-member-named_that_error.patch b/boost-1.83-fix-no-member-named_that_error.patch new file mode 100644 index 0000000000000000000000000000000000000000..e3efd01776d7a252d77b902f97a9d8f88027b217 --- /dev/null +++ b/boost-1.83-fix-no-member-named_that_error.patch @@ -0,0 +1,24 @@ +From 49ccf9c30a0ca556873dbf64b12b0d741d1b3e66 Mon Sep 17 00:00:00 2001 +From: Arvid Norlander +Date: Fri, 8 Nov 2024 16:48:43 +0100 +Subject: [PATCH] Fix build on clang-19 (which checks more things in + uninstantiated templates) + +Fixes issue #402 +--- + include/boost/thread/future.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/boost/thread/future.hpp b/include/boost/thread/future.hpp +index 00f504b9b..d15d7ffa5 100644 +--- a/boost/thread/future.hpp ++++ b/boost/thread/future.hpp +@@ -4668,7 +4668,7 @@ namespace detail + } + run_it& operator=(BOOST_THREAD_RV_REF(run_it) x) BOOST_NOEXCEPT { + if (this != &x) { +- that_=x.that; ++ that_=x.that_; + x.that_.reset(); + } + return *this; diff --git a/boost-1.83.0-fix-linking-order.patch b/boost-1.83.0-fix-linking-order.patch new file mode 100644 index 0000000000000000000000000000000000000000..11bd08ab4da23a7e2e76a4fcd42d5b0ee8abd083 --- /dev/null +++ b/boost-1.83.0-fix-linking-order.patch @@ -0,0 +1,31 @@ +From aa9f658786a66ed2e69a32e13f432f19384ed495 Mon Sep 17 00:00:00 2001 +From: Funda Wang +Date: Sat, 21 Jun 2025 13:44:20 +0800 +Subject: [PATCH] fix linking order + +--- + tools/build/src/tools/gcc.jam | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam +index 834f5e1bf..1884dd6bc 100644 +--- a/tools/build/src/tools/gcc.jam ++++ b/tools/build/src/tools/gcc.jam +@@ -1035,12 +1035,12 @@ rule link.dll ( targets * : sources * : properties * ) + + actions link bind LIBRARIES + { +- "$(CONFIG_COMMAND)" @($(<[1]:T).rsp:O=FC:<=@":>=":E=-L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,$(RPATH) -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP) "$(>:T)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)) ++ "$(CONFIG_COMMAND)" @($(<[1]:T).rsp:O=FC:<=@":>=":E=$(OPTIONS) $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" $(START-GROUP) "$(>:T)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP)) + } + + actions link.dll bind LIBRARIES + { +- "$(CONFIG_COMMAND)" @($(<[1]:T).rsp:O=FC:<=@":>=":E=-L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,$(RPATH) -Wl,$(IMPLIB_OPTION:E=--out-implib),"$(<[2])" -o "$(<[1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,"$(SONAME_PREFIX:E=)$(<[1]:D=)" $(SHARED_OPTION:E=-shared) $(START-GROUP) "$(>:T)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)) ++ "$(CONFIG_COMMAND)" @($(<[1]:T).rsp:O=FC:<=@":>=":E=$(OPTIONS) $(USER_OPTIONS) -L"$(LINKPATH)" -Wl,$(IMPLIB_OPTION:E=--out-implib),"$(<[2])" -o "$(<[1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,"$(SONAME_PREFIX:E=)$(<[1]:D=)" $(SHARED_OPTION:E=-shared) $(START-GROUP) "$(>:T)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP)) + } + + ### +-- +2.47.1 + diff --git a/boost-Compare-pointers-directly-instead-of-using-PyArray_EquivTypes.patch b/boost-Compare-pointers-directly-instead-of-using-PyArray_EquivTypes.patch new file mode 100644 index 0000000000000000000000000000000000000000..687cd10820c0b894f73719df2360880640fded18 --- /dev/null +++ b/boost-Compare-pointers-directly-instead-of-using-PyArray_EquivTypes.patch @@ -0,0 +1,51 @@ +From 99a5352b5cf790c559a7b976c1ba99520431d9d1 Mon Sep 17 00:00:00 2001 +From: "Billy K. Poon" +Date: Mon, 15 Jul 2024 15:48:38 -0700 +Subject: [PATCH 02/02] Another fix for numpy 2.0 + +- Compare pointers directly instead of using PyArray_EquivTypes +--- + src/numpy/dtype.cpp | 27 +-------------------------- + 1 file changed, 1 insertion(+), 26 deletions(-) + +diff --git a/libs/python/src/numpy/dtype.cpp b/libs/python/src/numpy/dtype.cpp +index da30d192..1ce8c6ec 100644 +--- a/libs/python/src/numpy/dtype.cpp ++++ b/libs/python/src/numpy/dtype.cpp +@@ -107,32 +107,7 @@ int dtype::get_itemsize() const { + } + + bool equivalent(dtype const & a, dtype const & b) { +- // On Windows x64, the behaviour described on +- // http://docs.scipy.org/doc/numpy/reference/c-api.array.html for +- // PyArray_EquivTypes unfortunately does not extend as expected: +- // "For example, on 32-bit platforms, NPY_LONG and NPY_INT are equivalent". +- // This should also hold for 64-bit platforms (and does on Linux), but not +- // on Windows. Implement an alternative: +-#ifdef _MSC_VER +- if (sizeof(long) == sizeof(int) && +- // Manually take care of the type equivalence. +- ((a == dtype::get_builtin() || a == dtype::get_builtin()) && +- (b == dtype::get_builtin() || b == dtype::get_builtin()) || +- (a == dtype::get_builtin() || a == dtype::get_builtin()) && +- (b == dtype::get_builtin() || b == dtype::get_builtin()))) { +- return true; +- } else { +- return PyArray_EquivTypes( +- reinterpret_cast(a.ptr()), +- reinterpret_cast(b.ptr()) +- ); +- } +-#else +- return PyArray_EquivTypes( +- reinterpret_cast(a.ptr()), +- reinterpret_cast(b.ptr()) +- ); +-#endif ++ return a == b; + } + + namespace +-- +2.47.1 + diff --git a/boost-1.85.0-python-numpy-2.patch b/boost-Support-numpy-2.0.0b1.patch similarity index 74% rename from boost-1.85.0-python-numpy-2.patch rename to boost-Support-numpy-2.0.0b1.patch index e7a7d98b8573a05062fcc5c32772c6d79801516c..a103babe57781d9a0cf3cedbbd337bfc4f352c8d 100644 --- a/boost-1.85.0-python-numpy-2.patch +++ b/boost-Support-numpy-2.0.0b1.patch @@ -1,12 +1,14 @@ -https://bugs.gentoo.org/932459 -https://github.com/boostorg/python/issues/431 -https://github.com/boostorg/python/pull/432 - -From 33ac06ca59a68266d3d26edf08205d31ddab4a6c Mon Sep 17 00:00:00 2001 +From 0474de0f6cc9c6e7230aeb7164af2f7e4ccf74bf Mon Sep 17 00:00:00 2001 From: Alexis DUBURCQ Date: Fri, 15 Mar 2024 14:10:16 +0100 Subject: [PATCH] Support numpy 2.0.0b1 +--- + src/numpy/dtype.cpp | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/libs/python/src/numpy/dtype.cpp b/libs/python/src/numpy/dtype.cpp +index 88a20a27..da30d192 100644 --- a/libs/python/src/numpy/dtype.cpp +++ b/libs/python/src/numpy/dtype.cpp @@ -98,7 +98,13 @@ python::detail::new_reference dtype::convert(object const & arg, bool align) @@ -24,3 +26,5 @@ Subject: [PATCH] Support numpy 2.0.0b1 bool equivalent(dtype const & a, dtype const & b) { // On Windows x64, the behaviour described on +-- +2.47.1 diff --git a/boost.spec b/boost.spec index 88bf04bdfe9f454395b07936892b362efa99cd44..f63a708a843f80d83832b2de5ac312f0edd39ca8 100644 --- a/boost.spec +++ b/boost.spec @@ -2,12 +2,13 @@ Name: boost Version: 1.83.0 -Release: 7 +Release: 8 Summary: The free peer-reviewed portable C++ source libraries License: BSL-1.0 URL: https://www.boost.org Source0: https://archives.boost.io/release/%{version}/source/boost_%{version_enc}.tar.bz2 +Patch0: boost-1.83.0-fix-linking-order.patch # These following patches have been merged into boost develop branch # Remove them at the next release # https://github.com/boostorg/graph/pull/318 @@ -21,7 +22,11 @@ Patch5: boost-1.81-phoenix-Update-avoid-placeholders-uarg1.10-ODR-violates.patch # https://lists.boost.org/Archives/boost/2020/04/248812.php Patch6: boost-1.73.0-cmakedir.patch # https://github.com/boostorg/python/pull/432 -Patch7: boost-1.85.0-python-numpy-2.patch +Patch7: boost-Support-numpy-2.0.0b1.patch +# https://github.com/boostorg/python/pull/443 +Patch8: boost-Compare-pointers-directly-instead-of-using-PyArray_EquivTypes.patch +# https://github.com/boostorg/thread/pull/408 +Patch9: boost-1.83-fix-no-member-named_that_error.patch Requires: %{name}-atomic%{?_isa} = %{version}-%{release} Requires: %{name}-chrono%{?_isa} = %{version}-%{release} @@ -155,7 +160,6 @@ JSON parsing, serialization, and DOM in C++11 %package locale Summary: Run-time component for boost locale. -Requires: boost-chrono%{?_isa} = %{version}-%{release} Requires: boost-thread%{?_isa} = %{version}-%{release} %description locale @@ -242,7 +246,6 @@ Event timer, progress timer, and progress display classes. %package type_erasure Summary: Run-time component for boost type-erasure. -Requires: boost-chrono%{?_isa} = %{version}-%{release} %description type_erasure Runtime polymorphism based on concepts. @@ -255,8 +258,6 @@ A library for parsing, modifying, and printing URLs using only C++11. %package wave Summary: Run-time component for boost wave. -Requires: boost-chrono%{?_isa} = %{version}-%{release} -Requires: boost-filesystem%{?_isa} = %{version}-%{release} Requires: boost-thread%{?_isa} = %{version}-%{release} %description wave @@ -265,7 +266,7 @@ An implementation of the mandated C99/C++ preprocessor functionality. %package devel Summary: The Boost C++ headers, shared and static development libraries Requires: boost%{?_isa} = %{version}-%{release} -Provides: boost-static +Provides: boost-static = %{version}-%{release} Obsoletes: boost-static < %{version} %description devel @@ -292,7 +293,7 @@ as that on the Boost web page (http://www.boost.org/doc/libs/%{version_enc}). %define opt_libs --without-mpi --without-graph_parallel %define b2_options %{opt_build} %{opt_feature} %{opt_libs} %define boost_macros define=BOOST_NO_AUTO_PTR define=BOOST_STATECHART_USE_NATIVE_RTTI -./b2 %{b2_options} cxxflags="$RPM_OPT_FLAGS" %{boost_macros} +./b2 %{b2_options} cxxflags="%{build_cxxflags}" linkflags="%{build_ldflags}" %{boost_macros} %check (cd status @@ -459,6 +460,11 @@ find libs -name example -exec cp {} boost-example --parents -r \; %{_libdir}/cmake/* %changelog +* Thu Jun 19 2025 Funda Wang - 1.83.0-8 +- add more patch for numpy 2 +- fix build with clang 19 +- fix linking order (and drop rpath), so that ldflags could be applied correctly + * Thu Jun 19 2025 Funda Wang - 1.83.0-7 - fix build with numpy 2