Avoid mixed use of inline const string and static string as with clang10 results in null value
All threads resolved!
For whatever reason (compiler bug?) clang10 does not like
inline const std::string Default = LHCb::Det::VP::det_path;
where LHCb::Det::VP::det_path
is a static string, as this results in a NULL value.
This MR converts the statics to inlines to avoid this.
Edited by Christopher Rob Jones
Merge request reports
Activity
assigned to @jonrob
- Resolved by Christopher Rob Jones
I suspect that the real problem is not 'too much inline' instead of 'static', but too much static instead of inline.
Could you please try the following instead of this change?
diff --git a/Det/VPDet/VPDet/VPDetPaths.h b/Det/VPDet/VPDet/VPDetPaths.h index e18da90f8..4627b1550 100644 --- a/Det/VPDet/VPDet/VPDetPaths.h +++ b/Det/VPDet/VPDet/VPDetPaths.h @@ -16,15 +16,15 @@ namespace LHCb::Det::VP { // Path in the TDS to the VP detector #ifdef USE_DD4HEP - static const LHCb::DetDesc::ConditionKey det_path = "/world/BeforeMagnetRegion/VP:DetElement-Info-IOV"; + inline const LHCb::DetDesc::ConditionKey det_path = "/world/BeforeMagnetRegion/VP:DetElement-Info-IOV"; #else - static const LHCb::DetDesc::ConditionKey det_path = "/dd/Structure/LHCb/BeforeMagnetRegion/VP"; + inline const LHCb::DetDesc::ConditionKey det_path = "/dd/Structure/LHCb/BeforeMagnetRegion/VP"; #endif // Path to a couple of alignement conditions (one per XML file in the db): // - Conditions/VP/Alignment/Global.xml - static const LHCb::DetDesc::ConditionKey system_align = "/dd/Conditions/Alignment/VP/VPSystem"; + inline const LHCb::DetDesc::ConditionKey system_align = "/dd/Conditions/Alignment/VP/VPSystem"; // - Conditions/VP/Alignment/Modules.xml - static const LHCb::DetDesc::ConditionKey module_align = "/dd/Conditions/Alignment/VP/Module00"; + inline const LHCb::DetDesc::ConditionKey module_align = "/dd/Conditions/Alignment/VP/Module00"; - static const auto paths = std::array{det_path, system_align, module_align}; + inline const auto paths = std::array{det_path, system_align, module_align}; } // namespace LHCb::Det::VP
added 1 commit
- c1472a77 - use of inline const string instead of static as with clang10 results in null value
added 3 commits
-
c1472a77...c5989505 - 2 commits from branch
lhcb:master
- c8d0c4f2 - use of inline const string instead of static as with clang10 results in null value
-
c1472a77...c5989505 - 2 commits from branch
- [2020-07-13 00:07] Validation started with lhcb-gauss-dev#2447
- [2020-07-13 00:07] Validation started with lhcb-new-cmake#131
- [2020-07-13 00:08] Validation started with lhcb-gaussino#762
- [2020-07-13 00:08] Validation started with lhcb-sanitizers#623
- [2020-07-13 00:08] Validation started with lhcb-lcg-dev3#1327
- [2020-07-13 00:08] Validation started with lhcb-head#2651
- [2020-07-13 00:08] Validation started with lhcb-test-efficiency#128
- [2020-07-13 00:09] Validation started with lhcb-lcg-dev4#1342
- [2020-07-13 00:10] Validation started with lhcb-dd4hep#586
- [2020-07-13 00:14] Validation started with lhcb-gaudi-head#2663
- [2020-07-13 00:33] Validation started with lhcb-gaudi-head-py3#414
Edited by Software for LHCbmentioned in commit dcedc5db
unassigned @jonrob
mentioned in issue Moore#198 (closed)
added Conditions label and removed VP label
added VP label
Please register or sign in to reply