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

Cppyy user-side breaks ROOT #12635

Open
adriansev opened this issue Apr 11, 2023 · 1 comment
Open

Cppyy user-side breaks ROOT #12635

adriansev opened this issue Apr 11, 2023 · 1 comment
Assignees

Comments

@adriansev
Copy link

adriansev commented Apr 11, 2023

Explain what you would like to see improved

Installing a user-side cppyy (no virtualenv) breaks the python based ROOT tools.
So, i would like to be possible to have a user installed cppyy without this having an impact on ROOT installation

Optional: share how it could be improved

i was wondering if, given the special local only usage of a private/local version of cppyy, if this could be encapsulated somehow, so ROOT would use only it’s own version in such a way that is does not see any other cppyy version (even if discovered), and also the private cppyy modules are put in a place that would not be seen by anything outside ROOT as it’s not usable anyway:

[Thursday 06.04.23 21:38 adrian@hal] ~ $
python3
Python 3.11.2 (main, Feb  8 2023, 00:00:00) [GCC 12.2.1 20221121 (Red Hat 12.2.1-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cppyy
/usr/lib64/python3.11/site-packages/cppyy_backend/loader.py:90: UserWarning: No precompiled header available (/usr/lib64/python3.11/site-packages/cppyy_backend/etc not writable); this may impact performance.
  warnings.warn('No precompiled header available (%s); this may impact performance.' % msg)
/usr/lib64/python3.11/site-packages/cppyy/__init__.py:266: UserWarning: CPyCppyy API path not found (tried: /usr/include); set CPPYY_API_PATH to fix
  warnings.warn("CPyCppyy API path not found (tried: %s); set CPPYY_API_PATH to fix" % os.path.dirname(cpycppyy_path))

To Reproduce

rootls
usage: rootls [-h] [-1] [-l] [-t] FILE [FILE ...]
rootls: error: the following arguments are required: FILE

pip3 install --user cppyy

rootls
Traceback (most recent call last):
  File "/usr/bin/rootls", line 12, in <module>
    import cmdLineUtils
  File "/usr/share/root/cli/cmdLineUtils.py", line 81, in <module>
    import ROOT
  File "/usr/lib64/python3.11/site-packages/ROOT/__init__.py", line 25, in <module>
    cppyy.gbl.gROOT.SetBatch(False)
    ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TROOT' object has no attribute 'SetBatch'. Did you mean: 'GetPath'?

Setup

root-config --version
6.26/10
  1. Fedora 37

  2. dnf install

1st posted in root-forum: https://root-forum.cern.ch/t/cppyy-user-side-breaks-root/54393

@guitargeek
Copy link
Contributor

Thanks for opening this issue! We need @vepadulano to take a look when he's back. On my side I can also recreate the crash on Arch Linux:

pacman -S root
pip install --user cppyy
python -c "import ROOT" 

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

No branches or pull requests

3 participants