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

[LTO_X - CalibTracker] Solve -Wodr compiler warnings #38650

Closed
aandvalenzuela opened this issue Jul 8, 2022 · 6 comments · Fixed by #38652
Closed

[LTO_X - CalibTracker] Solve -Wodr compiler warnings #38650

aandvalenzuela opened this issue Jul 8, 2022 · 6 comments · Fixed by #38652

Comments

@aandvalenzuela
Copy link
Contributor

Hello,

We have seen some compiler warnings of the type -Wodr in LTO_X IBs (CMSSW_12_5_LTO_X_2022-07-07-1100 and CMSSW_12_5_LTO_X_2022-07-06-1100, for example) in package CalibTracker/SiStripChannelGain. See sample stack trace:

>> Building edm plugin tmp/el8_amd64_gcc10/src/CalibTracker/SiStripChannelGain/plugins/CalibTrackerSiStripChannelGainAuto/libCalibTrackerSiStripChannelGainAuto.so
/data/cmsbld/jenkins/workspace/build-any-ib/w/el8_amd64_gcc10/external/gcc/10.3.0-84898dea653199466402e67d73657f10/bin/c++ -O2 -pthread -pipe -Werror=main -Werror=pointer-arith -Werror=overlength-strings -Wno-vla -Werror=overflow -std=c++1z -ftree-vectorize -Wstrict-overflow -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 -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-deprecated-copy -Wno-unused-parameter -Wunused -Wparentheses -Wno-deprecated -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 -fipa-icf -flto-odr-type-merging -fno-fat-lto-objects -Wodr -shared -Wl,-E -Wl,-z,defs tmp/el8_amd64_gcc10/src/CalibTracker/SiStripChannelGain/plugins/CalibTrackerSiStripChannelGainAuto/DeDxDiscriminatorLearner.cc.o tmp/el8_amd64_gcc10/src/CalibTracker/SiStripChannelGain/plugins/CalibTrackerSiStripChannelGainAuto/SealModules.cc.o tmp/el8_amd64_gcc10/src/CalibTracker/SiStripChannelGain/plugins/CalibTrackerSiStripChannelGainAuto/SiStripGainCosmicCalculator.cc.o tmp/el8_amd64_gcc10/src/CalibTracker/SiStripChannelGain/plugins/CalibTrackerSiStripChannelGainAuto/SiStripGainFromAsciiFile.cc.o tmp/el8_amd64_gcc10/src/CalibTracker/SiStripChannelGain/plugins/CalibTrackerSiStripChannelGainAuto/SiStripGainFromCalibTree.cc.o tmp/el8_amd64_gcc10/src/CalibTracker/SiStripChannelGain/plugins/CalibTrackerSiStripChannelGainAuto/SiStripGainFromData.cc.o tmp/el8_amd64_gcc10/src/CalibTracker/SiStripChannelGain/plugins/CalibTrackerSiStripChannelGainAuto/SiStripGainRandomCalculator.cc.o tmp/el8_amd64_gcc10/src/CalibTracker/SiStripChannelGain/plugins/CalibTrackerSiStripChannelGainAuto/SiStripGainsCalibTreeWorker.cc.o -o tmp/el8_amd64_gcc10/src/CalibTracker/SiStripChannelGain/plugins/CalibTrackerSiStripChannelGainAuto/libCalibTrackerSiStripChannelGainAuto.so -Wl,-E -Wl,--hash-style=gnu -L/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/ed6117194997de64d40aad03ededc67f/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-06-1100/biglib/el8_amd64_gcc10 -L/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/ed6117194997de64d40aad03ededc67f/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-06-1100/lib/el8_amd64_gcc10 -L/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/ed6117194997de64d40aad03ededc67f/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-06-1100/external/el8_amd64_gcc10/lib -lCalibTrackerSiStripChannelGain -lCalibTrackerSiStripCommon -lTrackingToolsPatternTools -lTrackingToolsTransientTrackingRecHit -lTrackingToolsDetLayers -lRecoTrackerDeDx -lTrackingToolsGeomPropagators -lTrackingToolsTrajectoryState -lDataFormatsTrackReco -lDataFormatsTrackCandidate -lDataFormatsTrackerRecHit2D -lDataFormatsFTLRecHit -lDataFormatsTrajectorySeed -lCalibFormatsSiStripObjects -lCalibTrackerRecords -lDataFormatsTrackingRecHit -lGeometryTrackerGeometryBuilder -lCondFormatsSiStripObjects -lDataFormatsL1TrackTrigger -lMagneticFieldRecords -lCondFormatsDataRecord -lDataFormatsTrackerCommon -lGeometryCommonTopologies -lCondCoreDBOutputService -lCondFormatsAlignment -lDataFormatsBeamSpot -lDataFormatsGeometryCommonDetAlgo -lDataFormatsSiStripCluster -lGeometryRecords -lGeometryTrackerNumberingBuilder -lTrackingToolsAnalyticalJacobians -lCommonToolsUtilAlgos -lCondCoreCondDB -lCondFormatsAlignmentRecord -lDQMServicesCore -lDataFormatsCandidate -lDataFormatsGeometrySurface -lDataFormatsSiStripCommon -lDataFormatsTrajectoryState -lDetectorDescriptionCore -lDetectorDescriptionDDCMS -lMagneticFieldEngine -lCommonToolsUtils -lCondFormatsGeometryObjects -lCondFormatsRunInfo -lDataFormatsCLHEP -lDataFormatsCaloRecHit -lDataFormatsEcalDetId -lDataFormatsForwardDetId -lDataFormatsGeometryVector -lDataFormatsL1GlobalTrigger -lDataFormatsMuonDetId -lDataFormatsNanoAOD -lDataFormatsPhase2TrackerCluster -lDataFormatsSiPixelDetId -lDataFormatsSiStripDetId -lFWCoreFramework -lCondFormatsCommon -lDataFormatsDetId -lDataFormatsFEDRawData -lDataFormatsL1GlobalMuonTrigger -lDataFormatsMath -lDataFormatsOnlineMetaData -lDataFormatsPhase2TrackerDigi -lDataFormatsScalers -lDataFormatsScouting -lDataFormatsSiPixelCluster -lDataFormatsSiStripDigi -lFWCoreCommon -lFWCoreServiceRegistry -lCondFormatsPhysicsToolsObjects -lDataFormatsCommon -lFWCoreParameterSet -lFWCoreMessageLogger -lDataFormatsProvenance -lFWCorePluginManager -lFWCoreReflection -lTrackingToolsTrajectoryParametrization -lCondFormatsSerialization -lFWCoreConcurrency -lFWCoreUtilities -lFWCoreVersion -lUtilitiesOpenSSL -llcg_CoralCommon -llcg_RelationalAccess -llcg_CoralKernel -llcg_CoralBase -lDDAlign -lDDCond -lDDCore -lDDParsers -lPhysics -lHist -lMatrix -lGenVector -lMathMore -lTree -lNet -lGeom -lThread -lboost_filesystem -lMathCore -lRIO -lSmatrix -lboost_iostreams -lboost_regex -lboost_serialization -lboost_system -lclasslib -lCore -lboost_thread -lboost_date_time -lCLHEP -lpcre -lbz2 -lcurl -lgsl -luuid -lprotobuf -ltbb -lxerces-c -llzma -lz -lfmt -lcms-md5 -lopenblas -lssl -lcrypto -lcrypt -ldl -lrt -lstdc++fs -ltinyxml2
  /data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/ed6117194997de64d40aad03ededc67f/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-06-1100/src/CalibTracker/SiStripChannelGain/interface/APVGainStruct.h:9:8: warning: type 'struct stAPVGain' violates the C++ One Definition Rule [-Wodr]
     9 | struct stAPVGain {
      |        ^
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/ed6117194997de64d40aad03ededc67f/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-06-1100/src/CalibTracker/SiStripChannelGain/plugins/SiStripGainFromData.cc:71:8: note: a different type is defined in another translation unit
   71 | struct stAPVGain {
      |        ^
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/ed6117194997de64d40aad03ededc67f/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-06-1100/src/CalibTracker/SiStripChannelGain/interface/APVGainStruct.h:11:7: note: the first difference of corresponding definitions is field 'Bin'
   11 |   int Bin;
      |       ^
/data/cmsbld/jenkins/workspace/build-any-ib/w/tmp/BUILDROOT/ed6117194997de64d40aad03ededc67f/opt/cmssw/el8_amd64_gcc10/cms/cmssw/CMSSW_12_5_LTO_X_2022-07-06-1100/src/CalibTracker/SiStripChannelGain/plugins/SiStripGainFromData.cc:73:7: note: a field with different name is defined in another translation unit
   73 |   int DetId;
      |       ^
Leaving library rule at src/CalibTracker/SiStripChannelGain/plugins

It seems there are some elements defined multiple times within the same namespace leading to violation of the C++ One Definition Rule. Could you please have a look at it?

Many thanks,
Andrea.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 8, 2022

A new Issue was created by @aandvalenzuela Andrea Valenzuela.

@Dr15Jones, @perrotta, @dpiparo, @rappoccio, @makortel, @smuzaffar, @qliphy can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@mmusich
Copy link
Contributor

mmusich commented Jul 8, 2022

assign alca

@mmusich
Copy link
Contributor

mmusich commented Jul 8, 2022

see fix at #38652

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 8, 2022

New categories assigned: alca

@yuanchao,@francescobrivio,@malbouis,@tvami,@ChrisMisan you have been requested to review this Pull request/Issue and eventually sign? Thanks

@tvami
Copy link
Contributor

tvami commented Jul 9, 2022

+alca

@cmsbuild
Copy link
Contributor

cmsbuild commented Jul 9, 2022

This issue is fully signed and ready to be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants