-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
PyROOT std.tuple_element
not working on macOS
#14232
Comments
Hi! You are having two different C++ interpreters running there. The one of ROOT and the one of import ROOT
ROOT.gInterpreter.LoadText("""
#include <tuple>
#include <string>
using ATuple = std::tuple<int, float, std::string, double>;
""")
from ROOT import ATuple
ROOT.std.tuple_element[1, ATuple].type If you mix the independent interpreters in such a crazy way that you use the types from PyROOT as template parameters for cppyy types, it's not surprising that it fails. |
I think in this case the Let me try via PyROOT to see if that indeed already solves this. Footnotes
|
Just tested this and we get the same error message:
This looks a bit like some mismatch between clang or libc++ versions(?), but I don't know where the specifics would enter in this case. |
Ah okay, interesting I didn't know you would pick up the cppyy from ROOT like this! Will investigate further next week when I can reproduce it. Interestingly, on my computer it works, even your original reproducer! So I think you're right, there must be some mismatch that happens with ROOT in your environment. |
Has there been any resolution to this issue ? |
@gaede, I still fail to reproduce the issue, but I'm intending to make the reproducer a unit test, hoping to see the failure on some of the platforms. |
@guitargeek, excellent thanks. Then we hope that it can be reproduced - and fixed ;-) |
It doesn't look like it can be reproduced so far :( Maybe after merging the roottest PR, we will see the failure at some point somewhere in the nightlies. |
Strange that you cannot reproduce this on any macos. I see this error even with using cppyy standalone: import cppyy
cppyy.cppdef("""
#include <tuple>
#include <string>
using ATuple = std::tuple<int, float, std::string, double>;
""")
from cppyy.gbl import ATuple
cppyy.gbl.std.tuple_element[1, ATuple].type
print( cppyy ) Gives with cppyy and no root in the path:
And of course the same error using the cppyy shipped with root 6.26.06 and 6.28.04. So to me it seems |
The unit test with the reproducer from this PR is now running every night on all available macOS nodes, and passing just fine. Could it be a problem when installing ROOT via homebrew? This was of installing ROOT is not supported by the ROOT team itself, so there might be some library mismatch there |
If you see this even on cppyy standalone and you can clearly reproduce it, then please open an issue for cppyy. If it works upsteam but still not with ROOT, then this is a ROOT problem and we can reopen this issue if you want. Until then, I suggest to close this issue, also because we can't reproduce in on any CI platform (we are testing multiple versions of macOS, both on Arm an x64). Thanks for your understanding! |
Check duplicate issues.
Description
This was originally reported in key4hep/EDM4hep#246 and I think it is a ROOT bug rather than one in podio / EDM4hep. At least the error message suggests that there is an issue somehwere in the underlying c++ infrastructure:
Reproducer
The basic issue is that the following minimal reproducer does not work with
/cvmfs/sft.cern.ch/lcg/views/dev3/arm64-mac13-clang150-opt/setup.sh
ROOT version
HEAD
Installation method
LCG stack (dev3)
Operating system
MacOS
Additional context
@peremato FYI.
The text was updated successfully, but these errors were encountered: