From 09e8c2992f6e76dcd90a1ea59db687218d79ab2a Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Fri, 30 May 2025 16:44:56 +0200 Subject: [PATCH 1/2] [GCC13] Enable frame-pointer; sync latest changes from GCC14 branch --- autotools.spec | 8 +- bazel-gcc14.patch | 12 +++ bazel.spec | 2 + bootstrap-driver.spec | 4 +- celeritas.spec | 2 + clue-gcc14.patch | 27 +++++ clue.spec | 2 + cmake.spec | 2 +- correctionlib-gcc14.patch | 22 ++++ curl.spec | 10 +- davix.spec | 2 +- dcap.spec | 7 +- fakesystem.spec | 3 +- file-bootstrap.spec | 2 +- flatbuffers.spec | 2 + flex.spec | 1 + gcc-prerequisites.spec | 190 +++++++++++++++++++++++++++++++++ gcc.spec | 169 +++-------------------------- glimpse.spec | 4 +- heaptrack.spec | 6 +- libarchive-bootstrap.spec | 2 +- libffi.spec | 2 +- libxslt.spec | 16 +-- lua-bootstrap.spec | 2 +- meschach-1.2b-fPIC.patch | 2 +- openldap.spec | 2 +- pacparser-gcc14.patch | 11 ++ pacparser.spec | 4 +- pip/awkward-cpp.file | 4 +- pip/correctionlib.file | 1 + pip/pybind11.file | 1 - pip/requirements.txt | 8 +- pip/scikit-learn.file | 4 +- pybind11-array-bound.patch | 22 ---- pythia6-gcc14.patch | 12 +++ pythia6.spec | 5 +- rpm-set_runpath.file | 3 +- sqlite-bootstrap.spec | 6 +- sqlite.spec | 6 +- tbb.spec | 2 +- tensorflow-gcc14-aarch64.patch | 31 ++++++ tensorflow-sources.file | 4 + ucx.spec | 1 - xz-bootstrap.spec | 8 +- xz.spec | 9 +- zstd-bootstrap.spec | 2 +- 46 files changed, 406 insertions(+), 241 deletions(-) create mode 100644 bazel-gcc14.patch create mode 100644 clue-gcc14.patch create mode 100644 correctionlib-gcc14.patch create mode 100644 gcc-prerequisites.spec create mode 100644 pacparser-gcc14.patch delete mode 100644 pybind11-array-bound.patch create mode 100644 pythia6-gcc14.patch create mode 100644 tensorflow-gcc14-aarch64.patch diff --git a/autotools.spec b/autotools.spec index 5b0a82dfd16..64e11d4b726 100644 --- a/autotools.spec +++ b/autotools.spec @@ -1,12 +1,12 @@ ### RPM external autotools 1.5 ## INITENV SET M4 %{i}/bin/m4 # We keep all of them together to simplify the "requires" statements. -%define autoconf_version 2.71 -%define automake_version 1.16.3 +%define autoconf_version 2.72 +%define automake_version 1.16.5 %define automake_maj %(echo %{automake_version} | cut -f1,2 -d.) -%define libtool_version 2.4.6 +%define libtool_version 2.5.4 %define m4_version 1.4.19 -%define gettext_version 0.21 +%define gettext_version 0.22 %define pkgconfig_version 0.29.2 Source0: http://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz Source1: http://ftp.gnu.org/gnu/automake/automake-%{automake_version}.tar.gz diff --git a/bazel-gcc14.patch b/bazel-gcc14.patch new file mode 100644 index 00000000000..f2f791a3951 --- /dev/null +++ b/bazel-gcc14.patch @@ -0,0 +1,12 @@ +diff --git a/third_party/zlib/BUILD b/third_party/zlib/BUILD +index f1aa936..7317aff 100755 +--- a/third_party/zlib/BUILD ++++ b/third_party/zlib/BUILD +@@ -29,6 +29,7 @@ distrib_cc_library( + # Use -Dverbose=-1 to turn off zlib's trace logging. (#3280) + copts = [ + "-w", ++ "-Wno-error=implicit-function-declaration", + "-Dverbose=-1", + ], + includes = ["."], diff --git a/bazel.spec b/bazel.spec index fc30cde0050..cf05d5fe360 100644 --- a/bazel.spec +++ b/bazel.spec @@ -19,12 +19,14 @@ BuildRequires: java-env python3 python-python3 # https://github.com/bazelbuild/bazel/issues/9392 Patch0: bazel-3.7.0-patches Patch1: bazel-absl +Patch2: bazel-gcc14 %prep %setup -q -c -n bazel-%{realversion} %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build diff --git a/bootstrap-driver.spec b/bootstrap-driver.spec index 2f1916d27d1..1cd629eb230 100644 --- a/bootstrap-driver.spec +++ b/bootstrap-driver.spec @@ -32,7 +32,7 @@ platformSeeds+=" perl perl-libs" platformSeeds+=" libbrotli python3" platformSeeds+=" perl-base perl-lib perl-filetest perl-overload perl-vars" %endif - + #Various packages required by xrootd with krb5 enabled platformSeeds+=" libcom_err krb5-libs" @@ -53,7 +53,7 @@ platformBuildSeeds+=" brotli-devel" #Various packages required by xrootd with krb5 enabled platformBuildSeeds+=" libcom_err-devel krb5-devel" - + #needed by python build platformBuildSeeds+=" readline-devel ncurses-devel tcl-devel tk-devel" diff --git a/celeritas.spec b/celeritas.spec index ab3846b50b6..4145272bf9e 100644 --- a/celeritas.spec +++ b/celeritas.spec @@ -2,6 +2,7 @@ %define celeritas_gitversion %(echo %{realversion} | sed -e 's|^v||;s|-.*||') %define tag f9b51d72fc268bf22c5560b82d3dd3d7613a8106 Source: git+https://github.com/celeritas-project/celeritas?obj=develop/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz +Source1: https://patch-diff.githubusercontent.com/raw/celeritas-project/celeritas/pull/1110.diff %define package_build_flags -Wall -Wextra -pedantic ## INCLUDE geant4-deps @@ -9,6 +10,7 @@ Requires: python3 json geant4 %prep %setup -n %{n}-%{realversion} +patch -p1 <%{_sourcedir}/1110.diff %build diff --git a/clue-gcc14.patch b/clue-gcc14.patch new file mode 100644 index 00000000000..c687b8e5f48 --- /dev/null +++ b/clue-gcc14.patch @@ -0,0 +1,27 @@ +diff --git a/clueLib/include/TilesAlpaka.h b/clueLib/include/TilesAlpaka.h +index b6ba9e50006616adcb2fee8642420a14fc698aba..0e7bcfd15f867a04c9e25e3534cfc199a01ece94 100644 +--- a/clueLib/include/TilesAlpaka.h ++++ b/clueLib/include/TilesAlpaka.h +@@ -30,13 +30,20 @@ class TilesAlpaka { + + ALPAKA_FN_HOST_ACC int getDim1Bin(float x) const { + int dim1Bin = (x - T::minDim1) * T::invDim1BinSize; +- dim1Bin = std::clamp(dim1Bin, 0, T::nColumns - 1); ++ // Equivalent of std::clamp(dim1Bin, 0, T::nColumns - 1); ++ // which doesn't compile with gcc14 due to reference to __glibcxx_assert ++ // See https://github.com/llvm/llvm-project/issues/95183 ++ // and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115740 ++ int new_max = std::max(dim1Bin, 0); ++ dim1Bin = std::min(T::nColumns - 1, new_max); + return dim1Bin; + } + + ALPAKA_FN_HOST_ACC int getDim2Bin(float y) const { + int dim2Bin = (y - T::minDim2) * T::invDim2BinSize; +- dim2Bin = std::clamp(dim2Bin, 0, T::nRows - 1); ++ // See comment in getDim1Bin ++ int new_max = std::max(dim2Bin, 0); ++ dim2Bin = std::min(T::nRows - 1, new_max); + return dim2Bin; + } + diff --git a/clue.spec b/clue.spec index e885bfa2f17..8a3483d6800 100644 --- a/clue.spec +++ b/clue.spec @@ -4,10 +4,12 @@ %define git_commit V_%(echo %{realversion} | tr '.' '_') Source: https://gitlab.cern.ch/kalos/%{n}/-/archive/%{git_commit}/%{n}-%{git_commit}.tar.gz +Patch0: clue-gcc14 Requires: alpaka %prep %setup -n %{n}-%{git_commit} +%patch0 -p1 %build diff --git a/cmake.spec b/cmake.spec index fef389afdc4..bbfe38cd5e0 100644 --- a/cmake.spec +++ b/cmake.spec @@ -1,4 +1,4 @@ -### RPM external cmake 3.28.3 +### RPM external cmake 3.31.7 %define downloaddir %(echo %realversion | cut -d. -f1,2) Source: http://www.cmake.org/files/v%{downloaddir}/%n-%realversion.tar.gz Requires: bz2lib curl expat zlib diff --git a/correctionlib-gcc14.patch b/correctionlib-gcc14.patch new file mode 100644 index 00000000000..af98b9395ee --- /dev/null +++ b/correctionlib-gcc14.patch @@ -0,0 +1,22 @@ +diff --git a/rapidjson/include/rapidjson/document.h b/rapidjson/include/rapidjson/document.h +index e3e20dfbd..19f5a6a5f 100644 +--- a/rapidjson/include/rapidjson/document.h ++++ b/rapidjson/include/rapidjson/document.h +@@ -316,8 +316,6 @@ struct GenericStringRef { + + GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {} + +- GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; } +- + //! implicit conversion to plain CharType pointer + operator const Ch *() const { return s; } + +@@ -328,6 +326,8 @@ struct GenericStringRef { + //! Disallow construction from non-const array + template + GenericStringRef(CharType (&str)[N]) /* = delete */; ++ //! Copy assignment operator not permitted - immutable type ++ GenericStringRef& operator=(const GenericStringRef& rhs) /* = delete */; + }; + + //! Mark a character pointer as constant string diff --git a/curl.spec b/curl.spec index 7b3eabf614b..4d3d516d833 100644 --- a/curl.spec +++ b/curl.spec @@ -1,5 +1,10 @@ -### RPM external curl 7.79.0 -Source: http://curl.haxx.se/download/%{n}-%{realversion}.tar.gz +%if 0%{?rhel} > 9 +%define curl_version 8.13.0 +%else +%define curl_version 7.79.0 +%endif +### RPM external curl %{curl_version} +Source: https://curl.se/download/%{n}-%{realversion}.tar.gz Requires: zlib %prep @@ -23,6 +28,7 @@ Requires: zlib --without-nss \ --without-libssh2 \ --with-gssapi=${KERBEROS_ROOT} \ + --without-libpsl \ --with-openssl make %{makeprocesses} diff --git a/davix.spec b/davix.spec index 6189f6d29cc..22bea10552c 100644 --- a/davix.spec +++ b/davix.spec @@ -1,4 +1,4 @@ -### RPM external davix 0.8.7 +### RPM external davix 0.8.9 %define tag %(echo R_%{realversion} | tr . _) %define branch master diff --git a/dcap.spec b/dcap.spec index dc6b8f027c7..9d31581e403 100644 --- a/dcap.spec +++ b/dcap.spec @@ -1,8 +1,5 @@ -### RPM external dcap 2.47.12 -%define tag 5753eec777a47908a40de670094903ce6b13176b -%define branch cms/%{realversion} -%define github_user cms-externals -Source: git+https://github.com/%github_user/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz +### RPM external dcap 2.47.14 +Source: https://github.com/dCache/dcap/archive/refs/tags/%{realversion}.tar.gz BuildRequires: autotools Requires: zlib diff --git a/fakesystem.spec b/fakesystem.spec index 5d6a2782799..176f89ad2b2 100644 --- a/fakesystem.spec +++ b/fakesystem.spec @@ -1,5 +1,5 @@ ### RPM cms fakesystem 1.0 -## REVISION 1016 +## REVISION 1017 ## NOCOMPILER ## NO_VERSION_SUFFIX @@ -50,6 +50,7 @@ Provides: perl(Tk::DialogBox) Provides: perl(Tk::ROText) Provides: perl(constant) Provides: perl(full) +Provides: perl(bigint) ################################# # Needed by git on SLC7 diff --git a/file-bootstrap.spec b/file-bootstrap.spec index ebc71a38387..1c3665bbce1 100644 --- a/file-bootstrap.spec +++ b/file-bootstrap.spec @@ -1,4 +1,4 @@ -### RPM external file-bootstrap 5.33 +### RPM external file-bootstrap 5.46 %define file_tag %(echo FILE%{realversion} | tr . _) AutoReqProv: no Source: https://github.com/file/file/archive/%{file_tag}.tar.gz diff --git a/flatbuffers.spec b/flatbuffers.spec index 970fd0adb59..d4fe65d1e6f 100644 --- a/flatbuffers.spec +++ b/flatbuffers.spec @@ -5,6 +5,7 @@ %define branch master %define github_user google Source: git+https://github.com/%{github_user}/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz +Source1: https://patch-diff.githubusercontent.com/raw/google/flatbuffers/pull/7227.diff Patch0: flatbuffers-7422 BuildRequires: cmake gmake @@ -12,6 +13,7 @@ BuildRequires: cmake gmake %prep %setup -n %{n}-%{realversion} %patch0 -p1 +patch -p1 <%{_sourcedir}/7227.diff %build rm -rf ../build diff --git a/flex.spec b/flex.spec index 632339b76b0..765057c4edc 100644 --- a/flex.spec +++ b/flex.spec @@ -12,6 +12,7 @@ BuildRequires: autotools bison %patch1 -p1 %build +CFLAGS="-O2 -Wno-error=implicit-function-declaration -Wno-error=int-conversion" \ ./configure --disable-dependency-tracking --disable-nls \ --build=%{_build} --host="%{_host}" --prefix=%{i} make %{makeprocesses} diff --git a/gcc-prerequisites.spec b/gcc-prerequisites.spec new file mode 100644 index 00000000000..f7ae380b373 --- /dev/null +++ b/gcc-prerequisites.spec @@ -0,0 +1,190 @@ +### RPM external gcc-prerequisites 1.0 +## NOCOMPILER +## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 +AutoReqProv: no + +%define keep_archives true +%define gmpVersion 6.3.0 +%define mpfrVersion 4.2.1 +%define mpcVersion 1.3.1 +%define islVersion 0.27 +%define zlibVersion 1.2.13 +%define zstdVersion 1.5.4 +Source1: https://gmplib.org/download/gmp/gmp-%{gmpVersion}.tar.bz2 +Source2: http://www.mpfr.org/mpfr-%{mpfrVersion}/mpfr-%{mpfrVersion}.tar.bz2 +Source3: https://ftp.gnu.org/gnu/mpc/mpc-%{mpcVersion}.tar.gz +Source4: https://libisl.sourceforge.io/isl-%{islVersion}.tar.bz2 +Source12: http://zlib.net/zlib-%{zlibVersion}.tar.gz +Source13: https://github.com/facebook/zstd/releases/download/v%{zstdVersion}/zstd-%{zstdVersion}.tar.gz +Source14: https://github.com/gcc-mirror/gcc/commit/0a1d2ea57722c248777e1130de076e28c443ff8b.diff +Source15: https://github.com/gcc-mirror/gcc/commit/77d01927bd7c989d431035251a5c196fe39bcec9.diff + +%ifos linux +%define bisonVersion 3.8.2 +%define binutilsVersion 2.43.1 +%define elfutilsVersion 0.192 +%define m4Version 1.4.19 +%define flexVersion 2.6.4 +Source7: http://ftp.gnu.org/gnu/bison/bison-%{bisonVersion}.tar.gz +Source8: https://sourceware.org/pub/binutils/releases/binutils-%{binutilsVersion}.tar.bz2 +Source9: https://sourceware.org/pub/elfutils/%{elfutilsVersion}/elfutils-%{elfutilsVersion}.tar.bz2 +Source10: http://ftp.gnu.org/gnu/m4/m4-%{m4Version}.tar.gz +Source11: https://github.com/westes/flex/releases/download/v%{flexVersion}/flex-%{flexVersion}.tar.gz +%endif + +Patch0: gcc-flex-nonfull-path-m4 +Patch1: gcc-flex-disable-doc + +%prep +# GCC prerequisites +%setup -D -T -b 1 -n gmp-%{gmpVersion} +%setup -D -T -b 2 -n mpfr-%{mpfrVersion} +%setup -D -T -b 3 -n mpc-%{mpcVersion} +%setup -D -T -b 4 -n isl-%{islVersion} +%setup -D -T -b 12 -n zlib-%{zlibVersion} +%setup -D -T -b 13 -n zstd-%{zstdVersion} + +%ifos linux +%setup -D -T -b 7 -n bison-%{bisonVersion} +%setup -D -T -b 8 -n binutils-%{binutilsVersion} +%setup -D -T -b 9 -n elfutils-%{elfutilsVersion} +%setup -D -T -b 10 -n m4-%{m4Version} +%setup -D -T -b 11 -n flex-%{flexVersion} +%patch0 -p1 +%patch1 -p1 +%endif + +%build +%ifarch darwin + CC='clang' + CXX='clang++' + CPP='clang -E' + CXXCPP='clang++ -E' + ADDITIONAL_LANGUAGES=,objc,obj-c++ + CONF_GCC_OS_SPEC= +%else + CC=gcc + CXX=c++ + CPP=cpp + CXXCPP='c++ -E' + CONF_GCC_OS_SPEC= +%endif + +CC="$CC -fPIC" +CXX="$CXX -fPIC" + +mkdir -p %{i}/tmp/sw +export PATH=%{i}/tmp/sw/bin:$PATH + +# Build zlib (required for compressed debug information) +cd ../zlib-%{zlibVersion} +CONF_FLAGS="-fPIC -O3 -DUSE_MMAP -DUNALIGNED_OK -D_LARGEFILE64_SOURCE=1" +%ifarch x86_64 +CONF_FLAGS="${CONF_FLAGS} -msse3" +%endif +CFLAGS="${CONF_FLAGS}" ./configure --static --prefix=%{i}/tmp/sw +make %{makeprocesses} +make install + +#Build and install zstd static library +make -C ../zstd-%{zstdVersion}/lib %{makeprocesses} \ + install-static install-includes prefix=%{i}/tmp/sw \ + CPPFLAGS="-fPIC" CFLAGS="-fPIC" +%ifos linux + CONF_BINUTILS_OPTS="--enable-ld=default --enable-lto --enable-plugins --enable-threads" + CONF_GCC_WITH_LTO="--enable-ld=default --enable-lto" + + CONF_BINUTILS_OPTS="$CONF_BINUTILS_OPTS --enable-gold=yes" + CONF_GCC_WITH_LTO="$CONF_GCC_WITH_LTO --enable-gold=yes" + + # Build M4 (for building) + cd ../m4-%{m4Version} + ./configure --prefix=%{i}/tmp/sw \ + --build=%{_build} --host=%{_host} \ + CC="$CC" + make %{makeprocesses} + make install + hash -r + + # Build Bison (for building) + cd ../bison-%{bisonVersion} + ./configure --build=%{_build} --host=%{_host} \ + --prefix=%{i}/tmp/sw CC="$CC" + make %{makeprocesses} + make install + hash -r + + # Build Flex (for building) + cd ../flex-%{flexVersion} + ./configure --disable-nls --prefix=%{i}/tmp/sw \ + --enable-static --disable-shared \ + --build=%{_build} --host=%{_host} \ + CC="$CC" CXX="$CXX" + make %{makeprocesses} + make install + hash -r + + # Build elfutils + cd ../elfutils-%{elfutilsVersion} + ./configure --disable-static --with-zlib --without-bzlib --without-lzma \ + --disable-libdebuginfod --enable-libdebuginfod=dummy --disable-debuginfod \ + --build=%{_build} --host=%{_host} --program-prefix='eu-' --disable-silent-rules \ + --prefix=%{i} CC="gcc" \ + CPPFLAGS="-I%{i}/tmp/sw/include" LDFLAGS="-L%{i}/tmp/sw/lib" + make %{makeprocesses} + make install + +%ifarch ppc64le + CONF_BINUTILS_OPTS="${CONF_BINUTILS_OPTS} --enable-targets=spu --enable-targets=powerpc-linux" +%endif + + # Build binutils + cd ../binutils-%{binutilsVersion} + ./configure --disable-static --prefix=%{i} ${CONF_BINUTILS_OPTS} --disable-werror --enable-deterministic-archives \ + --build=%{_build} --host=%{_host} --disable-nls --with-system-zlib --enable-64-bit-bfd \ + CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" CFLAGS="-I%{i}/include -I%{i}/tmp/sw/include" \ + CXXFLAGS="-I%{i}/include -I%{i}/tmp/sw/include" LDFLAGS="-L%{i}/lib -L%{i}/tmp/sw/lib" + make %{makeprocesses} + find . -name Makefile -exec perl -p -i -e 's|LN = ln|LN = cp -p|;s|ln ([^-])|cp -p $1|g' {} \; + make install +%endif + +# Build GMP +cd ../gmp-%{gmpVersion} +./configure --disable-static --prefix=%{i} --enable-shared --disable-static --enable-cxx \ + --build=%{_build} --host=%{_host} \ + CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" +make %{makeprocesses} +make install + +# Build MPFR +cd ../mpfr-%{mpfrVersion} +./configure --disable-static --prefix=%{i} --with-gmp=%{i} \ + --build=%{_build} --host=%{_host} \ + CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" +make %{makeprocesses} +make install + +# Build MPC +cd ../mpc-%{mpcVersion} +./configure --disable-static --prefix=%{i} --with-gmp=%{i} --with-mpfr=%{i} \ + --build=%{_build} --host=%{_host} \ + CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" +make %{makeprocesses} +make install + +# Build ISL +cd ../isl-%{islVersion} +./configure --disable-static --with-gmp-prefix=%i --prefix=%{i} \ + --build=%{_build} --host=%{_host} \ + CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" +make %{makeprocesses} +make install + +%install + +%post +%{relocateConfig}bin/eu-make-debug-archive +%{relocateConfig}etc/profile.d/debuginfod.*sh +%{relocateConfig}share/fish/vendor_conf.d/debuginfod.fish +for f in $(find $RPM_INSTALL_PREFIX/%{pkgrel}/*/lib/ldscripts -type f) ; do %{relocateCmsFiles} $f || true ; done diff --git a/gcc.spec b/gcc.spec index 499e9746a83..176254a3aee 100644 --- a/gcc.spec +++ b/gcc.spec @@ -4,6 +4,8 @@ # Use the git repository for fetching the sources. This gives us more control while developing # a new platform so that we can compile yet to be released versions of the compiler. # See: https://gcc.gnu.org/viewcvs/gcc/branches/gcc-8-branch/?view=log + +BuildRequires: gcc-prerequisites %define gccTag 2d6e33407c3d94e3aee6de235dc13373184a506f %define gccBranch releases/gcc-13 @@ -12,35 +14,6 @@ Source0: git+https://github.com/gcc-mirror/%{n}.git?obj=%{gccBranch}/%{gccTag}&e %define keep_archives true -%define gmpVersion 6.2.1 -%define mpfrVersion 4.2.0 -%define mpcVersion 1.3.1 -%define islVersion 0.26 -%define zlibVersion 1.2.13 -%define zstdVersion 1.4.5 -Source1: https://gmplib.org/download/gmp/gmp-%{gmpVersion}.tar.bz2 -Source2: http://www.mpfr.org/mpfr-%{mpfrVersion}/mpfr-%{mpfrVersion}.tar.bz2 -Source3: https://ftp.gnu.org/gnu/mpc/mpc-%{mpcVersion}.tar.gz -Source4: https://libisl.sourceforge.io/isl-%{islVersion}.tar.bz2 -Source12: http://zlib.net/zlib-%{zlibVersion}.tar.gz -Source13: https://github.com/facebook/zstd/releases/download/v%{zstdVersion}/zstd-%{zstdVersion}.tar.gz - -%ifos linux -%define bisonVersion 3.8.2 -%define binutilsVersion 2.40 -%define elfutilsVersion 0.189 -%define m4Version 1.4.19 -%define flexVersion 2.6.4 -Source7: http://ftp.gnu.org/gnu/bison/bison-%{bisonVersion}.tar.gz -Source8: https://sourceware.org/pub/binutils/releases/binutils-%{binutilsVersion}.tar.bz2 -Source9: https://sourceware.org/pub/elfutils/%{elfutilsVersion}/elfutils-%{elfutilsVersion}.tar.bz2 -Source10: http://ftp.gnu.org/gnu/m4/m4-%{m4Version}.tar.gz -Source11: https://github.com/westes/flex/releases/download/v%{flexVersion}/flex-%{flexVersion}.tar.gz -%endif - -Patch0: gcc-flex-nonfull-path-m4 -Patch1: gcc-flex-disable-doc - %prep %setup -T -b 0 -n %{moduleName} @@ -90,24 +63,6 @@ cat << \EOF_CMS_H > gcc/config/general-cms.h #define CC1PLUS_SPEC "-fabi-version=0" EOF_CMS_H -# GCC prerequisites -%setup -D -T -b 1 -n gmp-%{gmpVersion} -%setup -D -T -b 2 -n mpfr-%{mpfrVersion} -%setup -D -T -b 3 -n mpc-%{mpcVersion} -%setup -D -T -b 4 -n isl-%{islVersion} -%setup -D -T -b 12 -n zlib-%{zlibVersion} -%setup -D -T -b 13 -n zstd-%{zstdVersion} - -%ifos linux -%setup -D -T -b 7 -n bison-%{bisonVersion} -%setup -D -T -b 8 -n binutils-%{binutilsVersion} -%setup -D -T -b 9 -n elfutils-%{elfutilsVersion} -%setup -D -T -b 10 -n m4-%{m4Version} -%setup -D -T -b 11 -n flex-%{flexVersion} -%patch0 -p1 -%patch1 -p1 -%endif - %build %ifarch darwin CC='clang' @@ -127,115 +82,25 @@ EOF_CMS_H CC="$CC -fPIC" CXX="$CXX -fPIC" -mkdir -p %{i}/tmp/sw +mkdir -p %{i} +rsync -a ${GCC_PREREQUISITES_ROOT}/ %{i}/ +rm -rf %{i}/etc/profile.d/dependencies-setup.*sh %{i}/etc/profile.d/init.*sh +sed -i -e 's|%{builddirectpkgreqs}|%{pkgdir}|g' \ + %{i}/etc/profile.d/debuginfod.*sh \ + %{i}/bin/eu-make-debug-archive \ + %{i}/share/fish/vendor_conf.d/debuginfod.fish +for f in $(find %{i}/*/lib/ldscripts -type f) ; do + sed -i -e 's|%{builddirectpkgreqs}|%{pkgdir}|g' $f +done + export PATH=%{i}/tmp/sw/bin:$PATH -# Build zlib (required for compressed debug information) -cd ../zlib-%{zlibVersion} -CONF_FLAGS="-fPIC -O3 -DUSE_MMAP -DUNALIGNED_OK -D_LARGEFILE64_SOURCE=1" +CONF_GCC_ARCH_SPEC="--enable-frame-pointer" %ifarch x86_64 -CONF_FLAGS="${CONF_FLAGS} -msse3" -%endif -CFLAGS="${CONF_FLAGS}" ./configure --static --prefix=%{i}/tmp/sw -make %{makeprocesses} -make install - -#Build and install zstd static library -make -C ../zstd-%{zstdVersion}/lib %{makeprocesses} \ - install-static install-includes prefix=%{i}/tmp/sw \ - CPPFLAGS="-fPIC" CFLAGS="-fPIC" -%ifos linux - CONF_BINUTILS_OPTS="--enable-ld=default --enable-lto --enable-plugins --enable-threads" - CONF_GCC_WITH_LTO="--enable-ld=default --enable-lto" - - CONF_BINUTILS_OPTS="$CONF_BINUTILS_OPTS --enable-gold=yes" - CONF_GCC_WITH_LTO="$CONF_GCC_WITH_LTO --enable-gold=yes" - - # Build M4 (for building) - cd ../m4-%{m4Version} - ./configure --prefix=%{i}/tmp/sw \ - --build=%{_build} --host=%{_host} \ - CC="$CC" - make %{makeprocesses} - make install - hash -r - - # Build Bison (for building) - cd ../bison-%{bisonVersion} - ./configure --build=%{_build} --host=%{_host} \ - --prefix=%{i}/tmp/sw CC="$CC" - make %{makeprocesses} - make install - hash -r - - # Build Flex (for building) - cd ../flex-%{flexVersion} - ./configure --disable-nls --prefix=%{i}/tmp/sw \ - --enable-static --disable-shared \ - --build=%{_build} --host=%{_host} \ - CC="$CC" CXX="$CXX" - make %{makeprocesses} - make install - hash -r - - # Build elfutils - cd ../elfutils-%{elfutilsVersion} - ./configure --disable-static --with-zlib --without-bzlib --without-lzma \ - --disable-libdebuginfod --enable-libdebuginfod=dummy --disable-debuginfod \ - --build=%{_build} --host=%{_host} --program-prefix='eu-' --disable-silent-rules \ - --prefix=%{i} CC="gcc" \ - CPPFLAGS="-I%{i}/tmp/sw/include" LDFLAGS="-L%{i}/tmp/sw/lib" - make %{makeprocesses} - make install - -%ifarch ppc64le - CONF_BINUTILS_OPTS="${CONF_BINUTILS_OPTS} --enable-targets=spu --enable-targets=powerpc-linux" +%if 0%{?rhel} > 9 +CONF_GCC_ARCH_SPEC="$CONF_GCC_ARCH_SPEC --with-arch=x86-64-v3" %endif - - # Build binutils - cd ../binutils-%{binutilsVersion} - ./configure --disable-static --prefix=%{i} ${CONF_BINUTILS_OPTS} --disable-werror --enable-deterministic-archives \ - --build=%{_build} --host=%{_host} --disable-nls --with-system-zlib --enable-64-bit-bfd \ - CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" CFLAGS="-I%{i}/include -I%{i}/tmp/sw/include" \ - CXXFLAGS="-I%{i}/include -I%{i}/tmp/sw/include" LDFLAGS="-L%{i}/lib -L%{i}/tmp/sw/lib" - make %{makeprocesses} - find . -name Makefile -exec perl -p -i -e 's|LN = ln|LN = cp -p|;s|ln ([^-])|cp -p $1|g' {} \; - make install %endif - -# Build GMP -cd ../gmp-%{gmpVersion} -./configure --disable-static --prefix=%{i} --enable-shared --disable-static --enable-cxx \ - --build=%{_build} --host=%{_host} \ - CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" -make %{makeprocesses} -make install - -# Build MPFR -cd ../mpfr-%{mpfrVersion} -./configure --disable-static --prefix=%{i} --with-gmp=%{i} \ - --build=%{_build} --host=%{_host} \ - CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" -make %{makeprocesses} -make install - -# Build MPC -cd ../mpc-%{mpcVersion} -./configure --disable-static --prefix=%{i} --with-gmp=%{i} --with-mpfr=%{i} \ - --build=%{_build} --host=%{_host} \ - CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" -make %{makeprocesses} -make install - -# Build ISL -cd ../isl-%{islVersion} -./configure --disable-static --with-gmp-prefix=%i --prefix=%{i} \ - --build=%{_build} --host=%{_host} \ - CC="$CC" CXX="$CXX" CPP="$CPP" CXXCPP="$CXXCPP" -make %{makeprocesses} -make install - -CONF_GCC_ARCH_SPEC= %ifarch aarch64 CONF_GCC_ARCH_SPEC="$CONF_GCC_ARCH_SPEC \ --enable-threads=posix --enable-initfini-array --disable-libmpx" @@ -270,7 +135,6 @@ make %{makeprocesses} profiledbootstrap %install cd %_builddir/%{moduleName}/obj && make install - ln -s gcc %{i}/bin/cc find %{i}/lib %{i}/lib64 -name '*.la' -exec rm -f {} \; || true @@ -291,4 +155,5 @@ rm -rf %{i}/lib/pkg-config %{relocateConfig}lib64/libstdc++*-gdb.py %{relocateConfig}libexec/gcc/*/%{realversion}/install-tools/mkheaders %{relocateConfig}libexec/gcc/*/%{realversion}/liblto_plugin.la +%{relocateConfig}share/fish/vendor_conf.d/debuginfod.fish for f in $(find $RPM_INSTALL_PREFIX/%{pkgrel}/*/lib/ldscripts -type f) ; do %{relocateCmsFiles} $f || true ; done diff --git a/glimpse.spec b/glimpse.spec index 7b57ec19cef..aefcbeb930e 100644 --- a/glimpse.spec +++ b/glimpse.spec @@ -7,7 +7,9 @@ BuildRequires: autotools %prep %setup -n %{n}-%realversion %build -./configure --prefix=%{i} + +CFLAGS="-Wno-error=return-mismatch -Wno-error=implicit-int -Wno-error=implicit-function-declaration" \ + ./configure --prefix=%{i} # Turn off this part, it causes problems for 32-bit-on-64-bit and is only # needed for webglimpse perl -p -i -e "s|dynfilters||g" Makefile diff --git a/heaptrack.spec b/heaptrack.spec index 0d5e724a2ae..6122f00f6e7 100644 --- a/heaptrack.spec +++ b/heaptrack.spec @@ -1,10 +1,12 @@ ### RPM external heaptrack 1.4.0 -Source: https://github.com/KDE/heaptrack/archive/refs/tags/v%{realversion}.tar.gz +Source0: https://github.com/KDE/heaptrack/archive/refs/tags/v%{realversion}.tar.gz +Source1: https://invent.kde.org/sdk/heaptrack/-/commit/c6c45f3455a652c38aefa402aece5dafa492e8ab.patch Requires: boost libunwind zstd bz2lib zlib BuildRequires: cmake Provides: libc.so.6(GLIBC_PRIVATE)(64bit) %prep %setup -n %{n}-%{realversion} +patch -p1 <%{_sourcedir}/c6c45f3455a652c38aefa402aece5dafa492e8ab.patch %build mkdir -p %i @@ -13,7 +15,7 @@ rm -rf ../build; mkdir ../build; cd ../build cmake ../%{n}-%{realversion} \ -DCMAKE_INSTALL_PREFIX=%i -DCMAKE_VERBOSE_MAKEFILE=TRUE \ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g -O3" \ - -DCMAKE_PREFIX_PATH="$LIBUNWIND_ROOT;$BOOST_ROOT;$ZSTD_ROOT;$BZ2LIB_ROOT;$ZLIB_ROOT" \ + -DCMAKE_PREFIX_PATH="${LIBUNWIND_ROOT};${BOOST_ROOT};${ZSTD_ROOT};${BZ2LIB_ROOT};${ZLIB_ROOT}" \ -DHEAPTRACK_BUILD_GUI=off -DHEAPTRACK_USE_LIBUNWIND=on -DHEAPTRACK_BUILD_PRINT=on make DEBUG=1 VERBOSE=1 %makeprocesses diff --git a/libarchive-bootstrap.spec b/libarchive-bootstrap.spec index 80ebd021c65..80f80e59556 100644 --- a/libarchive-bootstrap.spec +++ b/libarchive-bootstrap.spec @@ -1,4 +1,4 @@ -### RPM external libarchive-bootstrap 3.5.1 +### RPM external libarchive-bootstrap 3.7.7 Source0: http://www.libarchive.org/downloads/libarchive-%{realversion}.tar.gz AutoReqProv: no Requires: xz-bootstrap diff --git a/libffi.spec b/libffi.spec index 3fba24698e2..0e06087bc0b 100644 --- a/libffi.spec +++ b/libffi.spec @@ -1,4 +1,4 @@ -### RPM external libffi 3.4.2 +### RPM external libffi 3.4.6 ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 %define tag v%{realversion} diff --git a/libxslt.spec b/libxslt.spec index 2ad640861ba..dccc104ddea 100644 --- a/libxslt.spec +++ b/libxslt.spec @@ -1,23 +1,23 @@ -### RPM external libxslt 1.1.28 +### RPM external libxslt 1.1.42 -%define tag 195f644cf7b5e93208b033fa7c5501c41cf82f59 -%define branch master -%define github_user cms-externals -Source0: git+https://github.com/%github_user/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz +Source: https://gitlab.gnome.org/GNOME/libxslt/-/archive/v%{realversion}/libxslt-v%{realversion}.tar.gz Requires: libxml2 BuildRequires: autotools %prep -%setup -n %{n}-%{realversion} +%setup -n %{n}-v%{realversion} %build + +LDFLAGS="-L$LIBXML2_ROOT/lib -lxml2" \ ./autogen.sh \ --prefix=%{i} \ + --disable-silent-rules \ --with-libxml-prefix=$LIBXML2_ROOT \ - --with-libxml-include-prefix=$LIBXML2_ROOT/include \ + --with-libxml-include-prefix=$LIBXML2_ROOT/include/libxml2 \ --with-libxml-libs-prefix=$LIBXML2_ROOT/lib \ --without-crypto --without-python -make +make %{makeprocesses} VERBOSE=1 %install make install diff --git a/lua-bootstrap.spec b/lua-bootstrap.spec index 6f3376a8e3d..c2ef3bb64a7 100644 --- a/lua-bootstrap.spec +++ b/lua-bootstrap.spec @@ -1,4 +1,4 @@ -### RPM external lua-bootstrap 5.3.4 +### RPM external lua-bootstrap 5.4.7 Source0: http://www.lua.org/ftp/lua-%{realversion}.tar.gz %define keep_archives true diff --git a/meschach-1.2b-fPIC.patch b/meschach-1.2b-fPIC.patch index a01ee663ad3..fce0b5a23e7 100644 --- a/meschach-1.2b-fPIC.patch +++ b/meschach-1.2b-fPIC.patch @@ -5,7 +5,7 @@ # CFLAGS = -O -g # CFLAGS = -pg -g -CFLAGS = -O -+CFLAGS = -O -fPIC ++CFLAGS = -O -fPIC -Wno-error=implicit-function-declaration .c.o: diff --git a/openldap.spec b/openldap.spec index 1dcea733775..3744c6c1c8d 100644 --- a/openldap.spec +++ b/openldap.spec @@ -1,4 +1,4 @@ -### RPM external openldap 2.4.45 +### RPM external openldap 2.5.19 ## INITENV +PATH LD_LIBRARY_PATH %i/lib Source: ftp://ftp.openldap.org/pub/OpenLDAP/%{n}-release/%{n}-%{realversion}.tgz Requires: db6 diff --git a/pacparser-gcc14.patch b/pacparser-gcc14.patch new file mode 100644 index 00000000000..6e89c6d7981 --- /dev/null +++ b/pacparser-gcc14.patch @@ -0,0 +1,11 @@ +--- a/src/spidermonkey/js/src/jsapi.c ++++ b/src/spidermonkey/js/src/jsapi.c +@@ -93,7 +93,7 @@ + #ifdef HAVE_VA_LIST_AS_ARRAY + #define JS_ADDRESSOF_VA_LIST(ap) ((va_list *)(ap)) + #else +-#define JS_ADDRESSOF_VA_LIST(ap) (&(ap)) ++#define JS_ADDRESSOF_VA_LIST(ap) ((va_list *)(&(ap))) + #endif + + #if defined(JS_PARANOID_REQUEST) && defined(JS_THREADSAFE) diff --git a/pacparser.spec b/pacparser.spec index 7dea9db535f..b3d09289277 100644 --- a/pacparser.spec +++ b/pacparser.spec @@ -1,11 +1,13 @@ -### RPM external pacparser 1.4.2 +### RPM external pacparser 1.4.5 ## INITENV +PATH PYTHON3PATH %{i}/${PYTHON3_LIB_SITE_PACKAGES} Source: https://github.com/manugarg/pacparser/archive/refs/tags/v%{realversion}.tar.gz +Patch0: pacparser-gcc14 Requires: python3 BuildRequires: py3-setuptools %prep %setup -n %{n}-%{realversion} +%patch0 -p1 %build make -C src all pymod PREFIX=%{i} PYTHON=$(which python3) diff --git a/pip/awkward-cpp.file b/pip/awkward-cpp.file index db971368f82..6a73da85dc6 100644 --- a/pip/awkward-cpp.file +++ b/pip/awkward-cpp.file @@ -1,3 +1,5 @@ BuildRequires: py3-hatchling py3-hatch-fancy-pypi-readme py3-scikit-build-core py3-pyproject-metadata cmake Requires: py3-pybind11 py3-numpy -%define PipPreBuild export CMAKE_PREFIX_PATH=%{cmake_prefix_path} +%define PipPreBuild \ + export CMAKE_PREFIX_PATH=%{cmake_prefix_path}; \ + export CMAKE_BUILD_PARALLEL_LEVEL=%{compiling_processes} diff --git a/pip/correctionlib.file b/pip/correctionlib.file index 6296cb239d0..0bfd883fd61 100644 --- a/pip/correctionlib.file +++ b/pip/correctionlib.file @@ -1,3 +1,4 @@ +Patch0: correctionlib-gcc14 Requires: py3-pybind11 py3-numpy py3-pydantic py3-python-rapidjson py3-rich BuildRequires: py3-setuptools-scm py3-scikit-build cmake py3-make %define PipPreBuildPy export CMAKE_BUILD_PARALLEL_LEVEL=%{compiling_processes} diff --git a/pip/pybind11.file b/pip/pybind11.file index 270b1ae49ba..3ac4da3912c 100644 --- a/pip/pybind11.file +++ b/pip/pybind11.file @@ -1,4 +1,3 @@ -Patch0: pybind11-array-bound %define PipPostInstall \ ln -s ${PYTHON3_LIB_SITE_PACKAGES}/pybind11/share %{i}/share; \ ln -s ${PYTHON3_LIB_SITE_PACKAGES}/pybind11/include %{i}/include diff --git a/pip/requirements.txt b/pip/requirements.txt index a4281341f4d..8cfaa16220d 100644 --- a/pip/requirements.txt +++ b/pip/requirements.txt @@ -34,8 +34,8 @@ atomicwrites==1.4.1 attrs==23.2.0 autopep8==2.1.0 avro==1.11.3 -awkward==2.6.3 -awkward-cpp==32 +awkward==2.7.4 +awkward-cpp==44 # No 'release' versions exist awkward-pandas==2023.8.0 babel==2.14.0 @@ -317,7 +317,7 @@ python-daemon==3.0.1 python-dateutil==2.9.0.post0 python-json-logger==2.0.7 python-ldap==3.4.4 -python-rapidjson==1.16 +python-rapidjson==1.20 pythran==0.15.0 pytoml==0.1.21 pytools==2024.1.2 @@ -343,7 +343,7 @@ rsa==4.9 scandir==1.10.0 schema==0.7.5 scikit-build==0.16.7 -scikit-build-core==0.9.3 +scikit-build-core==0.10.7 scikit-learn==1.2.2 scinum==2.1.0 scipy==1.10.0 diff --git a/pip/scikit-learn.file b/pip/scikit-learn.file index d7ab9d247b4..90315bcef22 100644 --- a/pip/scikit-learn.file +++ b/pip/scikit-learn.file @@ -1,2 +1,4 @@ Requires: py3-scipy py3-joblib py3-threadpoolctl -%define PipPreBuild export SKLEARN_BUILD_PARALLEL=%{compiling_processes} +%define PipPreBuild \ + export SKLEARN_BUILD_PARALLEL=%{compiling_processes}; \ + export CFLAGS="-Wno-error=incompatible-pointer-types" diff --git a/pybind11-array-bound.patch b/pybind11-array-bound.patch deleted file mode 100644 index 4c2a9763d26..00000000000 --- a/pybind11-array-bound.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/pybind11/include/pybind11/pybind11.h b/pybind11/include/pybind11/pybind11.h -index 1806583e6b..e56e2a0589 100644 ---- a/pybind11/include/pybind11/pybind11.h -+++ b/pybind11/include/pybind11/pybind11.h -@@ -1380,7 +1380,17 @@ class generic_type : public object { - } else { - internals.registered_types_cpp[tindex] = tinfo; - } -+ -+ PYBIND11_WARNING_PUSH -+#if defined(__GNUC__) && __GNUC__ >= 12 -+ // When using GCC 12 these warnings are disabled as they trigger -+ // false positive warnings. Discussed here: -+ // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115824. -+ PYBIND11_WARNING_DISABLE_GCC("-Warray-bounds") -+ PYBIND11_WARNING_DISABLE_GCC("-Wstringop-overread") -+#endif - internals.registered_types_py[(PyTypeObject *) m_ptr] = {tinfo}; -+ PYBIND11_WARNING_POP - }); - - if (rec.bases.size() > 1 || rec.multiple_inheritance) { diff --git a/pythia6-gcc14.patch b/pythia6-gcc14.patch new file mode 100644 index 00000000000..ab8afad466f --- /dev/null +++ b/pythia6-gcc14.patch @@ -0,0 +1,12 @@ +diff --git a/rootinterface/pythia6_common_address.c b/rootinterface/pythia6_common_address.c +index e9e67d5..03cf20c 100644 +--- a/rootinterface/pythia6_common_address.c ++++ b/rootinterface/pythia6_common_address.c +@@ -47,6 +47,7 @@ + # define pybins PYBINS + #endif + ++#include + int pyjets[2+5*4000+2*2*5*4000]; + int pydat1[200+2*200+200+2*200]; + int pydat2[4*500+2*4*500+2*2000+2*4*4]; diff --git a/pythia6.spec b/pythia6.spec index 9444e1c4dd3..3df13bb9f44 100644 --- a/pythia6.spec +++ b/pythia6.spec @@ -1,10 +1,11 @@ ### RPM external pythia6 426 Source: http://cern.ch/service-spi/external/MCGenerators/distribution/%{n}/%{n}-%{realversion}-src.tgz - +Patch0: pythia6-gcc14 %define keep_archives true %prep %setup -q -n %{n}/%{realversion} +%patch0 -p1 # Update to detect aarch64 and ppc64le rm -f ./config/config.{sub,guess} @@ -20,7 +21,7 @@ chmod +x ./config/config.{sub,guess} perl -p -i -e 's|^CC=.*$|CC="gcc -fPIC"|' libtool %build -make CFLAGS="-fPIC -fcommon" +make %{makeprocesses} CFLAGS="-fPIC -fcommon" make install %install diff --git a/rpm-set_runpath.file b/rpm-set_runpath.file index b88894438fb..6cb434d33f2 100644 --- a/rpm-set_runpath.file +++ b/rpm-set_runpath.file @@ -58,7 +58,8 @@ while [ ! X$# = X0 ]; do --package) PACKAGE_PATH=$1 ; shift ;; --force-rpath) FORCE_RPATH='--force-rpath' ;; --rpath) SET_RUNPATH=$1 ; shift ;; - -m|--match) MATCH="$MATCH $1"; shift ;; + -m|--match) MATCH="$MATCH $1"; shift ;; + -M|--override-match ) MATCH="$1"; shift ;; -n|--not-name) NAME="$NAME $1" ; shift ;; --jobs) MAX_JOBS="$1" ; shift ;; --help) diff --git a/sqlite-bootstrap.spec b/sqlite-bootstrap.spec index 46650c94e79..8590171db12 100644 --- a/sqlite-bootstrap.spec +++ b/sqlite-bootstrap.spec @@ -1,9 +1,9 @@ -### RPM external sqlite-bootstrap 3.36.0 +### RPM external sqlite-bootstrap 3.48.0 AutoReqProv: no -Source: https://www.sqlite.org/2021/sqlite-autoconf-3360000.tar.gz +Source: https://www.sqlite.org/2025/sqlite-autoconf-3480000.tar.gz %prep -%setup -n sqlite-autoconf-3360000 +%setup -n sqlite-autoconf-3480000 %build ./configure --build="%{_build}" --host="%{_host}" --prefix=%{i} \ diff --git a/sqlite.spec b/sqlite.spec index 2644c7c2f46..d48c7ffa627 100644 --- a/sqlite.spec +++ b/sqlite.spec @@ -1,10 +1,10 @@ -### RPM external sqlite 3.36.0 +### RPM external sqlite 3.48.0 Requires: zlib -Source: https://www.sqlite.org/2021/sqlite-autoconf-3360000.tar.gz +Source: https://www.sqlite.org/2025/sqlite-autoconf-3480000.tar.gz Requires: zlib %prep -%setup -n sqlite-autoconf-3360000 +%setup -n sqlite-autoconf-3480000 %build CFLAGS=-I${ZLIB_ROOT}/include LDFLAGS=-L${ZLIB_ROOT}/lib \ diff --git a/tbb.spec b/tbb.spec index 5eb01671b1b..533e2382d5f 100644 --- a/tbb.spec +++ b/tbb.spec @@ -19,7 +19,7 @@ mkdir %{_builddir}/build cd %{_builddir}/build cmake ../%{n}-%{realversion} \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DCMAKE_CXX_FLAGS="-Wno-error=array-bounds -Wno-error=use-after-free -Wno-error=address -Wno-error=uninitialized -Wno-error=stringop-overflow" \ + -DCMAKE_CXX_FLAGS="-Wno-error=use-after-free -Wno-error=address -Wno-error=uninitialized" \ -DCMAKE_CXX_STANDARD=%{cms_cxx_standard} \ -DCMAKE_INSTALL_PREFIX=%{i} \ -DCMAKE_INSTALL_LIBDIR=lib \ diff --git a/tensorflow-gcc14-aarch64.patch b/tensorflow-gcc14-aarch64.patch new file mode 100644 index 00000000000..43291cbd474 --- /dev/null +++ b/tensorflow-gcc14-aarch64.patch @@ -0,0 +1,31 @@ +diff --git a/tensorflow/workspace2.bzl b/tensorflow/workspace2.bzl +index e906f65b7ef..4580ceebda8 100644 +--- a/tensorflow/workspace2.bzl ++++ b/tensorflow/workspace2.bzl +@@ -137,6 +137,7 @@ def _tf_repositories(): + name = "XNNPACK", + sha256 = "0a7ad183dcb4db36e82c4c24376a28281c30e986bd2d71311e624405229a7618", + strip_prefix = "XNNPACK-659147817805d17c7be2d60bd7bbca7e780f9c82", ++ patch_file = ["//third_party:XNNPACK-aarch64-gcc14.patch"], + urls = tf_mirror_urls("https://github.com/google/XNNPACK/archive/659147817805d17c7be2d60bd7bbca7e780f9c82.zip"), + ) + # LINT.ThenChange(//tensorflow/lite/tools/cmake/modules/xnnpack.cmake) +diff --git a/third_party/XNNPACK-aarch64-gcc14.patch b/third_party/XNNPACK-aarch64-gcc14.patch +new file mode 100644 +index 00000000000..014e47c44ae +--- /dev/null ++++ b/third_party/XNNPACK-aarch64-gcc14.patch +@@ -0,0 +1,13 @@ ++diff --git a/BUILD.bazel b/BUILD.bazel ++index b2a3b58..3d7f6bc 100755 ++--- a/BUILD.bazel +++++ b/BUILD.bazel ++@@ -3378,7 +3378,7 @@ xnnpack_cc_library( ++ "-mfpu=neon-fp-armv8", ++ ], ++ aarch32_srcs = ["src/amalgam/neonfp16arith.c"], ++- aarch64_copts = ["-march=armv8.2-a+fp16"], +++ aarch64_copts = ["-march=armv8.2-a+fp16", "-Wno-error=incompatible-pointer-types"], ++ aarch64_srcs = [ ++ "src/amalgam/neonfp16arith-aarch64.c", ++ "src/amalgam/neonfp16arith.c", diff --git a/tensorflow-sources.file b/tensorflow-sources.file index a3dc3b9be26..f35c8e66e58 100644 --- a/tensorflow-sources.file +++ b/tensorflow-sources.file @@ -21,6 +21,9 @@ BuildRequires: bazel java-env git Source: git+https://github.com/%{github_user}/tensorflow.git?obj=%{branch}/%{tag}&export=tensorflow-%{realversion}&output=/tensorflow-%{realversion}.tgz +#GCC14/Aarch64 Fix: https://github.com/google/XNNPACK/issues/7733 +Patch0: tensorflow-gcc14-aarch64 + %if "%{?build_type:set}" != "set" %define build_type opt %endif @@ -33,6 +36,7 @@ Source: git+https://github.com/%{github_user}/tensorflow.git?obj=%{branch}/%{tag %prep %setup -q -n tensorflow-%{realversion} +%patch0 -p1 sed -i -e 's|lib/python[^/]*/site-packages/|lib/python%{cms_python3_major_minor_version}/site-packages/|' third_party/systemlibs/pybind11.BUILD %build diff --git a/ucx.spec b/ucx.spec index e40593ae397..7c6a590989b 100644 --- a/ucx.spec +++ b/ucx.spec @@ -56,7 +56,6 @@ Requires: xpmem --without-knem \ --with-xpmem=$XPMEM_ROOT \ --without-ugni \ - CFLAGS="-Wno-error=array-bounds" \ CPPFLAGS="-I$NUMACTL_ROOT/include" \ LDFLAGS="-L$NUMACTL_ROOT/lib" diff --git a/xz-bootstrap.spec b/xz-bootstrap.spec index 6fe5dea0ec1..2f24e800132 100644 --- a/xz-bootstrap.spec +++ b/xz-bootstrap.spec @@ -1,16 +1,10 @@ -### RPM external xz-bootstrap 5.2.5 +### RPM external xz-bootstrap 5.6.4 Source0: http://tukaani.org/xz/xz-%{realversion}.tar.gz %prep %setup -n xz-%{realversion} %build -# Update for AArch64 support -rm -f ./build-aux/config.{sub,guess} -%get_config_guess ./build-aux/config.guess -%get_config_sub ./build-aux/config.sub -chmod +x ./build-aux/config.{sub,guess} - ./configure CFLAGS='-fPIC -D_FILE_OFFSET_BITS=64 -Ofast' --prefix=%{i} --disable-static make %{makeprocesses} diff --git a/xz.spec b/xz.spec index 43e59b318f0..10a2494058f 100644 --- a/xz.spec +++ b/xz.spec @@ -1,9 +1,5 @@ -### RPM external xz 5.2.5 - -%define tag 50f585dc3b7b9b94b6b7f7a4c29903602d1e2a2d -%define branch cms/v%{realversion} -%define github_user cms-externals -Source0: git+https://github.com/%github_user/xz.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz +### RPM external xz 5.6.4 +Source0: http://tukaani.org/xz/xz-%{realversion}.tar.gz BuildRequires: autotools @@ -11,7 +7,6 @@ BuildRequires: autotools %setup -n %{n}-%{realversion} %build -./autogen.sh --no-po4a ./configure CFLAGS='-fPIC -Ofast' --prefix=%{i} --disable-static --disable-nls --disable-rpath --disable-dependency-tracking --disable-doc make %{makeprocesses} diff --git a/zstd-bootstrap.spec b/zstd-bootstrap.spec index 740df464b1f..3a03e80631b 100644 --- a/zstd-bootstrap.spec +++ b/zstd-bootstrap.spec @@ -1,4 +1,4 @@ -### RPM external zstd-bootstrap 1.5.2 +### RPM external zstd-bootstrap 1.5.4 %define keep_archives true Source: https://github.com/facebook/zstd/releases/download/v%{realversion}/zstd-%{realversion}.tar.gz From 8263f3959f043ec898ab9382264d1239e09e9b9d Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Sat, 31 May 2025 09:19:20 +0200 Subject: [PATCH 2/2] glimpse: only set build flags for gcc14 and above --- glimpse.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glimpse.spec b/glimpse.spec index aefcbeb930e..0b01f91de87 100644 --- a/glimpse.spec +++ b/glimpse.spec @@ -7,8 +7,9 @@ BuildRequires: autotools %prep %setup -n %{n}-%realversion %build - +%if %{cmscompilerv}>13 CFLAGS="-Wno-error=return-mismatch -Wno-error=implicit-int -Wno-error=implicit-function-declaration" \ +%endif ./configure --prefix=%{i} # Turn off this part, it causes problems for 32-bit-on-64-bit and is only # needed for webglimpse