Another compile issue on Sequoia

Hi again,

Alright, your advice took me on a little journey with some success! Sorry I couldn’t follow up right away because of pressing things that came up. I was able to get it to work by going here [1], downloading and installing Xcode 15.1 and Command Line Tools for Xcode 15.3 by hand, and then doing

brew install root

After this I can do

mac-1T0-252:~ bein$ root -l 
root [0] 

however, PyROOT seems to be out of reach. Is there a way to install ROOT from brew but then also be able to do commands like

python3
Python 3.8.5 (v3.8.5:580fbb018f, Jul 20 2020, 12:11:27) 
[Clang 6.0 (clang-600.0.57)] 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 "/usr/local/opt/root/lib/root/ROOT/__init__.py", line 25, in <module>
    import cppyy
  File "/usr/local/opt/root/lib/root/cppyy/__init__.py", line 81, in <module>
    from ._cpython_cppyy import *
  File "/usr/local/opt/root/lib/root/cppyy/_cpython_cppyy.py", line 22, in <module>
    import libcppyy as _backend
ImportError: dlopen(/usr/local/opt/root/lib/root/libcppyy.so, 0x0002): symbol not found in flat namespace '_PyCMethod_New'
>>> 

without this crash?

Thanks a lot,

Sam

[1] Sign In - Apple

I am not sure about this python issue. May be @vpadulan or @jonas can help.

As I said in this post, the homebrew package is not maintained by the ROOT team. I don’t know who the maintainers are and how much they make sure that it actually works. If you have any problems with it, I would suggest to reach out to to homebrew maintainers directly.

What you could also do is to use ROOT by installing it via the nix package manager. The ROOT package there is developed and tested by us, but the learning curve of nix is admittedly a bit steeper than conda, brew or the like. Sill I wanted to put this option out there as I know it works.

(post deleted by author)

Thanks for all your help.

I have tried installing nix and installing root via:

mac-1T0-252:~ bein$ nix-env -iA nixpkgs.root

However, it crashes out with the CMake Generate step, as attached. I’m just a wee bit sad because I’ve been able to install ROOT from source in the past, since that let’s me edit libraries. But any way to be able to run my pyroot scripts would be nice. Thanks again.

RootInstallViaNix.txt (43.2 KB)

Oh that’s not great, I thought it would not be necessary for nix to rebuild root! There should be binaries for that. Did you try to start at temporary shell with root installed, like nix-shell -p root?

Maybe it’s because you are not using Apple silicon, but an old Intel Mac. We don’t have these anymore among the ROOT developers, at least not with macOS 15, so I’m not actually sure if we support this configuration. Intel macs become rarer and rarer these days…

I have an intel core-i5. I feel like it should be possible to compile from source though. That would be ideal, but I wasn’t able to resolve the

$ root -l 
input_line_1:1:2: fatal error: malformed or corrupted AST file: 'could not find file '/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/include/_types.modulemap' referenced by AST file' 
#include <new>

stuff. Happy to try anything, but I sense hope is starting to fade.