From 10dab32577dbf5960a96e80a688ea3fee52dc633 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Jan 17 2023 06:17:06 +0000 Subject: Add missing include - fixes build failure with gcc 13 --- diff --git a/0001-Add-missing-include-causing-build-failure-with-gcc-1.patch b/0001-Add-missing-include-causing-build-failure-with-gcc-1.patch new file mode 100644 index 0000000..5b4e80f --- /dev/null +++ b/0001-Add-missing-include-causing-build-failure-with-gcc-1.patch @@ -0,0 +1,56 @@ +From 16d5c7a5b4106f0b1cff709f421762c9eadf5bce Mon Sep 17 00:00:00 2001 +From: Mattias Ellert +Date: Tue, 17 Jan 2023 01:18:11 +0100 +Subject: [PATCH] Add missing include causing build failure with gcc 13 + +/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:95:22: error: field 'fn_' has incomplete type 'const std::string' {aka 'const std::__cxx11::basic_string'} + 95 | const std::string fn_; + | ^~~ +In file included from /usr/include/c++/13/iosfwd:41, + from /usr/include/c++/13/bits/shared_ptr.h:52, + from /usr/include/c++/13/condition_variable:45, + from /builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiRanges.hh:38, + from /builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiRanges.cc:32: +/usr/include/c++/13/bits/stringfwd.h:72:11: note: declaration of 'std::string' {aka 'class std::__cxx11::basic_string'} + 72 | class basic_string; + | ^~~~~~~~~~~~ +/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:96:22: error: field 'tident_' has incomplete type 'const std::string' {aka 'const std::__cxx11::basic_string'} + 96 | const std::string tident_; + | ^~~~~~~ +/usr/include/c++/13/bits/stringfwd.h:72:11: note: declaration of 'std::string' {aka 'class std::__cxx11::basic_string'} + 72 | class basic_string; + | ^~~~~~~~~~~~ +/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:148:4: error: return type 'std::string' {aka 'class std::__cxx11::basic_string'} is incomplete + 148 | { + | ^ +/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:161:4: error: return type 'std::string' {aka 'class std::__cxx11::basic_string'} is incomplete + 161 | { + | ^ +/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:174:4: error: return type 'std::string' {aka 'class std::__cxx11::basic_string'} is incomplete + 174 | { + | ^ +/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:186:4: error: return type 'std::string' {aka 'class std::__cxx11::basic_string'} is incomplete + 186 | { + | ^ +/builddir/build/BUILD/xrootd-5.5.1/src/XrdOssCsi/XrdOssCsiPages.hh:195:4: error: return type 'std::string' {aka 'class std::__cxx11::basic_string'} is incomplete + 195 | { + | ^ +--- + src/XrdOssCsi/XrdOssCsiPages.hh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/XrdOssCsi/XrdOssCsiPages.hh b/src/XrdOssCsi/XrdOssCsiPages.hh +index 852a3add6..cd1c1b4a3 100644 +--- a/src/XrdOssCsi/XrdOssCsiPages.hh ++++ b/src/XrdOssCsi/XrdOssCsiPages.hh +@@ -38,6 +38,7 @@ + #include "XrdOssCsiRanges.hh" + #include + #include ++#include + #include + #include + #include +-- +2.39.0 + diff --git a/0001-feat-Use-setuptools-over-setuptools._distutils.core.patch b/0001-feat-Use-setuptools-over-setuptools._distutils.core.patch new file mode 100644 index 0000000..6a83384 --- /dev/null +++ b/0001-feat-Use-setuptools-over-setuptools._distutils.core.patch @@ -0,0 +1,31 @@ +From bea744e8c1fe05e9aad12d8c86d550ef38e8bf14 Mon Sep 17 00:00:00 2001 +From: Matthew Feickert +Date: Wed, 30 Nov 2022 14:06:31 -0600 +Subject: [PATCH 1/2] feat: Use setuptools over setuptools._distutils.core + +Drop all usage of setuptools._distutils in favor of pure setuptools. +This effectively solves the problems that were present in the attempt +in https://github.com/xrootd/xrootd/pull/1585 and +https://github.com/xrootd/xrootd/pull/1700. + +Co-authored-by: Henry Schreiner +--- + bindings/python/setup.py.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bindings/python/setup.py.in b/bindings/python/setup.py.in +index fbac3e6df..c5bbec503 100644 +--- a/bindings/python/setup.py.in ++++ b/bindings/python/setup.py.in +@@ -3,7 +3,7 @@ from __future__ import print_function + # setuptools._distutils added in setuptools v48.0.0 + # c.f. https://setuptools.pypa.io/en/latest/history.html#v48-0-0 + try: +- from setuptools._distutils.core import setup, Extension ++ from setuptools import setup, Extension + # sysconfig v48.0.0+ is incompatible for Python 3.6 only, so fall back to distutils. + # Instead of checking setuptools.__version__ explicitly, use the knowledge that + # to get here in the 'try' block requires setuptools v48.0.0+. +-- +2.39.0 + diff --git a/0002-chore-Remove-check-for-setuptools-over-distutils.patch b/0002-chore-Remove-check-for-setuptools-over-distutils.patch new file mode 100644 index 0000000..99ee1c8 --- /dev/null +++ b/0002-chore-Remove-check-for-setuptools-over-distutils.patch @@ -0,0 +1,56 @@ +From 8c590658cf8cd93ae837a523f2666eb07cbbcbf5 Mon Sep 17 00:00:00 2001 +From: Matthew Feickert +Date: Wed, 30 Nov 2022 14:31:34 -0600 +Subject: [PATCH 2/2] chore: Remove check for setuptools over distutils + +* Now that setuptools._distutils.core usage has been dropped, it is + possible to go further and drop direct usage of distutils + in favor of setuptools. This has already happened with the removal + of setuptools._distutils as + + > from setuptools import setup, Extension + + should always pass, and so this commit just makes this explicitly + clear by removing the try/except block. +--- + bindings/python/setup.py.in | 24 ++++++++---------------- + 1 file changed, 8 insertions(+), 16 deletions(-) + +diff --git a/bindings/python/setup.py.in b/bindings/python/setup.py.in +index c5bbec503..7fb8c53f6 100644 +--- a/bindings/python/setup.py.in ++++ b/bindings/python/setup.py.in +@@ -1,22 +1,14 @@ + from __future__ import print_function + +-# setuptools._distutils added in setuptools v48.0.0 +-# c.f. https://setuptools.pypa.io/en/latest/history.html#v48-0-0 +-try: +- from setuptools import setup, Extension +- # sysconfig v48.0.0+ is incompatible for Python 3.6 only, so fall back to distutils. +- # Instead of checking setuptools.__version__ explicitly, use the knowledge that +- # to get here in the 'try' block requires setuptools v48.0.0+. +- # FIXME: When support for Python 3.6 is dropped simplify this +- import sys +- +- if sys.version_info < (3, 7): +- from distutils import sysconfig +- else: +- import sysconfig +-except ImportError: +- from distutils.core import setup, Extension ++from setuptools import setup, Extension ++# sysconfig with setuptools v48.0.0+ is incompatible for Python 3.6 only, so fall back to distutils. ++# FIXME: When support for Python 3.6 is dropped simplify this ++import sys ++ ++if sys.version_info < (3, 7): + from distutils import sysconfig ++else: ++ import sysconfig + + from os import getenv, walk, path + import subprocess +-- +2.39.0 + diff --git a/xrootd.spec b/xrootd.spec index e02dec9..9dd6a02 100644 --- a/xrootd.spec +++ b/xrootd.spec @@ -14,7 +14,7 @@ Name: xrootd Epoch: 1 Version: 5.5.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Extended ROOT file server License: LGPLv3+ @@ -26,6 +26,12 @@ Patch0: 0001-Disable-LTO-for-XrdPosix-on-32-bit-architectures.patch # Check operator++ in check # https://github.com/xrootd/xrootd/pull/1806 Patch1: 0001-Check-all-sizes-8-16-32-64-in-atomic-check.patch +# Backported from upstream +Patch2: 0001-feat-Use-setuptools-over-setuptools._distutils.core.patch +Patch3: 0002-chore-Remove-check-for-setuptools-over-distutils.patch +# Add missing include - fixes build failure with gcc 13 +# https://github.com/xrootd/xrootd/pull/1880 +Patch4: 0001-Add-missing-include-causing-build-failure-with-gcc-1.patch %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: cmake3 >= 3.6 @@ -49,21 +55,25 @@ BuildRequires: zlib-devel BuildRequires: doxygen BuildRequires: graphviz BuildRequires: selinux-policy-devel -BuildRequires: systemd +BuildRequires: systemd-rpm-macros BuildRequires: systemd-devel %if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8 BuildRequires: python3-devel BuildRequires: python3-pip +BuildRequires: python3-setuptools BuildRequires: python3-wheel BuildRequires: python3-sphinx %endif %if %{?rhel}%{!?rhel:0} == 7 BuildRequires: python2-devel BuildRequires: python2-pip +BuildRequires: python2-setuptools BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-pip +BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_other_pkgversion}-devel BuildRequires: python%{python3_other_pkgversion}-pip +BuildRequires: python%{python3_other_pkgversion}-setuptools BuildRequires: python2-sphinx %endif BuildRequires: json-c-devel @@ -249,7 +259,7 @@ interfacing with the Ceph storage platform. %if %{?rhel}%{!?rhel:0} == 7 %package -n python2-%{name} Summary: Python 2 bindings for xrootd -%{?python_provide:%python_provide python2-%{name}} +%py_provides python2-%{name} Provides: %{name}-python = %{epoch}:%{version}-%{release} Obsoletes: %{name}-python < 1:4.6.1-6 Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} @@ -261,7 +271,7 @@ This package contains Python 2 bindings for xrootd. %package -n python%{python3_pkgversion}-%{name} Summary: Python 3 bindings for xrootd -%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}} +%py_provides python%{python3_pkgversion}-%{name} Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release} @@ -269,13 +279,13 @@ Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release} This package contains Python 3 bindings for xrootd. %if %{?rhel}%{!?rhel:0} == 7 -%package -n python%{python3_other_pkgversion}-%{name} +%package -n python%{?python3_other_pkgversion}-%{name} Summary: Python 3 bindings for xrootd -%{?python_provide:%python_provide python%{?python3_other_pkgversion}-%{name}} +%py_provides python%{python3_other_pkgversion}-%{name} Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-client-libs%{?_isa} = %{epoch}:%{version}-%{release} -%description -n python%{python3_other_pkgversion}-%{name} +%description -n python%{?python3_other_pkgversion}-%{name} This package contains Python 3 bindings for xrootd. %endif @@ -290,6 +300,9 @@ This package contains the API documentation of the xrootd libraries. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build %if %{?rhel}%{!?rhel:0} == 7 @@ -672,7 +685,7 @@ fi %{python3_sitearch}/XRootD %if %{?rhel}%{!?rhel:0} == 7 -%files -n python%{python3_other_pkgversion}-%{name} +%files -n python%{?python3_other_pkgversion}-%{name} %{python3_other_sitearch}/xrootd-*.*-info %{python3_other_sitearch}/pyxrootd %{python3_other_sitearch}/XRootD @@ -682,6 +695,9 @@ fi %doc %{_pkgdocdir} %changelog +* Tue Jan 17 2023 Mattias Ellert - 1:5.5.1-2 +- Add missing include - fixes build failure with gcc 13 + * Wed Oct 19 2022 Mattias Ellert - 1:5.5.1-1 - Update to version 5.5.1 - Drop doxygen patch accepted upstream