Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

EDM4hep does not seem to work on MacOS #246

Closed
peremato opened this issue Dec 14, 2023 · 3 comments
Closed

EDM4hep does not seem to work on MacOS #246

peremato opened this issue Dec 14, 2023 · 3 comments

Comments

@peremato
Copy link

  • OS version: e.g. MacOS 14.2 (Sonoma)
  • Compiler version: Apple clang version 15.0.0
  • Package version: LCG dev4
  • Reproduced by:
  source /cvmfs/sft.cern.ch/lcg/views/dev4/latest/arm64-mac13-clang150-opt/setup.sh
  python
  • Problem 1
>>> import edm4hep
Error in <TMacOSXSystem::FindDynamicLibrary>: libedm4hepDict.so does not exist in /Users/Shared/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Thu/MCGenerators/thepeg/2.2.3/arm64-mac13-clang150-opt/lib/ThePEG:/Users/Shared/cvmfs/sft-nightlies.cern.ch/lcg/views/dev4/Thu/arm64-mac13-clang150-opt/lib/python3.9/site-packages/torch/lib:/Users/Shared/cvmfs/sft-nightlies.cern.ch/lcg/views/dev4/Thu/arm64-mac13-clang150-opt/lib64:/Users/Shared/cvmfs/sft-nightlies.cern.ch/lcg/views/dev4/Thu/arm64-mac13-clang150-opt/lib::.:/Users/Shared/cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev4/Thu/ROOT/v6-28-00-patches/arm64-mac13-clang150-opt/lib:/usr/local/lib:/usr/X11R6/lib:/usr/lib:/lib:/lib/x86_64-linux-gnu:/usr/local/lib64:/usr/lib64:/lib64::/Users/Shared/cvmfs/sft-nightlies.cern.ch/lcg/views/dev4/Thu
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/Shared/cvmfs/sft-nightlies.cern.ch/lcg/views/dev4/Thu/arm64-mac13-clang150-opt/python/edm4hep/__init__.py", line 8, in <module>
    raise RuntimeError('Failed to load libedm4hepDict.so')
RuntimeError: Failed to load libedm4hepDict.so

The reason is that expected libraries have been with .dylib as suffix. Creating a soft-link with the expected name we can overcome this problem.

  • Problem 2
>>> import edm4hep
>>> from podio.root_io import Reader

Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/Users/Shared/cvmfs/sft-nightlies.cern.ch/lcg/views/dev4/Thu/arm64-mac13-clang150-opt/lib/ROOT/_facade.py", line 154, in _importhook
   return _orig_ihook(name, *args, **kwds)
 File "/Users/Shared/cvmfs/sft-nightlies.cern.ch/lcg/views/dev4/Thu/arm64-mac13-clang150-opt/python/podio/__init__.py", line 12, in <module>
   from .frame import Frame
 File "/Users/Shared/cvmfs/sft-nightlies.cern.ch/lcg/views/dev4/Thu/arm64-mac13-clang150-opt/lib/ROOT/_facade.py", line 154, in _importhook
   return _orig_ihook(name, *args, **kwds)
 File "/Users/Shared/cvmfs/sft-nightlies.cern.ch/lcg/views/dev4/Thu/arm64-mac13-clang150-opt/python/podio/frame.py", line 56, in <module>
   SUPPORTED_PARAMETER_TYPES = _determine_supported_parameter_types()
 File "/Users/Shared/cvmfs/sft-nightlies.cern.ch/lcg/views/dev4/Thu/arm64-mac13-clang150-opt/python/podio/frame.py", line 51, in _determine_supported_parameter_types
   cpp_types = list(map(_determine_cpp_type, enumerate(py_types)))
 File "/Users/Shared/cvmfs/sft-nightlies.cern.ch/lcg/views/dev4/Thu/arm64-mac13-clang150-opt/python/podio/frame.py", line 43, in _determine_cpp_type
   cpp_type = cppyy.gbl.std.tuple_element[idx, podio.SupportedGenericDataTypes].type
AttributeError: <class cppyy.gbl.tuple_element<1,tuple<int,float,string,double> > at 0x126829b00> has no attribute 'type'. Full details:
 type object 'tuple_element<1,tuple<int,float,string,double> >' has no attribute 'type'
 'tuple_element<1,tuple<int,float,string,double> >::type' is not a known C++ class
 'type' is not a known C++ template
 'type' is not a known C++ enum

I do to know the reason for this.

@tmadlener
Copy link
Contributor

The second issue looks a bit like a ROOT issue rather than an EDM4hep / podio one. The following is a somewhat minimal reproducer to check if things work on the ROOT / cppyy side.

import ROOT

ROOT.gInterpreter.LoadText("""
#include <tuple>
#include <string>
using ATuple = std::tuple<int, float, std::string, double>;
""")
from ROOT import ATuple

import cppyy
cppyy.gbl.std.tuple_element[1, ATuple].type

@peremato
Copy link
Author

Thanks. Can you submit an issue to ROOT?

@tmadlener
Copy link
Contributor

Closing this as it is either a ROOT issue or an inconsistent environment. Keeping track of thing in the ROOT issue above.

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

No branches or pull requests

2 participants