diff --git a/boost-1.64.0-config-cuda-version.patch b/boost-1.64.0-config-cuda-version.patch new file mode 100644 index 0000000..bf91c4b --- /dev/null +++ b/boost-1.64.0-config-cuda-version.patch @@ -0,0 +1,86 @@ +From 17a4997aaa05ce92237c73c82e6d8fb475a0abaf Mon Sep 17 00:00:00 2001 +From: jzmaddock +Date: Fri, 11 Aug 2017 19:38:00 +0100 +Subject: [PATCH 1/2] Update for CUDA version macro changes. + +--- + include/boost/config/compiler/nvcc.hpp | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +diff --git a/include/boost/config/compiler/nvcc.hpp b/include/boost/config/compiler/nvcc.hpp +index 43039b5c2..907eade96 100644 +--- a/include/boost/config/compiler/nvcc.hpp ++++ b/include/boost/config/compiler/nvcc.hpp +@@ -11,6 +11,15 @@ + # define BOOST_COMPILER "NVIDIA CUDA C++ Compiler" + #endif + ++#if defined(__CUDACC_VER_MAJOR__) && defined(__CUDACC_VER_MINOR__) && defined(__CUDACC_VER_BUILD__) ++# define BOOST_CUDA_VERSION __CUDACC_VER_MAJOR__ * 10000 + __CUDACC_VER_MINOR__ * 100 + __CUDACC_VER_BUILD__ ++#elif defined(__CUDACC_VER__) ++ define BOOST_CUDA_VERSION __CUDACC_VER__ ++#else ++// We don't really know what the CUDA version is, but it's definitely before 7.5: ++# define BOOST_CUDA_VERSION 70000 ++#endif ++ + // NVIDIA Specific support + // BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device + #define BOOST_GPU_ENABLED __host__ __device__ +@@ -19,11 +28,11 @@ + // https://svn.boost.org/trac/boost/ticket/11897 + // This is fixed in 7.5. As the following version macro was introduced in 7.5 an existance + // check is enough to detect versions < 7.5 +-#if !defined(__CUDACC_VER__) || (__CUDACC_VER__ < 70500) ++#if BOOST_CUDA_VERSION < 70500 + # define BOOST_NO_CXX11_VARIADIC_TEMPLATES + #endif + // The same bug is back again in 8.0: +-#if (__CUDACC_VER__ > 80000) && (__CUDACC_VER__ < 80100) ++#if (BOOST_CUDA_VERSION > 80000) && (BOOST_CUDA_VERSION < 80100) + # define BOOST_NO_CXX11_VARIADIC_TEMPLATES + #endif + // Most recent CUDA (8.0) has no constexpr support in msvc mode: + +From 593389dc4b4dae14e6d38bb1c81b7bf70ec21f26 Mon Sep 17 00:00:00 2001 +From: jzmaddock +Date: Fri, 18 Aug 2017 18:13:38 +0100 +Subject: [PATCH 2/2] Update nvcc.hpp + +--- + include/boost/config/compiler/nvcc.hpp | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) + +diff --git a/include/boost/config/compiler/nvcc.hpp b/include/boost/config/compiler/nvcc.hpp +index 907eade96..f21b9b54f 100644 +--- a/include/boost/config/compiler/nvcc.hpp ++++ b/include/boost/config/compiler/nvcc.hpp +@@ -12,12 +12,10 @@ + #endif + + #if defined(__CUDACC_VER_MAJOR__) && defined(__CUDACC_VER_MINOR__) && defined(__CUDACC_VER_BUILD__) +-# define BOOST_CUDA_VERSION __CUDACC_VER_MAJOR__ * 10000 + __CUDACC_VER_MINOR__ * 100 + __CUDACC_VER_BUILD__ +-#elif defined(__CUDACC_VER__) +- define BOOST_CUDA_VERSION __CUDACC_VER__ ++# define BOOST_CUDA_VERSION __CUDACC_VER_MAJOR__ * 1000000 + __CUDACC_VER_MINOR__ * 10000 + __CUDACC_VER_BUILD__ + #else + // We don't really know what the CUDA version is, but it's definitely before 7.5: +-# define BOOST_CUDA_VERSION 70000 ++# define BOOST_CUDA_VERSION 7000000 + #endif + + // NVIDIA Specific support +@@ -28,11 +26,11 @@ + // https://svn.boost.org/trac/boost/ticket/11897 + // This is fixed in 7.5. As the following version macro was introduced in 7.5 an existance + // check is enough to detect versions < 7.5 +-#if BOOST_CUDA_VERSION < 70500 ++#if BOOST_CUDA_VERSION < 7050000 + # define BOOST_NO_CXX11_VARIADIC_TEMPLATES + #endif + // The same bug is back again in 8.0: +-#if (BOOST_CUDA_VERSION > 80000) && (BOOST_CUDA_VERSION < 80100) ++#if (BOOST_CUDA_VERSION > 8000000) && (BOOST_CUDA_VERSION < 8010000) + # define BOOST_NO_CXX11_VARIADIC_TEMPLATES + #endif + // Most recent CUDA (8.0) has no constexpr support in msvc mode: diff --git a/boost-1.64.0-icl-ttp-matching.patch b/boost-1.64.0-icl-ttp-matching.patch new file mode 100644 index 0000000..bcda940 --- /dev/null +++ b/boost-1.64.0-icl-ttp-matching.patch @@ -0,0 +1,37 @@ +From 32178e147a976419b9ac846d3c40c3ab4d1e0ff6 Mon Sep 17 00:00:00 2001 +From: Mathias Gaunard +Date: Thu, 4 May 2017 17:18:22 +0100 +Subject: [PATCH] Compatibility with GCC 7.1 + +The libstdc++ shipped with GCC 7.1 uses a unary class template for std::string. +type_to_string needs to be adapted to deal with this properly. +--- + include/boost/icl/type_traits/type_to_string.hpp | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/include/boost/icl/type_traits/type_to_string.hpp b/include/boost/icl/type_traits/type_to_string.hpp +index 80c473a..994711b 100644 +--- a/include/boost/icl/type_traits/type_to_string.hpp ++++ b/include/boost/icl/type_traits/type_to_string.hpp +@@ -43,7 +43,6 @@ namespace boost{ namespace icl + + template<>inline std::string type_to_string::apply() { return "flt"; } + template<>inline std::string type_to_string::apply() { return "dbl"; } +- template<>inline std::string type_to_string::apply() { return "string"; } + + //------------------------------------------------------------------------- + template class Templ> +@@ -78,6 +77,13 @@ namespace boost{ namespace icl + } + }; + ++ // --------------------------------------------------------------------------- ++ template<> ++ struct type_to_string ++ { ++ static std::string apply() { return "string"; } ++ }; ++ + }} // namespace boost icl + + #endif diff --git a/boost-1.64.0-icl-undefined-shift.patch b/boost-1.64.0-icl-undefined-shift.patch new file mode 100644 index 0000000..88441a1 --- /dev/null +++ b/boost-1.64.0-icl-undefined-shift.patch @@ -0,0 +1,28 @@ +From 9687dea689e58cd1f67440fa529cb5c9692e9858 Mon Sep 17 00:00:00 2001 +From: Avi Kivity +Date: Sun, 2 Jul 2017 12:56:35 +0300 +Subject: [PATCH] Fix undefined behavior in interval_bounds::reverse_right() + +The ~ operator converts _bits from unsigned char to int, and makes it +negative to boot. Shifting left a negative number is undefined behavior. + +Cast it back to unsigned char to prevent undefined behavior. +--- + include/boost/icl/interval_bounds.hpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/boost/icl/interval_bounds.hpp b/include/boost/icl/interval_bounds.hpp +index edf16d0..f917cb6 100644 +--- a/include/boost/icl/interval_bounds.hpp ++++ b/include/boost/icl/interval_bounds.hpp +@@ -41,8 +41,8 @@ class interval_bounds + interval_bounds all ()const { return interval_bounds(_bits & _all ); } + interval_bounds left ()const { return interval_bounds(_bits & _left ); } + interval_bounds right()const { return interval_bounds(_bits & _right); } +- interval_bounds reverse_left ()const { return interval_bounds((~_bits>>1) & _right); } +- interval_bounds reverse_right()const { return interval_bounds((~_bits<<1) & _left ); } ++ interval_bounds reverse_left ()const { return interval_bounds((bound_type(~_bits)>>1) & _right); } ++ interval_bounds reverse_right()const { return interval_bounds((bound_type(~_bits)<<1) & _left ); } + + bound_type bits()const{ return _bits; } + diff --git a/boost-1.64.0-regex-overflow.patch b/boost-1.64.0-regex-overflow.patch new file mode 100644 index 0000000..220b877 --- /dev/null +++ b/boost-1.64.0-regex-overflow.patch @@ -0,0 +1,26 @@ +From bc9b25b5d3c3784543158510c6087d41739ab64a Mon Sep 17 00:00:00 2001 +From: jzmaddock +Date: Mon, 31 Jul 2017 19:18:10 +0100 +Subject: [PATCH] Fix potential overflow in max_state_count calculation. Fixes: + https://svn.boost.org/trac10/ticket/13036. + +--- + include/boost/regex/v4/perl_matcher_common.hpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/include/boost/regex/v4/perl_matcher_common.hpp b/include/boost/regex/v4/perl_matcher_common.hpp +index 7974e7483..f08e9d434 100644 +--- a/include/boost/regex/v4/perl_matcher_common.hpp ++++ b/include/boost/regex/v4/perl_matcher_common.hpp +@@ -113,6 +113,11 @@ void perl_matcher::estimate_max_state_count(std + std::ptrdiff_t states = re.size(); + if(states == 0) + states = 1; ++ if ((std::numeric_limits::max)() / states < states) ++ { ++ max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits::max)() - 2); ++ return; ++ } + states *= states; + if((std::numeric_limits::max)() / dist < states) + { diff --git a/boost-1.66.0-numpy3.patch b/boost-1.66.0-numpy3.patch new file mode 100644 index 0000000..27add8c --- /dev/null +++ b/boost-1.66.0-numpy3.patch @@ -0,0 +1,29 @@ +From 0fce0e589353d772ceda4d493b147138406b22fd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Moritz=20Wanzenb=C3=B6ck?= +Date: Wed, 11 Jul 2018 11:57:46 +0200 +Subject: [PATCH] Add missing return statement in numpy import + +This adds a missing return statement in the python3 specific +import logic of boost.python.numpy. + +For python3 wrap_import_array() needs to return a pointer value. +The import_array() macro only returns NULL in case of error. The +missing return statement is UB, so the compiler can assume it does +not happen. This means the compiler can assume the error branch +is always taken, so import_array must always fail. +--- + src/numpy/numpy.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/numpy/numpy.cpp b/src/numpy/numpy.cpp +index 8e259bc75..3ae2295e3 100644 +--- a/libs/python/src/numpy/numpy.cpp ++++ b/libs/python/src/numpy/numpy.cpp +@@ -19,6 +19,7 @@ static void wrap_import_array() + static void * wrap_import_array() + { + import_array(); ++ return NULL; + } + #endif + diff --git a/boost.spec b/boost.spec index d0cf43d..3eb0d06 100644 --- a/boost.spec +++ b/boost.spec @@ -35,7 +35,7 @@ Name: boost Summary: The free peer-reviewed portable C++ source libraries Version: 1.64.0 %global version_enc 1_64_0 -Release: 0.6%{?dist} +Release: 7%{?dist} License: Boost and MIT and Python %global toplev_dirname %{name}_%{version_enc} @@ -50,12 +50,15 @@ Source2: libboost_thread.so # equal to the Boost version (e.g., 1.41.0). %global sonamever %{version} -# boost is an "umbrella" package that pulls in all other boost +# boost is an "umbrella" package that pulls in all boost shared library # components, except for MPI and Python 3 sub-packages. Those are # special in that they are rarely necessary, and it's not a big burden # to have interested parties install them explicitly. +# The subpackages that don't install shared libraries are also not pulled in +# (doc, doctools, examples, jam, static). Requires: boost-atomic%{?_isa} = %{version}-%{release} Requires: boost-chrono%{?_isa} = %{version}-%{release} +Requires: boost-container%{?_isa} = %{version}-%{release} %if %{with context} Requires: boost-context%{?_isa} = %{version}-%{release} Requires: boost-coroutine%{?_isa} = %{version}-%{release} @@ -140,6 +143,26 @@ Patch84: boost-1.64.0-mpi-get_data.patch # https://github.com/boostorg/serialization/commit/1d86261581230e2dc5d617a9b16287d326f3e229 Patch85: boost-1.64.0-serialization-make_array.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1485641 +# https://github.com/boostorg/icl/pull/9 +Patch86: boost-1.64.0-icl-ttp-matching.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1516837 +# https://github.com/boostorg/icl/pull/11 +Patch87: boost-1.64.0-icl-undefined-shift.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1564252 +# https://svn.boost.org/trac10/ticket/13036 +Patch90: boost-1.64.0-regex-overflow.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1530828 +# https://github.com/boostorg/config/pull/175 +Patch91: boost-1.64.0-config-cuda-version.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1596468 +# https://github.com/boostorg/python/pull/218 +Patch92: boost-1.66.0-numpy3.patch + %bcond_with tests %bcond_with docs_generated @@ -180,7 +203,7 @@ Group: System Environment/Libraries %description container Boost.Container library implements several well-known containers, -including STL containers. The aim of the library is to offers advanced +including STL containers. The aim of the library is to offer advanced features not present in standard containers or to offer the latest standard draft features for compilers that comply with C++03. @@ -244,7 +267,7 @@ Requires: boost-regex%{?_isa} = %{version}-%{release} %description graph Run-time support for the BGL graph library. BGL interface and graph -components are generic, in the same sense as the the Standard Template +components are generic, in the same sense as the Standard Template Library (STL). %package iostreams @@ -253,7 +276,7 @@ Group: System Environment/Libraries %description iostreams -Run-time support for Boost.IOStreams, a framework for defining streams, +Run-time support for Boost.Iostreams, a framework for defining streams, stream buffers and i/o filters. %package locale @@ -281,9 +304,6 @@ tools along with public interfaces for extending the library. %package math Summary: Math functions for boost TR1 library Group: System Environment/Libraries -%if %{with quadmath} -Requires: libquadmath%{?_isa} -%endif %description math @@ -302,7 +322,7 @@ The Boost Python Library is a framework for interfacing Python and C++. It allows you to quickly and seamlessly expose C++ classes, functions and objects to Python, and vice versa, using no special tools -- just your C++ compiler. This package contains run-time -support for the NumPy extension of the Boost Python Library. +support for the NumPy extension of the Boost Python Library for Python 2. %if %{with python3} @@ -342,7 +362,7 @@ The Boost Python Library is a framework for interfacing Python and C++. It allows you to quickly and seamlessly expose C++ classes, functions and objects to Python, and vice versa, using no special tools -- just your C++ compiler. This package contains run-time -support for Boost Python Library. +support for the Boost Python Library compiled for Python 2. %if %{with python3} @@ -356,7 +376,7 @@ The Boost Python Library is a framework for interfacing Python and C++. It allows you to quickly and seamlessly expose C++ classes, functions and objects to Python, and vice versa, using no special tools -- just your C++ compiler. This package contains run-time -support for Boost Python Library compiled for Python 3. +support for the Boost Python Library compiled for Python 3. %package python3-devel Summary: Shared object symbolic links for Boost.Python 3 @@ -457,7 +477,7 @@ The Boost.TypeErasure library provides runtime polymorphism in C++ that is more flexible than that provided by the core language. %package wave -Summary: Run-time component of boost C99/C++ pre-processing library +Summary: Run-time component of boost C99/C++ preprocessing library Group: System Environment/Libraries Requires: boost-chrono%{?_isa} = %{version}-%{release} Requires: boost-date-time%{?_isa} = %{version}-%{release} @@ -469,7 +489,7 @@ Requires: boost-thread%{?_isa} = %{version}-%{release} Run-time support for the Boost.Wave library, a Standards conforming, and highly configurable implementation of the mandated C99/C++ -pre-processor functionality. +preprocessor functionality. %package devel Summary: The Boost C++ headers and shared development libraries @@ -517,7 +537,7 @@ Obsoletes: odeint-doc < 2.2-5 %description doc This package contains the documentation in the HTML format of the Boost C++ libraries. The documentation provides the same content as that on the Boost -web page (http://www.boost.org/doc/libs/1_40_0). +web page (http://www.boost.org/doc/libs/%{version_enc}). %package examples Summary: Source examples for the Boost C++ libraries @@ -567,7 +587,7 @@ Requires: python2-openmpi%{?_isa} %description openmpi-python -Python support for Boost.MPI-OpenMPI, a library providing a clean C++ +Python 2 support for Boost.MPI-OpenMPI, a library providing a clean C++ API over the OpenMPI implementation of MPI. %if %{with python3} @@ -609,7 +629,7 @@ Requires: boost-serialization%{?_isa} = %{version}-%{release} %description graph-openmpi Run-time support for the Parallel BGL graph library. The interface and -graph components are generic, in the same sense as the the Standard +graph components are generic, in the same sense as the Standard Template Library (STL). This libraries in this package use OpenMPI back-end to do the parallel work. @@ -658,7 +678,7 @@ Requires: python2-mpich%{?_isa} %description mpich-python -Python support for Boost.MPI-MPICH, a library providing a clean C++ +Python 2 support for Boost.MPI-MPICH, a library providing a clean C++ API over the MPICH implementation of MPI. %if %{with python3} @@ -702,7 +722,7 @@ Obsoletes: boost-graph-mpich2 < 1.53.0-9 %description graph-mpich Run-time support for the Parallel BGL graph library. The interface and -graph components are generic, in the same sense as the the Standard +graph components are generic, in the same sense as the Standard Template Library (STL). This libraries in this package use MPICH back-end to do the parallel work. @@ -739,10 +759,11 @@ Group: Development/Tools %description jam Boost.Jam (BJam) is the low-level build engine tool for Boost.Build. Historically, Boost.Jam is based on on FTJam and on Perforce Jam but has grown -a number of significant features and is now developed independently +a number of significant features and is now developed independently. %prep %setup -q -n %{toplev_dirname} +find ./boost -name '*.hpp' -perm /111 | xargs chmod a-x %patch4 -p1 %patch5 -p1 @@ -757,6 +778,11 @@ a number of significant features and is now developed independently %patch83 -p1 %patch84 -p2 %patch85 -p2 +%patch86 -p2 +%patch87 -p2 +%patch90 -p2 +%patch91 -p2 +%patch92 -p1 # At least python2_version needs to be a macro so that it's visible in # %%install as well. @@ -1546,6 +1572,34 @@ fi %{_mandir}/man1/bjam.1* %changelog +* Wed Jul 18 2018 Jonathan Wakely - 1.64.0-7 +- Patch numpy for Python 3 (#1596468) + +* Wed Apr 18 2018 Jonathan Wakely - 1.64.0-6 +- Add patch for Boost.Regex integer overflow (#1564252) +- Add patch for CUDA version macro changes (#1530828) + +* Wed Feb 28 2018 Jonathan Wakely - 1.64.0-5 +- Move Requires: boost-container out of conditional block. + +* Tue Feb 27 2018 Jonathan Wakely - 1.64.0-5 +- Ensure boost metapackage installs boost-container. + +* Thu Dec 07 2017 Jonathan Wakely - 1.64.0-4 +- Patch to fix #1516837 + +* Mon Sep 25 2017 Jonathan Wakely - 1.64.0-3 +- Fix some rpmlint issues +- Remove Requires for libquadmath (explicit-lib-dependency) +- Remove executable bits on header files (spurious-executable-perm) +- Adjust boost.wave %%description (spelling-error) + +* Tue Sep 12 2017 Jonathan Wakely - 1.64.0-2 +- Patch to fix #1485641 + +* Wed Sep 06 2017 Jonathan Wakely - 1.64.0-1 +- Fix descriptions + * Wed Aug 02 2017 Fedora Release Engineering - 1.64.0-0.6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild