Fix Cling warnings when using GaudiPython::Helper struct
Loading the GaudiPython
helper struct in the Python 3 build prints warnings to stderr
$ ./Gaudi/run python -c 'import cppyy; cppyy.gbl.GaudiPython.Helper' > /dev/null
IncrementalExecutor::executeFunction: symbol '_ZL28PyBuffer_FromReadWriteMemoryPvi' unresolved while linking function '_GLOBAL__sub_I_cling_module_358'!
You are probably missing the definition of PyBuffer_FromReadWriteMemory(void*, int)
Maybe you need to load the corresponding shared library?
This MR adds a test that just loads the helper; some non-empty stderr causes a failure. I guess no test was loading the struct before so the problem went unnoticed; I found it whilst working on the LHCb Python 3 migration.
It also adds a fix, which is to simply move the PyBuffer_FromReadWriteMemory
static function in to the GaudiPython::Helper
struct. I don't know if this is good or bad but it stops the warning.
If someone could add the lhcb-gaudi-head-py3 label that would be super
Merge request reports
Activity
mentioned in merge request lhcb/LHCb!2214 (merged)
added 1 commit
- 7cc85de8 - Move PyBuffer_FromReadWriteMemory helper into GaudiPython::Helper struct.
added lhcb-gaudi-head-py3 label
- [2019-12-20 00:06] Validation started with lhcb-gaudi-head-py3#267
- [2019-12-21 00:06] Validation started with lhcb-gaudi-head-py3#268
- [2019-12-23 00:06] Validation started with lhcb-gaudi-head-py3#269
- [2019-12-30 00:06] Validation started with lhcb-gaudi-head-py3#270
- [2020-01-06 00:05] Validation started with lhcb-gaudi-head-py3#271
- [2020-01-07 00:10] Validation started with lhcb-gaudi-head-py3#272
- [2020-01-09 00:05] Validation started with lhcb-gaudi-head-py3#273
- [2020-01-10 00:05] Validation started with lhcb-gaudi-head-py3#274
- [2020-01-11 00:08] Validation started with lhcb-gaudi-head-py3#275
- [2020-01-12 00:05] Validation started with lhcb-gaudi-head-py3#276
- [2020-01-14 00:05] Validation started with lhcb-gaudi-head-py3#277
- [2020-01-15 00:09] Validation started with lhcb-gaudi-head-py3#278
- [2020-01-16 00:05] Validation started with lhcb-gaudi-head-py3#279
- [2020-01-17 00:05] Validation started with lhcb-gaudi-head-py3#280
- [2020-01-18 00:05] Validation started with lhcb-gaudi-head-py3#281
- [2020-01-21 00:04] Validation started with lhcb-gaudi-head-py3#282
- [2020-01-22 00:06] Validation started with lhcb-gaudi-head-py3#283
- [2020-01-23 00:09] Validation started with lhcb-gaudi-head-py3#284
- [2020-01-24 00:05] Validation started with lhcb-gaudi-head-py3#285
- [2020-01-24 00:10] Validation started with lhcb-gaudi-head#2514
- [2020-01-25 00:05] Validation started with lhcb-gaudi-head-py3#286
- [2020-01-25 00:05] Validation started with lhcb-gaudi-head#2515
- [2020-01-28 00:05] Validation started with lhcb-gaudi-head-py3#287
- [2020-01-28 00:06] Validation started with lhcb-gaudi-head#2516
- [2020-01-29 00:04] Validation started with lhcb-gaudi-head-py3#288
- [2020-01-29 00:05] Validation started with lhcb-gaudi-head#2517
Edited by Software for LHCbadded lhcb-gaudi-head label
assigned to @clemenci
changed milestone to %v33r1
mentioned in commit 4feb4b4d