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

[CPP20] Remove deprecated implicit capture of this #44451

Merged
merged 2 commits into from
Mar 28, 2024

Conversation

iarspider
Copy link
Contributor

PR description:

Fix deprecated implicit capture of this in lambda-functions: ISO/IEC JTC 1/SC 22/WG 21 P0806R2:

>> Compiling  src/FWCore/Framework/src/ProductResolvers.cc
/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/bin/c++ -c -DGNU_GCC -D_GNU_SOURCE -DTBB_USE_GLIBCXX_VERSION=120301 -DTBB_SUPPRESS_DEPRECATED_MESSAGES -DTBB_PREVIEW_RESUMABLE_TASKS=1 -DTBB_PREVIEW_TASK_GROUP_EXTENSIONS=1 -DBOOST_SPIRIT_THREADSAFE -DPHOENIX_THREADSAFE -DBOOST_MATH_DISABLE_STD_FPCLASSIFY -DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX -DCMSSW_GIT_HASH='CMSSW_14_1_CPP20_X_2024-03-15-1100' -DPROJECT_NAME='CMSSW' -DPROJECT_VERSION='CMSSW_14_1_CPP20_X_2024-03-15-1100' -I/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/0a59af9379b9d52eacf3467d0009648c/opt/cmssw/el8_amd64_gcc12/cms/cmssw/CMSSW_14_1_CPP20_X_2024-03-15-1100/src -I/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/pcre/8.43-37eb2e8b73bab83d6645ecfd5d73dcaa/include -isystem/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/boost/1.80.0-fe384ba674f25ab3d69ff12635560905/include -I/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/bz2lib/1.0.6-d065ccd79984efc6d4660f410e4c81de/include -I/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/libuuid/2.34-27ce4c3579b5b1de2808ea9c4cd8ed29/include -isystem/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/lcg/root/6.30.05-f5dcc69f8d11cd2c28768dbd60c84339/include -isystem/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/tbb/v2021.9.0-80bf70515b37b5bee8132dd589b2bef9/include -I/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/xz/5.2.5-6f3f49b07db84e10c9be594a1176c114/include -I/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/zlib/1.2.11-51072030b7f93c3ac6c4235f21e413cb/include -I/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/fmt/8.0.1-786658da8424a36fd9daec568588b7aa/include -I/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/md5/1.0.0-5b594b264e04ae51e893b1d69a797ec6/include -I/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc12/external/tinyxml2/6.2.0-b248972f299359d73b1605c96291455f/include -O2 -pthread -pipe -Werror=main -Werror=pointer-arith -Werror=overlength-strings -Wno-vla -Werror=overflow -std=c++20 -ftree-vectorize -Werror=array-bounds -Werror=format-contains-nul -Werror=type-limits -fvisibility-inlines-hidden -fno-math-errno --param vect-max-version-for-alias-checks=50 -Xassembler --compress-debug-sections -Wno-error=array-bounds -Warray-bounds -fuse-ld=bfd -msse3 -felide-constructors -fmessage-length=0 -Wall -Wno-non-template-friend -Wno-long-long -Wreturn-type -Wextra -Wpessimizing-move -Wclass-memaccess -Wno-cast-function-type -Wno-unused-but-set-parameter -Wno-ignored-qualifiers -Wno-unused-parameter -Wunused -Wparentheses -Werror=return-type -Werror=missing-braces -Werror=unused-value -Werror=unused-label -Werror=address -Werror=format -Werror=sign-compare -Werror=write-strings -Werror=delete-non-virtual-dtor -Werror=strict-aliasing -Werror=narrowing -Werror=unused-but-set-variable -Werror=reorder -Werror=unused-variable -Werror=conversion-null -Werror=return-local-addr -Wnon-virtual-dtor -Werror=switch -fdiagnostics-show-option -Wno-unused-local-typedefs -Wno-attributes -Wno-psabi -Wno-error=unused-variable -DBOOST_DISABLE_ASSERTS -flto=auto -fipa-icf -flto-odr-type-merging -fno-fat-lto-objects -Wodr -fPIC -MMD -MF tmp/el8_amd64_gcc12/src/FWCore/Framework/src/FWCoreFramework/ProductResolvers.cc.d src/FWCore/Framework/src/ProductResolvers.cc -o tmp/el8_amd64_gcc12/src/FWCore/Framework/src/FWCoreFramework/ProductResolvers.cc.o
src/FWCore/Framework/src/Principal.cc: In lambda function:
  src/FWCore/Framework/src/Principal.cc:584:53: warning: implicit capture of 'this' via '[=]' is deprecated in C++20 [-Wdeprecated]
   584 |       return BasicHandle(makeHandleExceptionFactory([=]() -> std::shared_ptr<cms::Exception> {
      |                                                     ^
src/FWCore/Framework/src/Principal.cc:584:53: note: add explicit 'this' or '*this' capture

PR validation:

Bot tests

@iarspider
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 18, 2024

cms-bot internal usage

@iarspider
Copy link
Contributor Author

please test for CMSSW_14_1_CPP20_X

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-44451/39525

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @iarspider for master.

It involves the following packages:

  • FWCore/Framework (core)
  • FWCore/Modules (core)
  • RecoHGCal/TICL (upgrade, reconstruction)

@makortel, @jfernan2, @smuzaffar, @subirsarkar, @Dr15Jones, @srimanob, @mandrenguyen can you please review it and eventually sign? Thanks.
@hatakeyamak, @makortel, @rovere, @apsallid, @youyingli, @sameasy, @forthommel, @felicepantaleo, @lecriste, @missirol, @sobhatta, @wddgit this is something you requested to watch as well.
@antoniovilela, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@iarspider
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

-1

Failed Tests: Build HeaderConsistency ClangBuild
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-3b14ce/38231/summary.html
COMMIT: 3f6829b
CMSSW: CMSSW_14_1_X_2024-03-17-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/44451/38231/install.sh to create a dev area with all the needed externals and cmssw changes.

Build

I found compilation error when building:

>> Subsystem Utilities built
Copying tmp/el8_amd64_gcc12/src/EventFilter/EcalRawToDigi/plugins/EventFilterEcalRawToDigiPluginsPortableROCmAsync/libEventFilterEcalRawToDigiPluginsPortableROCmAsync_rocm.a to productstore area:
Copying tmp/el8_amd64_gcc12/src/RecoParticleFlow/PFRecHitProducer/plugins/RecoParticleFlowPFRecHitProducersPluginsPortableROCmAsync/libRecoParticleFlowPFRecHitProducersPluginsPortableROCmAsync_rocm.a to productstore area:
cp: cannot stat 'tmp/el8_amd64_gcc12/src/RecoParticleFlow/PFRecHitProducer/plugins/RecoParticleFlowPFRecHitProducersPluginsPortableROCmAsync/libRecoParticleFlowPFRecHitProducersPluginsPortableROCmAsync_rocm.a': No such file or directory
>> Deleted: tmp/el8_amd64_gcc12/src/RecoParticleFlow/PFRecHitProducer/plugins/RecoParticleFlowPFRecHitProducersPluginsPortableROCmAsync/libRecoParticleFlowPFRecHitProducersPluginsPortableROCmAsync_rocm.a
gmake: *** [config/SCRAM/GMake/Makefile.rules:1838: tmp/el8_amd64_gcc12/src/RecoParticleFlow/PFRecHitProducer/plugins/RecoParticleFlowPFRecHitProducersPluginsPortableROCmAsync/libRecoParticleFlowPFRecHitProducersPluginsPortableROCmAsync_rocm.a] Error 1
>> Entering Package CondFormats/AlignmentRecord
>> Leaving Package CondFormats/AlignmentRecord
>> Package CondFormats/AlignmentRecord built
Entering library rule at CondFormats/AlignmentRecord
>> Compiling  src/CondFormats/AlignmentRecord/src/CSCAlignmentErrorExtendedRcd.cc


Clang Build

I found compilation error while trying to compile with clang. Command used:

USER_CUDA_FLAGS='--expt-relaxed-constexpr' USER_CXXFLAGS='-Wno-register -fsyntax-only' scram build -k -j 32 COMPILER='llvm compile'

>> Creating project symlinks
>> Entering Package FWCore/Framework
>> Entering Package FWCore/Modules
>> Entering Package RecoHGCal/TICL
>> Compile sequence completed for CMSSW CMSSW_14_1_X_2024-03-17-2300
gmake: *** [There are compilation/build errors. Please see the detail log above.] Error 1
+ eval scram build outputlog '&&' '(python3' /data/cmsbld/jenkins/workspace/ib-run-pr-tests/cms-bot/buildLogAnalyzer.py --logDir /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_14_1_X_2024-03-17-2300/tmp/el8_amd64_gcc12/cache/log/src '||' 'true)'
++ scram build outputlog
>> Entering Package FWCore/Framework
>> Compiling  src/FWCore/Framework/bin/cmsRun.cpp
>> Compiling  src/FWCore/Framework/bin/cmsRun.cpp


@cmsbuild
Copy link
Contributor

-1

Failed Tests: Build HeaderConsistency
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-3b14ce/38230/summary.html
COMMIT: 3f6829b
CMSSW: CMSSW_14_1_CPP20_X_2024-03-15-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/44451/38230/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-3b14ce/38230/git-recent-commits.json
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-3b14ce/38230/git-merge-result

Build

I found compilation error when building:

>> Leaving Package JetMETCorrections/Objects
>> Package JetMETCorrections/Objects built
Copying tmp/el8_amd64_gcc12/src/RecoParticleFlow/PFRecHitProducer/plugins/RecoParticleFlowPFRecHitProducersPluginsPortableROCmAsync/libRecoParticleFlowPFRecHitProducersPluginsPortableROCmAsync_rocm.a to productstore area:
cp: cannot stat 'tmp/el8_amd64_gcc12/src/RecoParticleFlow/PFRecHitProducer/plugins/RecoParticleFlowPFRecHitProducersPluginsPortableROCmAsync/libRecoParticleFlowPFRecHitProducersPluginsPortableROCmAsync_rocm.a': No such file or directory
>> Deleted: tmp/el8_amd64_gcc12/src/RecoParticleFlow/PFRecHitProducer/plugins/RecoParticleFlowPFRecHitProducersPluginsPortableROCmAsync/libRecoParticleFlowPFRecHitProducersPluginsPortableROCmAsync_rocm.a
gmake: *** [config/SCRAM/GMake/Makefile.rules:1825: tmp/el8_amd64_gcc12/src/RecoParticleFlow/PFRecHitProducer/plugins/RecoParticleFlowPFRecHitProducersPluginsPortableROCmAsync/libRecoParticleFlowPFRecHitProducersPluginsPortableROCmAsync_rocm.a] Error 1
>> Entering Package PhysicsTools/CandAlgos
>> Leaving Package PhysicsTools/CandAlgos
>> Package PhysicsTools/CandAlgos built
Entering library rule at src/PhysicsTools/CandAlgos/plugins
>> Compiling edm plugin src/PhysicsTools/CandAlgos/plugins/EventShapeVarsProducer.cc


@cmsbuild
Copy link
Contributor

-code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-44451/39539

Code check has found code style and quality issues which could be resolved by applying following patch(s)

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-3b14ce/38442/summary.html
COMMIT: 59ad727
CMSSW: CMSSW_14_1_CPP20_X_2024-03-25-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/44451/38442/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-3b14ce/38441/summary.html
COMMIT: 59ad727
CMSSW: CMSSW_14_1_X_2024-03-26-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/44451/38441/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@makortel
Copy link
Contributor

@makortel
Copy link
Contributor

+core

@makortel
Copy link
Contributor

+heterogeneous

@makortel
Copy link
Contributor

@iarspider This PR could probably be unheld now?

@iarspider
Copy link
Contributor Author

unhold

@cmsbuild cmsbuild removed the hold label Mar 27, 2024
@iarspider
Copy link
Contributor Author

@cms-sw/reconstruction-l2 @cms-sw/upgrade-l2 gentle ping

@mandrenguyen
Copy link
Contributor

+1

@srimanob
Copy link
Contributor

+Upgrade

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @rappoccio, @sextonkennedy, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2)

@antoniovilela
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 215a20c into cms-sw:master Mar 28, 2024
17 checks passed
@iarspider iarspider deleted the cpp20-no-implicit-this-capture branch April 2, 2024 07:10
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.

7 participants