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

Issue when importing podio from python in debug builds: AttributeError: <namespace cppyy.gbl.podio.version at 0x7a0dec0> has no attribute 'build_version'. #670

Open
jmcarcell opened this issue Nov 18, 2024 · 2 comments

Comments

@jmcarcell
Copy link
Member

jmcarcell commented Nov 18, 2024

When importing podio in debug builds the following error appears:

cling JIT session error: Failed to materialize symbols: { (main, { _ZN5podio7versionL13build_versionE }) }
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/cvmfs/sw-nightlies.hsf.org/key4hep/releases/2024-11-18/x86_64-almalinux9-gcc14.2.0-dbg/podio/5afdefdd233bd6b53f51d38bceffae600ae41409_develop-o5edi4/lib/python3.11/site-packages/podio/__init__.py", line 14, in <module>
    from . import root_io, reading, version
  File "/cvmfs/sw-nightlies.hsf.org/key4hep/releases/2024-11-18/x86_64-almalinux9-gcc14.2.0-dbg/podio/5afdefdd233bd6b53f51d38bceffae600ae41409_develop-o5edi4/lib/python3.11/site-packages/podio/version.py", line 41, in <module>
    build_version = podio.version.build_version
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: <namespace cppyy.gbl.podio.version at 0x7a0dec0> has no attribute 'build_version'. Full details:
  type object 'version' has no attribute 'build_version'
  'podio::version::build_version' is not a known C++ class. Did you mean: 'decode_version'?

This can be consistently reproduced with the current nightlies both on Ubuntu 22.04 and Alma 9. Locally with the same ROOT version and the same build options I can not reproduce this. I know of two workarounds:

  1. Remove FCCAnalyses and EDM4hep from LD_LIBRARY_PATH.
  2. Remove static constexpr from this line https://github.com/AIDASoft/podio/blob/master/podioVersion.in.h#L72

I think it has to do with ROOT not being happy with the build_version symbol being in the edm4hep libraries that it finds through LD_LIBRARY_PATH, something that in the opt builds gets optimized out and it can't be found in the edm4hep libraries.

@andresailer
Copy link
Contributor

We get the same in dev4 (Root 6.32-patches) lcgstacks https://lcgapp-services.cern.ch/cdash3/tests/18944514

but not in dev3 (Root master) https://lcgapp-services.cern.ch/cdash3/tests/19035061#

@jmcarcell
Copy link
Member Author

I think the plan is going to be to wait to see if this happens the next time ROOT is updated.

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

No branches or pull requests

2 participants