cms-sw / cmssw

CMS Offline Software
http://cms-sw.github.io/
Apache License 2.0
1.09k stars 4.32k forks source link

Drop no-deprecated build flags #43740

Closed smuzaffar closed 8 months ago

smuzaffar commented 10 months ago

@cms-sw/all-l2 , as CMSSW 14.0.X DEVEL IBs are now clean if deprecated warnings, we propose that we remove the -Wno-deprecated-copy -Wno-deprecated flags from the default configuration of CMSSW 14.0.X. Let us know if you have any objections.

cmsbuild commented 10 months ago

cms-bot internal usage

cmsbuild commented 10 months ago

A new Issue was created by @smuzaffar Malik Shahzad Muzaffar.

@sextonkennedy, @Dr15Jones, @smuzaffar, @antoniovilela, @rappoccio, @makortel can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

smuzaffar commented 10 months ago

By the way, as we still have std::autoptr for reading old root file so after dropping these flags we do get compilation warnings during root dictionary generation [a]. Also we get many warnings coming from externals/gcc ( see https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-4cfead/36902/build-logs/ for over 400 ignored warnings). Although we ignore these warnings and those are not shown as warnings via IB page but developers will see them when they build cmssw.

[a] https://cmssdt.cern.ch/SDT/cgi-bin/buildlogs/el8_amd64_gcc12/CMSSW_14_0_DEVEL_X_2024-01-16-2300/SimDataFormats/GeneratorProducts

SimDataFormatsGeneratorProducts/a/SimDataFormatsGeneratorProducts_xr.cc: In function 'ROOT::TGenericClassInfo* ROOT::GenerateInitInstanceLocal(const std::auto_ptr<gen::PdfInfo>*)':
  SimDataFormatsGeneratorProducts/a/SimDataFormatsGeneratorProducts_xr.cc:236:7: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
   236 |       auto_ptr<gen::PdfInfo> *ptr = nullptr;
      |       ^~~~~~~~
.../gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/include/c++/12.3.1/bits/unique_ptr.h:64:28: note: declared here
   64 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
  SimDataFormatsGeneratorProducts/a/SimDataFormatsGeneratorProducts_xr.cc:237:69: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
   237 |       static ::TVirtualIsAProxy* isa_proxy = new ::TIsAProxy(typeid(auto_ptr<gen::PdfInfo>));
      |                                                                     ^~~~~~~~
.../gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/include/c++/12.3.1/bits/unique_ptr.h:64:28: note: declared here
   64 |   template<typename> class auto_ptr;
      |                            ^~~~~~~~
  SimDataFormatsGeneratorProducts/a/SimDataFormatsGeneratorProducts_xr.cc:240:26: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
   240 |                   typeid(auto_ptr<gen::PdfInfo>), ::ROOT::Internal::DefineBehavior(ptr, ptr),
makortel commented 10 months ago

Given that we are close to the last open pre-release of 14_0_X, how about we would remove the -Wno-deprecated-copy -Wno-deprecated flags in early 14_1_X? Then users of 14_0_X would not have get annoyed by the warning messages. I'm also hopeful we'd be able to address the https://github.com/cms-sw/cmssw/issues/43422 soon (but likely in 14_1_X).

makortel commented 8 months ago

I'm also hopeful we'd be able to address the #43422 soon (but likely in 14_1_X).

The fix (or workaround) turned out to be (much?) more complicated than initially thought, and currently there is no timeline for the fix.

On the other hand, maybe the number of users who would be compiling SimDataFormats/GeneratorProducts would be small (i.e. the annoyance cost would be small)?

fwyzard commented 8 months ago

Would it make sense to drop the flags globally, and add them back only in SimDataFormats/GeneratorProducts/BuildFile.xml ?