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

python -c 'import ROOT' fails on macOS if ROOT is built with gnuinstall=ON #15924

Closed
1 task done
aphecetche opened this issue Jun 25, 2024 · 2 comments · Fixed by #15925
Closed
1 task done

python -c 'import ROOT' fails on macOS if ROOT is built with gnuinstall=ON #15924

aphecetche opened this issue Jun 25, 2024 · 2 comments · Fixed by #15925

Comments

@aphecetche
Copy link
Contributor

aphecetche commented Jun 25, 2024

Check duplicate issues.

  • Checked for duplicates

Description

When building ROOT with gnuinstall=ON, the following happen when trying toimport ROOT in Python, on macOS :

Python 3.9.6 (default, Mar 29 2024, 10:51:09)
[Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/laurent/github.com/root-project/install-2/lib/root/ROOT/__init__.py", line 25, in <module>
    import cppyy
  File "/Users/laurent/github.com/root-project/install-2/lib/root/cppyy/__init__.py", line 81, in <module>
    from ._cpython_cppyy import *
  File "/Users/laurent/github.com/root-project/install-2/lib/root/cppyy/_cpython_cppyy.py", line 21, in <module>
    c = loader.load_cpp_backend()
  File "/Users/laurent/github.com/root-project/install-2/lib/root/cppyy_backend/loader.py", line 79, in load_cpp_backend
    raise RuntimeError("could not load cppyy_backend library")
RuntimeError: could not load cppyy_backend library
>>> quit()

resulting libraries are installed under someinstalldir/lib/root.

Reproducer

git clone https://github.com/root-project/root
cd root
mkdir build
cmake ../root -DCMAKE_GENERATOR=Ninja -DCMAKE_INSTALL_PREFIX=../install-2 -Dxrootd=OFF -Dgnuinstall=ON
source ../install-2/thisroot.sh
python3 -c 'import ROOT'

(by setting gnuinstall=OFF import ROOT does work)

ROOT version

   ---------------------------------------------------------------------------
  | Welcome to ROOT 6.33.01                                 https://root.cern |
  | (c) 1995-2024, The ROOT Team; conception: R. Brun, F. Rademakers          |
  | Built for macosxarm64 on Jun 25 2024, 12:00:47                            |
  | From heads/macos-python-import-root-gnuinstall@v6-31-01-2416-gb4c9e549e1  |
  | With Apple clang version 15.0.0 (clang-1500.3.9.4)                        |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'           |
   ---------------------------------------------------------------------------

Installation method

built from source

Operating system

macOS Sonoma 14.5

Additional context

No response

Copy link

Hi @dpiparo, @bellenot,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖

1 similar comment
Copy link

Hi @dpiparo, @bellenot,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖

@dpiparo dpiparo added this to Issues in Fixed in 6.34.00 via automation Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

3 participants