Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhysicsTools : fix gcc700 warning: class has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor] #18942

Merged
merged 1 commit into from May 27, 2017
Merged

Conversation

gartung
Copy link
Member

@gartung gartung commented May 25, 2017

Fixes warnings like these by adding virtual destructor with default constructor.

/build/cmsbld/jenkins-workarea/workspace/build-any-ib/w/tmp/BUILDROOT/8fa3f79dab694f86b12f10b4e4cceb97/opt/cmssw/slc6_amd64_gcc700/cms/cmssw/CMSSW_9_2_X_2017-05-21-2300/src/PhysicsTools/RooStatsCms/interface/BinomialInterval.h:18:7: warning: 'class BinomialInterval' has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]

/build/cmsbld/jenkins-workarea/workspace/build-any-ib/w/tmp/BUILDROOT/8fa3f79dab694f86b12f10b4e4cceb97/opt/cmssw/slc6_amd64_gcc700/cms/cmssw/CMSSW_9_2_X_2017-05-21-2300/src/PhysicsTools/RooStatsCms/interface/BinomialNoncentralInterval.h:31:7: warning: base class 'class BinomialInterval' has accessible non-virtual destructor [-Wnon-virtual-dtor]

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @gartung (Patrick Gartung) for master.

It involves the following packages:

PhysicsTools/JetMCAlgos
PhysicsTools/PatAlgos
PhysicsTools/RecoAlgos
PhysicsTools/RooStatsCms

@perrotta, @cmsbuild, @slava77, @monttj, @davidlange6 can you please review it and eventually sign? Thanks.
@TaiSakuma, @gouskos, @imarches, @ahinzmann, @acaudron, @mmarionncern, @rappoccio, @jdolen, @nhanvtran, @gpetruc, @gkasieczka, @schoef, @ferencek, @mverzett, @mariadalfonso, @pvmulder, @seemasharmafnal, @JyothsnaKomaragiri this is something you requested to watch as well.
@davidlange6 you are the release manager for this.

cms-bot commands are listed here

@gartung
Copy link
Member Author

gartung commented May 25, 2017

@Dr15Jones

@slava77
Copy link
Contributor

slava77 commented May 25, 2017

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented May 25, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/20101/console Started: 2017/05/25 17:43

@cmsbuild
Copy link
Contributor

-1

Tested at: ce4ea61

You can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-18942/20101/summary.html

I found follow errors while testing this PR

Failed tests: Build ClangBuild

  • Build:

I found an error when building:

>> Compiling  /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-25-1100/src/PhysicsTools/JetMCAlgos/src/Pythia8PartonSelector.cc 
>> Compiling  /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-25-1100/src/PhysicsTools/JetMCAlgos/src/Herwig6PartonSelector.cc 
Selected class -> ExclusionBandPlot for ROOT: ExclusionBandPlot
Selected class -> LEPBandPlot for ROOT: LEPBandPlot
>> Compiling edm plugin /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-25-1100/src/PhysicsTools/JetMCAlgos/test/matchGenHFHadrons.cc 
/build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-25-1100/src/PhysicsTools/JetMCAlgos/src/BasePartonSelector.cc:7:1: error: definition of explicitly-defaulted 'BasePartonSelector::~BasePartonSelector()'
 BasePartonSelector::~BasePartonSelector()
 ^
In file included from /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-25-1100/src/PhysicsTools/JetMCAlgos/src/BasePartonSelector.cc:1:0:
/build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-25-1100/src/PhysicsTools/JetMCAlgos/interface/BasePartonSelector.h:17:13: error: 'virtual BasePartonSelector::~BasePartonSelector()' explicitly defaulted here
     virtual ~BasePartonSelector() = default;

  • Clang:

I found a compilation error while trying to compile with clang:
I used this command:
scram b vclean && scram build -k -j 16 USER_CXXFLAGS='-fsyntax-only' COMPILER='llvm compile'

>> Compiling edm plugin /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-25-1100/src/PhysicsTools/JetMCAlgos/plugins/TauGenJetDecayModeSelector.cc 
Selected class -> ExclusionBandPlot for ROOT: ExclusionBandPlot
Selected class -> LEPBandPlot for ROOT: LEPBandPlot
>> Compiling edm plugin /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-25-1100/src/PhysicsTools/JetMCAlgos/plugins/TauGenJetProducer.cc 
>> Compiling edm plugin /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-25-1100/src/PhysicsTools/JetMCAlgos/plugins/ttHFGenFilter.cc 
/build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-25-1100/src/PhysicsTools/JetMCAlgos/src/BasePartonSelector.cc:7:21: error: definition of explicitly defaulted destructor
BasePartonSelector::~BasePartonSelector()
                    ^
1 error generated.
>> Compiling edm plugin /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-25-1100/src/PhysicsTools/JetMCAlgos/plugins/GenHFHadronMatcher.cc 
>> Compiling edm plugin /build/cmsbld/jenkins-workarea/workspace/ib-any-integration/CMSSW_9_2_X_2017-05-25-1100/src/PhysicsTools/JetMCAlgos/plugins/HadronAndPartonSelector.cc 


@cmsbuild
Copy link
Contributor

Comparison not run due to Build errors (RelVals and Igprof tests were also skipped)

@slava77
Copy link
Contributor

slava77 commented May 25, 2017

-1

@cmsbuild
Copy link
Contributor

Pull request #18942 was updated. @perrotta, @cmsbuild, @slava77, @monttj, @davidlange6 can you please check and sign again.

@@ -14,7 +14,7 @@ class BasePartonSelector
{
public:
BasePartonSelector();
~BasePartonSelector();
virtual ~BasePartonSelector() {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix for this problem is to do virtual ~BasePartonSelector(). The definition of the function already exists somewhere.

@cmsbuild
Copy link
Contributor

Pull request #18942 was updated. @perrotta, @cmsbuild, @slava77, @monttj, @davidlange6 can you please check and sign again.

@Dr15Jones
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented May 25, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/20116/console Started: 2017/05/25 18:46

@cmsbuild
Copy link
Contributor

Pull request #18942 was updated. @perrotta, @cmsbuild, @slava77, @monttj, @davidlange6 can you please check and sign again.

@Dr15Jones
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-18942/20116/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 1706 differences found in the comparisons
  • DQMHistoTests: Total files compared: 24
  • DQMHistoTests: Total histograms compared: 1833558
  • DQMHistoTests: Total failures: 42787
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 1790591
  • DQMHistoTests: Total skipped: 180
  • DQMHistoTests: Total Missing objects: 0
  • Checked 98 log files, 14 edm output root files, 24 DQM output files

@perrotta
Copy link
Contributor

+1

  • technical fix,
  • jenkins tests pass
  • if c++ gurus endorse it, it is also fine for reco

@davidlange6 davidlange6 merged commit 307a3d0 into cms-sw:master May 27, 2017
@gartung gartung deleted the PhysicsTools-gcc700-dtor-warning-fix branch May 30, 2017 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants