diff --git a/SCRAMV2.spec b/SCRAMV2.spec new file mode 100644 index 00000000000..bde16ae44f2 --- /dev/null +++ b/SCRAMV2.spec @@ -0,0 +1,113 @@ +### RPM lcg SCRAMV2 V2_2_9_pre16 +## NOCOMPILER +## NO_VERSION_SUFFIX + +BuildRequires: gmake + +Provides: perl(BuildSystem::Template::Plugins::PluginCore) +Provides: perl(BuildSystem::TemplateStash) +Provides: perl(Cache::CacheUtilities) +Provides: perl(BuildSystem::ToolManager) + +%define tag da6e6eb53b7f982049a165588c2015262b6f8146 +%define branch SCRAMV2 +%define github_user cms-sw +Source: git+https://github.com/%{github_user}/SCRAM.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz + +%define scramv1_dir %{pkgcategory}/SCRAMV1/%{v} +%define SCRAM_ALL_VERSIONS V[0-9][0-9]*_[0-9][0-9]*_[0-9][0-9]* +%define SCRAM_REL_MINOR %(echo %realversion | grep '%{SCRAM_ALL_VERSIONS}' | sed 's|^\\(V[0-9][0-9]*_[0-9][0-9]*\\)_.*|\\1|') +%define SCRAM_REL_MAJOR %(echo %realversion | sed 's|^\\(V[0-9][0-9]*\\)_.*|\\1|') +%define SetLatestVersion \ + vers="" \ + for ver in `find %{pkgcategory}/SCRAMV1 -maxdepth 2 -mindepth 2 -name "bin" -type d | sed 's|/bin$||' | xargs -I '{}' basename '{}' | grep "$VERSION_REGEXP" `; do \ + ver_str=`echo $ver | sed 's|-.\\+$||' | tr '_' '\\n' | sed 's|V\\([0-9]\\)$|V0\\1|;s|^\\([0-9]\\)$|0\\1|' | tr '\\n' '_'` \ + vers="${ver_str}zzz:${ver} ${vers}" \ + done \ + echo $vers | tr ' ' '\\n' | grep -v '^$' | sort | tail -1 | sed 's|.*:||' > etc/$VERSION_FILE \ + [ -s etc/$VERSION_FILE ] || rm -f etc/$VERSION_FILE + +%define BackwardCompatibilityVersionPolicy \ + touch etc/default-scram/%{SCRAM_REL_MINOR} \ + for ver in `find etc/default-scram -maxdepth 1 -mindepth 1 -name "%{SCRAM_REL_MAJOR}_[0-9]*" -type f | xargs -I '{}' basename '{}' | grep 'V[0-9][0-9]*_[0-9][0-9]*$' `; do \ + case $ver in \ + V2_[01] ) ;;\ + * ) \ + if [ -f etc/default-scram/%{SCRAM_REL_MAJOR} ] ; then \ + cp etc/default-scram/%{SCRAM_REL_MAJOR} etc/default-scram/$ver \ + else\ + rm -f etc/default-scram/$ver \ + fi;;\ + esac \ + done + +%prep +#SCRAM version policy check +if [ "X%{SCRAM_REL_MINOR}" == "X" ] ; then + echo "You are trying to build SCRAM version %v which does not follow the SCRAM version policy. Valid SCRAM versions should be of the form V[0-9]+_[0-9]+_[0-9].*" + exit 1 +fi + +%setup -n %{n}-%{realversion} +%build +gmake %{makeprocesses} all INSTALL_BASE=%{instroot} VERSION=%{realversion} PREFIX=%{i} + +%install +gmake %{makeprocesses} install INSTALL_BASE=%{instroot} VERSION=%{realversion} PREFIX=%{i} + +%post +%{relocateRpmPkg}bin/scram +sed -i -e "s|dbPath = '$RPM_INSTALL_PREFIX';|dbPath = '$CMS_INSTALL_PREFIX';|" $RPM_INSTALL_PREFIX/%{pkgrel}/bin/scram +echo "SCRAMV1_ROOT='$CMS_INSTALL_PREFIX/%{pkgrel}'" > $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh +echo "SCRAMV1_VERSION='%v'" >> $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh +echo "set SCRAMV1_ROOT='$CMS_INSTALL_PREFIX/%{pkgrel}'" > $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.csh +echo "set SCRAMV1_VERSION='%v'" >> $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.csh + +if [ ! -d $RPM_INSTALL_PREFIX/etc/scramrc ] ; then + mkdir -p $RPM_INSTALL_PREFIX/etc/scramrc + touch $RPM_INSTALL_PREFIX/etc/scramrc/links.db + echo 'CMSSW=$SCRAM_ARCH/cms/cmssw/CMSSW_*' > $RPM_INSTALL_PREFIX/etc/scramrc/cmssw.map + echo 'CMSSW=$SCRAM_ARCH/cms/cmssw-patch/CMSSW_*' > $RPM_INSTALL_PREFIX/etc/scramrc/cmssw-patch.map + echo 'CORAL=$SCRAM_ARCH/cms/coral/CORAL_*' > $RPM_INSTALL_PREFIX/etc/scramrc/coral.map +fi + +if [ ! -d $RPM_INSTALL_PREFIX/%{cmsplatf}/%{scramv1_dir} ] ; then + mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/%{scramv1_dir} + rsync --links --ignore-existing --recursive $RPM_INSTALL_PREFIX/%{pkgrel}/ $RPM_INSTALL_PREFIX/%{cmsplatf}/%{scramv1_dir}/ +fi + +touch $RPM_INSTALL_PREFIX/etc/scramrc/site.cfg +mkdir -p $RPM_INSTALL_PREFIX/%{cmsplatf}/etc/default-scram $RPM_INSTALL_PREFIX/share/etc/default-scram +cd $RPM_INSTALL_PREFIX/%{cmsplatf} +VERSION_REGEXP="%{SCRAM_ALL_VERSIONS}" ; VERSION_FILE=default-scramv1-version ; %{SetLatestVersion} +VERSION_REGEXP="%{SCRAM_REL_MAJOR}_" ; VERSION_FILE=default-scram/%{SCRAM_REL_MAJOR}; %{SetLatestVersion} +%{BackwardCompatibilityVersionPolicy} + +#Create a shared copy of this version +if [ ! -d $RPM_INSTALL_PREFIX/share/%{scramv1_dir} ] ; then + mkdir -p $RPM_INSTALL_PREFIX/share/%{scramv1_dir}/ + rsync --links --ignore-existing --recursive $RPM_INSTALL_PREFIX/%{pkgrel}/ $RPM_INSTALL_PREFIX/share/%{scramv1_dir}/ + sed -i -e 's|/%{pkgrel}|/share/%{scramv1_dir}|g' $RPM_INSTALL_PREFIX/share/%{scramv1_dir}/etc/profile.d/init.*sh +fi + +cd $RPM_INSTALL_PREFIX/share +VERSION_REGEXP="%{SCRAM_ALL_VERSIONS}" ; VERSION_FILE=default-scramv1-version ; %{SetLatestVersion} +VERSION_REGEXP="%{SCRAM_REL_MAJOR}_" ; VERSION_FILE=default-scram/%{SCRAM_REL_MAJOR}; %{SetLatestVersion} + +if [ `cat $RPM_INSTALL_PREFIX/share/etc/default-scramv1-version` == '%v' ] ; then + mkdir -p $RPM_INSTALL_PREFIX/share/man/man1 + cp -f $RPM_INSTALL_PREFIX/share/%{scramv1_dir}/docs/man/man1/scram.1 ${RPM_INSTALL_PREFIX}/share/man/man1/scram.1 +fi + +#FIMEME: Remove it when cmsBuild has a fix +#For some strange reason we need something after the last statement +#otherwise RPM does not run it. rpm -q --scripts also confirm that above +#command is missing if there is nothing after the last multi-line macro + +%postun +rm -rf $RPM_INSTALL_PREFIX/%{pkgrel} || true +rm -rf $RPM_INSTALL_PREFIX/%{cmsplatf}/%{scramv1_dir} || true +cd $RPM_INSTALL_PREFIX/%{cmsplatf} +VERSION_REGEXP="%{SCRAM_ALL_VERSIONS}"; VERSION_FILE=default-scramv1-version ; %{SetLatestVersion} +VERSION_REGEXP="%{SCRAM_REL_MAJOR}_" ; VERSION_FILE=default-scram/%{SCRAM_REL_MAJOR}; %{SetLatestVersion} +%{BackwardCompatibilityVersionPolicy} diff --git a/cmssw-tool-conf.spec b/cmssw-tool-conf.spec index 96d69438b7e..25b2ada4c17 100644 --- a/cmssw-tool-conf.spec +++ b/cmssw-tool-conf.spec @@ -1,7 +1,7 @@ -### RPM cms cmssw-tool-conf 52.0 +### RPM cms cmssw-tool-conf 53.0 # With cmsBuild, change the above version only when a new tool is added -## INSTALL_DEPENDENCIES cmsLHEtoEOSManager gcc-fixincludes cmssw-osenv cms-git-tools +## INSTALL_DEPENDENCIES cmsLHEtoEOSManager gcc-fixincludes cmssw-osenv cms-git-tools SCRAMV2 ## UPLOAD_DEPENDENCIES dqmgui Requires: crab diff --git a/data/cmsswdata.txt b/data/cmsswdata.txt index ad515d710c7..9d5f83f61f6 100644 --- a/data/cmsswdata.txt +++ b/data/cmsswdata.txt @@ -3,6 +3,7 @@ #Once a non-default section is empty then cleanup that section and remove its cmsdist/${PACKAGE_TYPE}.file #If there is no customization for the packae then remove its .spec and .file [default] +L1Trigger-TrackFindingTracklet=V00-03-00 RecoTracker-MkFit=V00-10-00 RecoEgamma-PhotonIdentification=V01-06-00 Alignment-OfflineValidation=V00-03-00 @@ -41,7 +42,6 @@ Validation-Geometry=V00-07-00 PhysicsTools-NanoAOD=V01-02-00 CalibPPS-ESProducers=V01-04-00 DataFormats-PatCandidates=V01-01-00 -L1Trigger-TrackFindingTracklet=V00-02-00 GeneratorInterface-EvtGenInterface=V02-06-00 DetectorDescription-Schema=V02-03-00 PhysicsTools-PatUtils=V00-05-00 diff --git a/gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch b/gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch new file mode 100644 index 00000000000..46c5ba47231 --- /dev/null +++ b/gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd.patch @@ -0,0 +1,41 @@ +From 03af8492bee6243a9d10e78fea1a3e423bd5f9cd Mon Sep 17 00:00:00 2001 +From: Jonathan Wakely +Date: Fri, 27 May 2022 12:43:18 +0100 +Subject: [PATCH] libstdc++: Mark non-exported function always_inline + [PR105671] + +This new function was added for gcc 11.1 but is not exported from the +shared library. Depending on inlining decisions, its callers might get +inlined but an external definition be needed for this function. That +then fails to link. + +Since we can't add the export to the gcc-11 release branch now, mark it +always_inline. We can consider exporting it for gcc-13 if/when we bump +the shared library version (and maybe also for gcc-12 which is currently +at the same version as trunk). For now, the attribute will solve the +problem on all affected branches. The function is small enough that +force-inlining it shouldn't cause problems. + +libstdc++-v3/ChangeLog: + + PR libstdc++/105671 + * include/std/sstream (basic_stringbuf::_M_high_mark): Add + always_inline attribute. + +(cherry picked from commit de57440858591a88e8fd7ba2505ca54546c86021) +--- + libstdc++-v3/include/std/sstream | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libstdc++-v3/include/std/sstream b/libstdc++-v3/include/std/sstream +index f21664100ab8..56555ecd98a1 100644 +--- a/libstdc++-v3/include/std/sstream ++++ b/libstdc++-v3/include/std/sstream +@@ -425,6 +425,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 + // This might not be the same character as _M_string.end() because + // basic_stringbuf::overflow might have written to unused capacity + // in _M_string without updating its length. ++ __attribute__((__always_inline__)) + char_type* + _M_high_mark() const _GLIBCXX_NOEXCEPT + { diff --git a/gcc-103-substitution-bug-fix.patch b/gcc-103-substitution-bug-fix.patch deleted file mode 100644 index 9059d07b1e1..00000000000 --- a/gcc-103-substitution-bug-fix.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- a/gcc/cp/pt.c -+++ b/gcc/cp/pt.c -@@ -13750,45 +13750,6 @@ tsubst_function_decl (tree t, tree args, tsubst_flags_t complain, - if (tree spec = retrieve_specialization (gen_tmpl, argvec, hash)) - return spec; - } -- -- /* We can see more levels of arguments than parameters if -- there was a specialization of a member template, like -- this: -- -- template struct S { template void f(); } -- template <> template void S::f(U); -- -- Here, we'll be substituting into the specialization, -- because that's where we can find the code we actually -- want to generate, but we'll have enough arguments for -- the most general template. -- -- We also deal with the peculiar case: -- -- template struct S { -- template friend void f(); -- }; -- template void f() {} -- template S; -- template void f(); -- -- Here, the ARGS for the instantiation of will be {int, -- double}. But, we only need as many ARGS as there are -- levels of template parameters in CODE_PATTERN. We are -- careful not to get fooled into reducing the ARGS in -- situations like: -- -- template struct S { template void f(U); } -- template template <> void S::f(int) {} -- -- which we can spot because the pattern will be a -- specialization in this case. */ -- int args_depth = TMPL_ARGS_DEPTH (args); -- int parms_depth = -- TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (DECL_TI_TEMPLATE (t))); -- -- if (args_depth > parms_depth && !DECL_TEMPLATE_SPECIALIZATION (t)) -- args = get_innermost_template_args (args, parms_depth); - } - else - { -diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C -new file mode 100644 -index 00000000000..8009756dcba ---- /dev/null -+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72.C -@@ -0,0 +1,9 @@ -+// PR c++/100102 -+// { dg-do compile { target c++11 } } -+ -+template struct ratio; -+template struct duration { -+ static constexpr int _S_gcd(); -+ template using __is_harmonic = ratio<_S_gcd>; -+ using type = __is_harmonic; -+}; -diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C -new file mode 100644 -index 00000000000..a4443e18f9d ---- /dev/null -+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-72a.C -@@ -0,0 +1,9 @@ -+// PR c++/100102 -+// { dg-do compile { target c++11 } } -+ -+template struct ratio; -+template struct duration { -+ static constexpr int _S_gcd(); -+ template using __is_harmonic = ratio<(duration::_S_gcd)()>; -+ using type = __is_harmonic; -+}; diff --git a/gcc.spec b/gcc.spec index c46f1b19a91..99710f1f5a1 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,11 +1,11 @@ -### RPM external gcc 10.3.0 +### RPM external gcc 11.2.1 ## USE_COMPILER_VERSION ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 # 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 -%define gccTag f00b5710a30f22efc3171c393e56aeb335c3cd39 -%define gccBranch releases/gcc-10 +%define gccTag a0a0499b8bb920fdd98e791804812f001f0b4fe8 +%define gccBranch releases/gcc-11 %define moduleName %{n}-%{realversion} Source0: git+https://github.com/gcc-mirror/%{n}.git?obj=%{gccBranch}/%{gccTag}&export=%{moduleName}&output=/%{n}-%{realversion}-%{gccTag}.tgz @@ -38,7 +38,7 @@ Source11: https://github.com/westes/flex/releases/download/v%{flexVersion}/flex- Patch0: gcc-flex-nonfull-path-m4 Patch1: gcc-flex-disable-doc -Patch2: gcc-103-substitution-bug-fix +Patch2: gcc-03af8492bee6243a9d10e78fea1a3e423bd5f9cd %prep diff --git a/vecgeom.spec b/vecgeom.spec index 23d7f3edda8..385341d35e6 100644 --- a/vecgeom.spec +++ b/vecgeom.spec @@ -24,7 +24,6 @@ cmake ../%{n}-%{realversion} \ -DCMAKE_AR=$(which gcc-ar) \ -DCMAKE_RANLIB=$(which gcc-ranlib) \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_FLAGS_RELEASE="-O2 -DNDEBUG" \ -DNO_SPECIALIZATION=ON \ -DBACKEND=Scalar \ %ifarch x86_64 @@ -37,11 +36,11 @@ cmake ../%{n}-%{realversion} \ %endif -DGEANT4=OFF -make %{makeprocesses} +make %{makeprocesses} VERBOSE=1 %install cd ../build -make %{makeprocesses} install +make %{makeprocesses} install VERBOSE=1 %post %{relocateConfig}lib/cmake/VecGeom/*.cmake