You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot pass enum with fixed underlying type from std namespace as function argument in python any longer #23615
I am fairly certain this is somewhat of a niche issue and a fix is somewhat straight forward, but it still trips our CI on builds with the latest ROOT. I strongly suspect #21261 as culprit given the nature of the issue, but I haven't run any more fine grained bisection other than checking that this still worked with the dev3 build from Friday (Oct 2) and doesn't with todays dev3 build.
Essentially, when trying to pass a scoped enum that uses a fixed width integer from the std namespace as underlying type as a function argument, I run into a TypeError: could not convert argument 1: [InstanceConverter].
$ source /cvmfs/sft.cern.ch/lcg/views/dev3/Mon/x86_64-ubuntu2404-gcc13-opt/setup.sh
$ python3 repro.pyTraceback (most recent call last): File "<path/to>/repro.py", line 15, in <module> print(ROOT.repro.foo(ROOT.repro.Location.AtIP)) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^TypeError: int repro::foo(repro::Location loc) => TypeError: could not convert argument 1: [InstanceConverter]
ROOT version
ROOT v6.41.01
Built for linuxx8664gcc on Oct 04 2026, 22:45:42
From heads/master@v6-39-99-2057-ga8d6e8b46ec
With g++ (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0 std202002
Binary directory: /cvmfs/sft-nightlies.cern.ch/lcg/nightlies/dev3/Mon/ROOT/a8d6e8b4/x86_64-ubuntu2404-gcc13-opt/bin
Installation method
LCG dev3 stack
Operating system
any, I would assume (I have tested Ubuntu and EL9)
Additional context
It is almost certainly unrelated to the issue at hand, but whether the enum is scoped or not doesn't make any difference, it seems to really be the namespace in the underlying type that causes the issue.
changed the title [-]Cannot pass scoped enum with fixed underlying type from std namespace as function argument[/-][+]Cannot pass enum with fixed underlying type from std namespace as function argument[/+]on Oct 5, 2026
changed the title [-]Cannot pass enum with fixed underlying type from std namespace as function argument[/-][+]Cannot pass enum with fixed underlying type from std namespace as function argument in python any longer[/+]on Oct 5, 2026
Is there a plan for when that will happen already by any chance? It's not extremely urgent, I think, but it would give us a feeling of whether it makes sense to put temporary fixes in place on our end or whether we can just wait for this to be fixed in ROOT / cppjit.
Is there a plan for when that will happen already by any chance? It's not extremely urgent, I think, but it would give us a feeling of whether it makes sense to put temporary fixes in place on our end or whether we can just wait for this to be fixed in ROOT / cppjit.
Activity
Do not use std namespace for underlying type
[-]Cannot pass scoped enum with fixed underlying type from std namespace as function argument[/-][+]Cannot pass enum with fixed underlying type from std namespace as function argument[/+][-]Cannot pass enum with fixed underlying type from std namespace as function argument[/-][+]Cannot pass enum with fixed underlying type from std namespace as function argument in python any longer[/+]tmadlener commentedon Oct 5, 2026
This is almost certainly fixed by compiler-research/cppjit#135
aaronj0 commentedon Oct 6, 2026
Indeed, that PR was merged and we'll have that included in the next bump in the cppjit/CppInterOp stack.
tmadlener commentedon Oct 6, 2026
Is there a plan for when that will happen already by any chance? It's not extremely urgent, I think, but it would give us a feeling of whether it makes sense to put temporary fixes in place on our end or whether we can just wait for this to be fixed in ROOT / cppjit.
[cppjit] Update vendored cppjit to ROOT-2026-10-06
aaronj0 commentedon Oct 6, 2026
Will land as #23626 when that's green
[cppjit] Update vendored cppjit to ROOT-2026-10-06
jmcarcell commentedon Oct 8, 2026
This seems to be fixed today in dev3 builds