diff --git a/abseil-cpp.spec b/abseil-cpp.spec index c9abcc9c0ec..258b435a0ae 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -1,4 +1,4 @@ -### RPM external abseil-cpp 20210324.2 +### RPM external abseil-cpp 20230125.3 Source: https://github.com/abseil/abseil-cpp/archive/%{realversion}.tar.gz BuildRequires: cmake gmake diff --git a/bazel-3.7.0-patches.patch b/bazel-3.7.0-patches.patch index 6ad40a69512..a502010d05b 100644 --- a/bazel-3.7.0-patches.patch +++ b/bazel-3.7.0-patches.patch @@ -1,23 +1,23 @@ diff --git a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkActionFactoryApi.java b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkActionFactoryApi.java -index 0ea30a9..8df189f 100755 +index 9f7fe1f..e584fb9 100755 --- a/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkActionFactoryApi.java +++ b/src/main/java/com/google/devtools/build/lib/starlarkbuildapi/StarlarkActionFactoryApi.java -@@ -359,7 +359,7 @@ public interface StarlarkActionFactoryApi extends StarlarkValue { +@@ -377,7 +377,7 @@ public interface StarlarkActionFactoryApi extends StarlarkValue { + + " the former are more efficient."), @Param( name = "use_default_shell_env", - type = Boolean.class, - defaultValue = "False", + defaultValue = "True", named = true, positional = false, doc = "Whether the action should use the built in shell environment or not."), diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl -index d48485b..40ca051 100755 +index bfb37bd..45e311c 100755 --- a/tools/cpp/unix_cc_configure.bzl +++ b/tools/cpp/unix_cc_configure.bzl -@@ -193,6 +193,7 @@ def _find_gold_linker_path(repository_ctx, cc): +@@ -184,6 +184,7 @@ def _find_linker_path(repository_ctx, cc, linker, is_clang): Returns: - String to put as value to -fuse-ld= flag, or None if gold couldn't be found. + String to put as value to -fuse-ld= flag, or None if linker couldn't be found. """ + return None result = repository_ctx.execute([ diff --git a/bazel-absl.patch b/bazel-absl.patch new file mode 100644 index 00000000000..5d69389e3b5 --- /dev/null +++ b/bazel-absl.patch @@ -0,0 +1,25 @@ +--- bazel/distdir_deps.bzl.orig 2023-06-12 11:36:07.650810578 +0200 ++++ bazel/distdir_deps.bzl 2023-06-12 11:37:10.490300045 +0200 +@@ -162,17 +162,17 @@ + ], + }, + "com_google_absl": { +- "archive": "20211102.0.tar.gz", +- "sha256": "dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4", ++ "archive": "20230125.3.tar.gz", ++ "sha256": "5366d7e7fa7ba0d915014d387b66d0d002c03236448e1ba9ef98122c13b35c36", + "urls": [ +- "https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz", +- "https://github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz", ++ "https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/refs/tags/20230125.3.tar.gz", ++ "https://github.com/abseil/abseil-cpp/archive/refs/tags/20230125.3.tar.gz", + ], + "used_in": [ + "additional_distfiles", + "test_WORKSPACE_files", + ], +- "strip_prefix": "abseil-cpp-20211102.0", ++ "strip_prefix": "abseil-cpp-20230125.3", + }, + "zstd-jni": { + "archive": "v1.5.0-4.zip", diff --git a/bazel.spec b/bazel.spec index b54af31978f..71ddd704f6f 100644 --- a/bazel.spec +++ b/bazel.spec @@ -1,4 +1,4 @@ -### RPM external bazel 3.7.2 +### RPM external bazel 5.3.0 Source: https://github.com/bazelbuild/bazel/releases/download/%{realversion}/bazel-%{realversion}-dist.zip @@ -17,7 +17,7 @@ BuildRequires: java-env python3 python-python3 # configuration issue # https://github.com/bazelbuild/bazel/issues/9392 Patch0: bazel-3.7.0-patches -Patch1: bazel-3.7.2-gcc11 +Patch1: bazel-absl %prep %setup -q -c -n bazel-%{realversion} @@ -28,6 +28,7 @@ Patch1: bazel-3.7.2-gcc11 %build export EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk --jobs %{compiling_processes}" +export BAZEL_CXXOPTS="-std=c++17" bash ./compile.sh %install diff --git a/eigen.spec b/eigen.spec index dd931cb65cb..f0b9ea51a01 100644 --- a/eigen.spec +++ b/eigen.spec @@ -1,7 +1,7 @@ -### RPM external eigen 82dd3710dac619448f50331c1d6a35da673f764a +### RPM external eigen 3bb6a48d8c171cf20b5f8e48bfb4e424fbd4f79e ## INITENV +PATH PKG_CONFIG_PATH %{i}/share/pkgconfig ## NOCOMPILER -%define tag 43d8892d117e4e76b6c472b942ebefee00bfc172 +%define tag fe7e6a8ef4921dd6c7b5b893a9972948f1b451d3 %define branch cms/master/%{realversion} %define github_user cms-externals Source: git+https://github.com/%{github_user}/eigen-git-mirror.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz @@ -13,7 +13,7 @@ BuildRequires: cmake %build mkdir build cd build -cmake -DCMAKE_INSTALL_PREFIX=%{i} -DBUILD_TESTING=OFF ../ +cmake -DCMAKE_INSTALL_PREFIX=%{i} -DBUILD_TESTING=OFF -DCMAKE_CXX_STANDARD=17 ../ %install cd build diff --git a/fasthadd.spec b/fasthadd.spec index 3f6e3150ee2..a1383dbe2f0 100644 --- a/fasthadd.spec +++ b/fasthadd.spec @@ -1,10 +1,11 @@ -### RPM external fasthadd 2.3 +### RPM external fasthadd 2.4 #Change the commit hash every time a new version is needed. -%define commit 905af02d3369428df677c232537da6fca8982ff3 -Source0: https://raw.githubusercontent.com/cms-sw/cmssw/%commit/DQMServices/Components/bin/fastHadd.cc -Source1: https://raw.githubusercontent.com/cms-sw/cmssw/%commit/DQMServices/Core/src/ROOTFilePB.proto -Requires: protobuf root +%define commit 003102d8516b652d80e76d8ca1c4b5dc47c9015b +%define user iarspider +Source0: https://raw.githubusercontent.com/%user/cmssw/%commit/DQMServices/Components/bin/fastHadd.cc +Source1: https://raw.githubusercontent.com/%user/cmssw/%commit/DQMServices/Core/src/ROOTFilePB.proto +Requires: protobuf root abseil-cpp %prep @@ -14,9 +15,10 @@ mkdir -p %i/bin %i/etc/profile.d cp %{_sourcedir}/fastHadd.cc . cp %{_sourcedir}/ROOTFilePB.proto . protoc -I ./ --cpp_out=./ ROOTFilePB.proto -perl -p -i -e 's|DQMServices/Core/src/||' ROOTFilePB.pb.cc fastHadd.cc +perl -p -i -e 's|DQMServices/Core/interface/||' ROOTFilePB.pb.cc fastHadd.cc g++ -O2 -o %i/bin/fastHadd ROOTFilePB.pb.cc ./fastHadd.cc \ - -I$PROTOBUF_ROOT/include -L$PROTOBUF_ROOT/lib -lprotobuf \ + -I$PROTOBUF_ROOT/include -L$PROTOBUF_ROOT/lib -lprotobuf -L$ABSEIL_CPP_ROOT/lib -labsl_log_internal_check_op \ + -labsl_log_internal_message \ `root-config --cflags --libs` %install diff --git a/flatbuffers-7422.patch b/flatbuffers-7422.patch new file mode 100644 index 00000000000..e9952469069 --- /dev/null +++ b/flatbuffers-7422.patch @@ -0,0 +1,11 @@ +--- flatbuffers/CMakeLists.txt.orig 2023-05-30 14:34:01.518107275 +0200 ++++ flatbuffers/CMakeLists.txt 2023-05-30 14:35:11.112747553 +0200 +@@ -223,7 +223,7 @@ + "${CMAKE_CXX_FLAGS} -std=c++0x") + endif(CYGWIN) + set(CMAKE_CXX_FLAGS +- "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror -Wextra -Werror=shadow") ++ "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wno-unknown-warning-option -Werror -Wextra -Werror=shadow -Wno-error=stringop-overflow") + set(FLATBUFFERS_PRIVATE_CXX_FLAGS "-Wold-style-cast") + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.4) + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0) diff --git a/flatbuffers.spec b/flatbuffers.spec index 622c4dc864c..970fd0adb59 100644 --- a/flatbuffers.spec +++ b/flatbuffers.spec @@ -1,15 +1,17 @@ -### RPM external flatbuffers 1.12.0 +### RPM external flatbuffers 2.0.6 ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 %define tag v%{realversion} %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 +Patch0: flatbuffers-7422 BuildRequires: cmake gmake %prep %setup -n %{n}-%{realversion} +%patch0 -p1 %build rm -rf ../build @@ -29,3 +31,6 @@ make -v %{makeprocesses} cd ../build make %{makeprocesses} install + +%post +%{relocateConfig}lib64/pkgconfig/flatbuffers.pc diff --git a/gbl.spec b/gbl.spec index 50bd1eba28e..b512367a708 100644 --- a/gbl.spec +++ b/gbl.spec @@ -19,7 +19,8 @@ cmake ../cpp \ -DCMAKE_INSTALL_PREFIX=%{i} \ -DCMAKE_BUILD_TYPE=Release \ -DEIGEN3_INCLUDE_DIR=${EIGEN_ROOT}/include/eigen3 \ - -DSUPPORT_ROOT=False + -DSUPPORT_ROOT=False \ + -DCMAKE_CXX_STANDARD=17 make %{makeprocesses} diff --git a/grpc-gcc11.patch b/grpc-gcc11.patch deleted file mode 100644 index 6b90ca5ebe3..00000000000 --- a/grpc-gcc11.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc b/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc -index 19f9aab..27fec21 100644 ---- a/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc -+++ b/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc -@@ -37,6 +37,7 @@ - - #include - #include -+#include - #include "absl/base/internal/hide_ptr.h" - #include "absl/base/internal/raw_logging.h" - #include "absl/base/internal/spinlock.h" -diff --git a/third_party/abseil-cpp/absl/copts/GENERATED_AbseilCopts.cmake b/third_party/abseil-cpp/absl/copts/GENERATED_AbseilCopts.cmake -index 97bd283..40d66ea 100644 ---- a/third_party/abseil-cpp/absl/copts/GENERATED_AbseilCopts.cmake -+++ b/third_party/abseil-cpp/absl/copts/GENERATED_AbseilCopts.cmake -@@ -205,6 +205,7 @@ list(APPEND ABSL_RANDOM_HWAES_ARM32_FLAGS - - list(APPEND ABSL_RANDOM_HWAES_ARM64_FLAGS - "-march=armv8-a+crypto" -+ "-mno-outline-atomics" - ) - - list(APPEND ABSL_RANDOM_HWAES_MSVC_X64_FLAGS -diff --git a/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc b/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc -index 5d13bdb..150a43f 100644 ---- a/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc -+++ b/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc -@@ -135,7 +135,7 @@ static bool SetupAlternateStackOnce() { - #else - const size_t page_mask = sysconf(_SC_PAGESIZE) - 1; - #endif -- size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; -+ size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; - #if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \ - defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER) - // Account for sanitizer instrumentation requiring additional stack space. diff --git a/grpc.spec b/grpc.spec index 4223da1e9f8..f7a66f693f7 100644 --- a/grpc.spec +++ b/grpc.spec @@ -2,7 +2,6 @@ Source: git+https://github.com/grpc/grpc.git?obj=master/v%{realversion}&export=%{n}-%{realversion}&submodules=1&output=/%{n}-%{realversion}.tgz Patch0: grpc-ssl-fix -Patch1: grpc-gcc11 BuildRequires: cmake ninja go Requires: protobuf zlib pcre c-ares abseil-cpp re2 %define keep_archives true @@ -13,7 +12,6 @@ Requires: protobuf zlib pcre c-ares abseil-cpp re2 if [ ! -z "$OPENSSL_ROOT" ]; then %patch0 -p1 fi -%patch1 -p1 %build rm -rf ../build diff --git a/java-env.spec b/java-env.spec index 5c7d34ea050..822bfbbfd62 100644 --- a/java-env.spec +++ b/java-env.spec @@ -4,7 +4,12 @@ ## INITENV +PATH LD_LIBRARY_PATH %{java_home}/lib ## NOCOMPILER +%if %{rhel} < 9 +# /usr/lib/jvm/java on EL8 contains java 1.8, and Bazel requires java 11 +%define java_home /usr/lib/jvm/java-11 +%else %define java_home /usr/lib/jvm/java +%endif Source: none %prep diff --git a/libzmq.spec b/libzmq.spec index a033ef6a8db..80be965a45e 100644 --- a/libzmq.spec +++ b/libzmq.spec @@ -1,9 +1,13 @@ -### RPM external libzmq 4.3.4 -Source: https://github.com/zeromq/libzmq/releases/download/v%{realversion}/zeromq-%{realversion}.tar.gz +### RPM external libzmq 4.3.5-5bf04ee +%define branch master +%define tag 5bf04ee2ff207f0eaf34298658fe354ea61e1839 +Source: git+https://github.com/zeromq/libzmq.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz BuildRequires: autotools %prep -%setup -n zeromq-%{realversion} +%setup -n %{n}-%{realversion} + +./autogen.sh ./configure --prefix=%{i} \ --without-docs \ diff --git a/lwtnn.spec b/lwtnn.spec index 7591d8f5ed8..c746503c8c1 100644 --- a/lwtnn.spec +++ b/lwtnn.spec @@ -21,7 +21,8 @@ cmake ../%{n}-%{realversion} \ -DCMAKE_BUILD_TYPE=Release \ -DBUILTIN_BOOST=OFF \ -DBUILTIN_EIGEN=OFF \ - -DCMAKE_PREFIX_PATH="${EIGEN_ROOT};${BOOST_ROOT}" + -DCMAKE_PREFIX_PATH="${EIGEN_ROOT};${BOOST_ROOT}" \ + -DCMAKE_CXX_STANDARD=17 ninja -v %{makeprocesses} diff --git a/onnxruntime.spec b/onnxruntime.spec index 79f4cb6cba3..686e131c0e0 100644 --- a/onnxruntime.spec +++ b/onnxruntime.spec @@ -46,12 +46,17 @@ cmake ../%{n}-%{realversion}/cmake -GNinja \ -Donnxruntime_USE_FULL_PROTOBUF=ON \ -Donnxruntime_DISABLE_CONTRIB_OPS=OFF \ -Donnxruntime_PREFER_SYSTEM_LIB=ON \ + -Donnxruntime_BUILD_UNIT_TESTS=OFF \ -DCMAKE_CUDA_ARCHITECTURES=$(echo %{cuda_arch} | tr ' ' ';' | sed 's|;;*|;|') \ -DCMAKE_CUDA_FLAGS="-cudart shared" \ -DCMAKE_CUDA_RUNTIME_LIBRARY=Shared \ -DCMAKE_TRY_COMPILE_PLATFORM_VARIABLES="CMAKE_CUDA_RUNTIME_LIBRARY" \ -DCMAKE_PREFIX_PATH="${ZLIB_ROOT};${LIBPNG_ROOT};${PROTOBUF_ROOT};${PY3_PYBIND11_ROOT};${RE2_ROOT}" \ - -DRE2_INCLUDE_DIR="${RE2_ROOT}/include" + -DRE2_INCLUDE_DIR="${RE2_ROOT}/include" \ + -DCMAKE_CXX_FLAGS="-Wno-error=stringop-overflow" + +# False positive string overflow +# https://github.com/google/flatbuffers/issues/7366 ninja -v %{makeprocesses} python3 ../%{n}-%{realversion}/setup.py build diff --git a/opencv.spec b/opencv.spec index 17fd31ec492..f720a552211 100644 --- a/opencv.spec +++ b/opencv.spec @@ -19,6 +19,7 @@ cd ../build cmake ../%{n}-%{realversion} \ -GNinja \ -DCMAKE_INSTALL_PREFIX="%{i}" \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_LIBDIR=lib \ -DWITH_EIGEN=ON \ -DBUILD_EXAMPLES=OFF \ diff --git a/pip/jax.file b/pip/jax.file new file mode 100644 index 00000000000..2ca0e6d8a23 --- /dev/null +++ b/pip/jax.file @@ -0,0 +1 @@ +Requires: py3-ml_dtypes py3-numpy py3-opt-einsum py3-scipy py3-importlib-metadata diff --git a/pip/ml_dtypes.file b/pip/ml_dtypes.file new file mode 100644 index 00000000000..fd1acbb5e66 --- /dev/null +++ b/pip/ml_dtypes.file @@ -0,0 +1 @@ +Requires: py3-pybind11 py3-numpy diff --git a/pip/onnx.file b/pip/onnx.file index e5499c95ceb..858b14382b9 100644 --- a/pip/onnx.file +++ b/pip/onnx.file @@ -1,3 +1,4 @@ +Patch0: py3-onnx Requires: cmake protobuf py3-protobuf py3-six py3-typing-extensions py3-numpy py3-pytest-runner %define runpath_opts -n pb -n onnx -%define PipPreBuild export ONNX_ML=1 +%define PipPreBuild export ONNX_ML=1;export CMAKE_ARGS="-DCMAKE_CXX_STANDARD=17 -DONNX_USE_PROTOBUF_SHARED_LIBS=ON -DProtobuf_USE_STATIC_LIBS=OFF -DCMAKE_PREFIX_PATH=%{cmake_prefix_path}" diff --git a/pip/requirements.txt b/pip/requirements.txt index 039cb535ec0..fcb153be62f 100644 --- a/pip/requirements.txt +++ b/pip/requirements.txt @@ -74,11 +74,11 @@ contextvars==2.4 coverage==7.2.2 cppy==1.2.1 # Newer versions of py3-cryptography require OpenSSL 1.1.0+, see https://github.com/pyca/cryptography/issues/5906 -cryptography==40.0.2 +cryptography==41.0.1 cryptography==3.2.1 ; cmsos_name=='slc7' cx-Oracle==8.3.0 cycler==0.11.0 -cython==0.29.34 +cython==0.29.35 dask==2023.4.0 dask-awkward==2023.4.1 decorator==5.1.1 @@ -147,6 +147,7 @@ ipython==8.12.0 ipywidgets==8.0.6 isort==5.12.0 jaraco-classes==3.2.3 +jax==0.4.12 jedi==0.18.2 jeepney==0.8.0 Jinja2==3.1.2 @@ -165,7 +166,7 @@ jupyter-server-mathjax==0.2.6 jupyter-server-terminals==0.4.4 jupyterlab-widgets==3.0.7 #NO_AUTO_UPDATE: needs newer TF -keras==2.6.0 +keras==2.11.0 keras-applications==1.0.8 keras-preprocessing==1.1.2 keras2onnx==1.7.0 @@ -192,6 +193,7 @@ mdurl==0.1.2 meson==1.1.0 meson-python==0.12.1 mistune==2.0.5 +ml_dtypes==0.2.0 mock==5.0.1 more-itertools==9.1.0 mpld3==0.5.9 @@ -216,16 +218,16 @@ notebook-shim==0.2.2 numexpr==2.8.4 # setuptools version <64 is needed by numpy: https://github.com/pypa/setuptools/issues/3549 # NO_AUTO_UPDATE: update together with tensorflow -numpy==1.23.5 +numpy==1.24.3 # NO_AUTO_UPDATE:1 -onnx==1.12.0 +onnx==1.14.0 onnxmltools==1.11.2 onnxconverter-common==1.13.0 oauthlib==3.2.2 opt-einsum==3.3.0 pkginfo==1.9.6 packaging==23.0 -pandas==2.0.0 +pandas==2.0.1 pandocfilters==1.5.0 parsimonious==0.10.0 parso==0.8.3 @@ -251,7 +253,7 @@ prettytable==3.6.0 prometheus-client==0.16.0 prompt_toolkit==3.0.38 #NO_AUTO_UPDATE:1: Update together with Tensorflow -protobuf==4.21.7 +protobuf==4.21.9 prwlock==0.4.1 psutil==5.9.4 ptyprocess==0.7.0 @@ -340,8 +342,9 @@ sympy==1.11.1 tables==3.8.0 tenacity==8.2.2 #NO_AUTO_UPDATE:1: Force to use tensorflow 2.6.4; this should match the version in tensorflow-sources.spec -tensorflow==2.6.4 +tensorflow==2.12.0 tensorboard==2.12.1 +tensorflow-io-gcs-filesystem==0.32.0 tensorflow-estimator==2.12.0 tensorboard-data-server==0.7.0 tensorboard-plugin-wit==1.8.1 diff --git a/pip/tensorflow-io-gcs-filesystem.file b/pip/tensorflow-io-gcs-filesystem.file new file mode 100644 index 00000000000..7d44859522a --- /dev/null +++ b/pip/tensorflow-io-gcs-filesystem.file @@ -0,0 +1,2 @@ +%define source0 git+https://github.com/tensorflow/io?obj=master/v%{realversion}&export=%{n}-%{realversion}&output=/source.tar.gz +Patch0: py3-tensorflow-io-gcs-filesystem diff --git a/pip/tensorflow.file b/pip/tensorflow.file index a2dded283dd..272f0d33f39 100644 --- a/pip/tensorflow.file +++ b/pip/tensorflow.file @@ -2,9 +2,11 @@ Requires: py3-tensorboard py3-opt-einsum py3-tensorflow-estimator py3-wrapt py3- Requires: tensorflow-sources %define PipPreBuildPy PIPFILE=${TENSORFLOW_SOURCES_ROOT}/tensorflow-%{realversion}-cp%{cms_python3_major_minor}-cp%{cms_python3_major_minor}-linux_%{_arch}.whl %define PipPostBuild rm -f %{i}/bin/tensorboard* ; ls %{i}/bin/* | xargs -i mv '{}' '{}3' +%define PipDepsPost | grep -v libclang ## INCLUDE tensorflow-requires Requires: py3-funcsigs py3-pbr py3-packaging py3-appdirs py3-pyparsing py3-mock py3-Werkzeug -Requires: py3-grpcio py3-astunparse py3-keras +Requires: py3-grpcio py3-astunparse py3-keras py3-jax +Requires: py3-tensorflow-io-gcs-filesystem Requires: llvm %define source0 none %define source_file none diff --git a/professor2.spec b/professor2.spec index 930eea158f0..bf84c0c49d7 100644 --- a/professor2.spec +++ b/professor2.spec @@ -3,7 +3,7 @@ Source: http://www.hepforge.org/archive/professor/Professor-%{realversion}.tar.gz Requires: py3-matplotlib root yoda eigen -BuildRequires: py3-cython +BuildRequires: py3-cython py3-pip Patch0: professor2-ppc64-flag-change @@ -14,6 +14,14 @@ Patch0: professor2-ppc64-flag-change %patch0 -p1 %endif +# Make sure the default c++sdt stand is c++11 in pyext/setup.py +grep -q 'std=c[+][+]11' pyext/setup.py +# Change c++ std to 17 +sed -i -e 's|-std=c[+][+]11|-std=c++17|' pyext/setup.py +# Same for Makefile +grep -q 'CXXSTD := c[+][+]11' Makefile +sed -i -e 's|CXXSTD := c[+][+]11|CXXSTD := c++17|' Makefile + %define build_flags CPPFLAGS=-I${EIGEN_ROOT}/include/eigen3 PYTHON=$(which python3) PROF_VERSION=%{realversion} PYTHONPATH=./${PYTHON3_LIB_SITE_PACKAGES} %build diff --git a/protobuf-3.15-gcc10.patch b/protobuf-3.15-gcc10.patch deleted file mode 100644 index ac1198f1004..00000000000 --- a/protobuf-3.15-gcc10.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/google/protobuf/parse_context.h b/src/google/protobuf/parse_context.h -index 7966d99d57..3754f983b1 100644 ---- a/src/google/protobuf/parse_context.h -+++ b/src/google/protobuf/parse_context.h -@@ -348,7 +348,6 @@ class PROTOBUF_EXPORT EpsCopyInputStream { - if (ptr - buffer_end_ > limit_) return nullptr; - while (limit_ > kSlopBytes) { - size_t chunk_size = buffer_end_ + kSlopBytes - ptr; -- GOOGLE_DCHECK_GE(chunk_size, static_cast(0)); - append(ptr, chunk_size); - ptr = Next(); - if (ptr == nullptr) return limit_end_; diff --git a/protobuf.spec b/protobuf.spec index 373627b8e3f..aed1614ae93 100644 --- a/protobuf.spec +++ b/protobuf.spec @@ -1,4 +1,4 @@ -### RPM external protobuf 3.15.1 +### RPM external protobuf 3.21.9 #============= IMPORTANT NOTE ========================# # When changing the version of protobuf, remember to regenerate protobuf objects in CMSSW # current recipe for this is: @@ -8,25 +8,26 @@ # protoc --cpp_out=. DQMServices/Core/src/ROOTFilePB.proto ####################################################### -Source: https://github.com/google/protobuf/archive/v%{realversion}.tar.gz -Patch0: protobuf-3.15-gcc10 +%define keep_archives true + +Source: https://github.com/protocolbuffers/protobuf/archive/v%{realversion}.zip Requires: zlib BuildRequires: cmake ninja %prep %setup -n %{n}-%{realversion} -%patch0 -p1 sed -i -e 's|CMAKE_CXX_STANDARD *11|CMAKE_CXX_STANDARD 17|' cmake/CMakeLists.txt %build rm -rf ../build mkdir ../build cd ../build -cmake ../%{n}-%{realversion}/cmake \ +cmake ../%{n}-%{realversion} \ -G Ninja \ -DCMAKE_INSTALL_PREFIX="%{i}" \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_BUILD_SHARED_LIBS=ON \ + -Dutf8_range_ENABLE_INSTALL=ON \ -DCMAKE_INSTALL_LIBDIR=lib \ -DCMAKE_CXX_FLAGS="-I${ZLIB_ROOT}/include" \ -DCMAKE_C_FLAGS="-I${ZLIB_ROOT}/include" \ @@ -40,3 +41,4 @@ ninja -v %{makeprocesses} cd ../build ninja -v %{makeprocesses} install rm -rf %{i}/lib/pkgconfig + diff --git a/py3-onnx.patch b/py3-onnx.patch new file mode 100644 index 00000000000..e00268deacd --- /dev/null +++ b/py3-onnx.patch @@ -0,0 +1,25 @@ +--- a/setup.py 2023-06-09 13:38:14.496028111 +0200 ++++ b/setup.py 2023-06-09 13:38:51.851715431 +0200 +@@ -30,7 +30,7 @@ + + WINDOWS = os.name == "nt" + +-CMAKE = find_executable("cmake3") or find_executable("cmake") ++CMAKE = find_executable("cmake") + MAKE = find_executable("make") + + install_requires = [] +--- a/CMakeLists.txt 2023-06-09 13:48:24.057589186 +0200 ++++ b/CMakeLists.txt 2023-06-09 13:48:36.130217133 +0200 +@@ -56,9 +56,9 @@ + endif() + + # Required to use /std:c++17 or higher on Windows +-# For other platforms, set C++11 as standard for the whole project ++# For other platforms, set C++17 as standard for the whole project + if(NOT MSVC) +- set(CMAKE_CXX_STANDARD 11) ++ set(CMAKE_CXX_STANDARD 17) + else() + string(APPEND CMAKE_CXX_FLAGS " /std:c++17") + endif() diff --git a/py3-tensorflow-io-gcs-filesystem.patch b/py3-tensorflow-io-gcs-filesystem.patch new file mode 100644 index 00000000000..874283925b2 --- /dev/null +++ b/py3-tensorflow-io-gcs-filesystem.patch @@ -0,0 +1,11 @@ +--- a/setup.py 2023-06-14 10:08:18.645471784 +0200 ++++ b/setup.py 2023-06-14 10:08:39.563296729 +0200 +@@ -46,7 +46,7 @@ + sys.argv.remove("--project") + sys.argv.pop(project_idx) + else: +- project = "tensorflow-io" ++ project = "tensorflow-io-gcs-filesystem" + + assert ( + project.replace("_", "-") == "tensorflow-io" diff --git a/scram-tools.file/tools/abseil-cpp/abseil-cpp.xml b/scram-tools.file/tools/abseil-cpp/abseil-cpp.xml index 3b755a6d45b..a975ddc6de6 100644 --- a/scram-tools.file/tools/abseil-cpp/abseil-cpp.xml +++ b/scram-tools.file/tools/abseil-cpp/abseil-cpp.xml @@ -28,7 +28,6 @@ - @@ -60,7 +59,6 @@ - diff --git a/tensorflow-sources.file b/tensorflow-sources.file index 7df5580ded3..fc7e041395b 100644 --- a/tensorflow-sources.file +++ b/tensorflow-sources.file @@ -39,6 +39,9 @@ BAZEL_OPTS="$BAZEL_OPTS --copt=-mcpu=native --copt=-mtune=native" %endif BAZEL_OPTS="$BAZEL_OPTS --config=%{build_type} --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 %{makeprocesses}" BAZEL_OPTS="$BAZEL_OPTS --config=noaws --config=nogcp --config=nohdfs --config=nonccl" +%ifarch ppc64le +BAZEL_OPTS="$BAZEL_OPTS --define=tflite_with_xnnpack=false --define tflite_kernel_use_xnnpack=false" +%endif %if %{enable_gpu} BAZEL_OPTS="$BAZEL_OPTS --config=cuda" @@ -85,10 +88,9 @@ echo "cython:" >> ${TF_CMS_EXTERNALS} echo "flatbuffers:${FLATBUFFERS_ROOT}" >> ${TF_CMS_EXTERNALS} echo "pybind11:${PY3_PYBIND11_ROOT}" >> ${TF_CMS_EXTERNALS} echo "functools32_archive:" >> ${TF_CMS_EXTERNALS} -echo "enum34_archive:" >> ${TF_CMS_EXTERNALS} echo "astor_archive:" >> ${TF_CMS_EXTERNALS} echo "six_archive:" >> ${TF_CMS_EXTERNALS} -echo "absl_py:" >> ${TF_CMS_EXTERNALS} +echo "absl_py:${PY3_ABSL_PY_ROOT}" >> ${TF_CMS_EXTERNALS} echo "termcolor_archive:" >> ${TF_CMS_EXTERNALS} echo "typing_extensions_archive:" >> ${TF_CMS_EXTERNALS} echo "pasta:" >> ${TF_CMS_EXTERNALS} @@ -96,6 +98,7 @@ echo "wrapt:" >> ${TF_CMS_EXTERNALS} echo "gast_archive:" >> ${TF_CMS_EXTERNALS} echo "org_python_pypi_backports_weakref:" >> ${TF_CMS_EXTERNALS} echo "opt_einsum_archive:" >> ${TF_CMS_EXTERNALS} +echo "boringssl:" >> ${TF_CMS_EXTERNALS} export TF_SYSTEM_LIBS=$(cat ${TF_CMS_EXTERNALS} | sed 's|:.*||' | tr "\n" "," | sed 's|,*$||') @@ -187,6 +190,7 @@ copy_headers() { copy_headers "$PWD" tensorflow/compiler copy_headers "$PWD" tensorflow/core/profiler/internal copy_headers "$PWD" tensorflow/core/profiler/lib +copy_headers "$PWD" tensorflow/core/util/tensor_bundle # do not copy the protobuf headers as we use the version in cmsdist # copy_headers "$PWD/tensorflow/contrib/makefile/downloads/protobuf/src" google @@ -197,5 +201,14 @@ popd %endif +#FIXME: for some reason farmhash_gpu.h is a broken symlink +optdir=$(ls -d $PWD/bazel-out/*-%{build_type}) +if [ -L ${optdir}/bin/external/farmhash_gpu_archive/_virtual_includes/farmhash_gpu/third_party/farmhash_gpu/src/farmhash_gpu.h ] ; then + if [ ! -e ${optdir}/bin/external/farmhash_gpu_archive/_virtual_includes/farmhash_gpu/third_party/farmhash_gpu/src/farmhash_gpu.h ] ; then + ln -sf ${optdir}/bin/tensorflow/tools/pip_package/build_pip_package.runfiles/org_tensorflow/external/farmhash_gpu_archive/src/farmhash_gpu.h \ + ${optdir}/bin/external/farmhash_gpu_archive/_virtual_includes/farmhash_gpu/third_party/farmhash_gpu/src/farmhash_gpu.h + fi +fi + # create the wheel file that is installed in py2-tensorflow bazel-bin/tensorflow/tools/pip_package/build_pip_package %{i} diff --git a/tensorflow-sources.spec b/tensorflow-sources.spec index e6715733ae6..d3b48c723e2 100644 --- a/tensorflow-sources.spec +++ b/tensorflow-sources.spec @@ -1,5 +1,5 @@ -### RPM external tensorflow-sources 2.6.4 -%define tag 88c18549eb072773f551e3332f718b33db67a46d +### RPM external tensorflow-sources 2.12.0 +%define tag bb361a0a183d45222d8ff7dbf4a04c44c0e094bd %define branch cms/v%{realversion} %define github_user cms-externals %define python_cmd python3 @@ -8,4 +8,3 @@ %define pythonOnly no %define vectorize_flag -msse3 ## INCLUDE tensorflow-sources - diff --git a/tensorflow.spec b/tensorflow.spec index 8f7eb25891e..9e3c157c052 100644 --- a/tensorflow.spec +++ b/tensorflow.spec @@ -1,4 +1,4 @@ -### RPM external tensorflow 2.6.4 +### RPM external tensorflow 2.12.0 %if "%{?vectorized_package:set}" != "set" %define source_package tensorflow-sources %else