Sourcing root problem?

Hi,
I have installed root from source on my mac m1. Now when I try to source it via

source thisroot.sh

I get no output in my terminal so the script seems to run through.
But wenn I try to open root in the terminal afterwards it says command not found. What am I missing?

Any ideas? Thank you.

Hi @Jailbone ,
what does env print right after you run source thisroot.sh, in that same terminal?

Also note that on Mac you can install ROOT also via conda, homebrew or macports, and it should just work, see https://root.cern/install .

Cheers,
Enrico

Hi @eguiraud, I get:

TMPDIR=/var/folders/zx/3mnj_4sx0d34zcqskxrcwrhw0000gn/T/
__CFBundleIdentifier=com.apple.Terminal
XPC_FLAGS=0x0
TERM=xterm-256color
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.waH533IExO/Listeners
XPC_SERVICE_NAME=0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=440
TERM_SESSION_ID=6F52751A-5FDA-41CC-89F3-81D5DD39E44B
SHELL=/bin/zsh
HOME=/Users/me
LOGNAME=me
USER=me
PATH=/Users/me/root6/install/bin:/Users/me/.pyenv/plugins/pyenv-virtualenv/shims:/Users/me/.pyenv/shims:/Users/me/.pyenv/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
SHLVL=1
PWD=/Users/me/root6/install/bin
OLDPWD=/Users/me/root6/install
HOMEBREW_PREFIX=/opt/homebrew
HOMEBREW_CELLAR=/opt/homebrew/Cellar
HOMEBREW_REPOSITORY=/opt/homebrew
MANPATH=/Users/me/root6/install/man:/opt/homebrew/share/man::
INFOPATH=/opt/homebrew/share/info:
PYENV_ROOT=/Users/me/.pyenv
PYENV_SHELL=zsh
PYENV_VIRTUALENV_INIT=1
ROOTSYS=/Users/me/root6/install
SHLIB_PATH=/Users/me/root6/install/lib
LIBPATH=/Users/me/root6/install/lib
PYTHONPATH=/Users/me/root6/install/lib
CMAKE_PREFIX_PATH=/Users/me/root6/install
JUPYTER_PATH=/Users/me/root6/install/etc/notebook
JUPYTER_CONFIG_DIR=/Users/me/root6/install/etc/notebook
CLING_STANDARD_PCH=none
LANG=de_DE.UTF-8
_=/usr/bin/env

I know it works without any problems when using homebrew. But I want to tell root to use the python version I installed via pyenv. I think this is not possible with homebrew so I decided to go with building it from source where I can specify the python executable.

Ok, source thisroot.sh seems to have done its job, e.g. you have /Users/me/root6/install/bin in your PATH.

Is the root executable in that directory?

I have root.exe in it.

Ok, you can use root.exe exactly the same as you use root, it’s just a bit weird that you don’t have root. @bellenot @Axel any idea what might cause this?

No idea, I’ll have to investigate…

Ok yes I can use root.exe. But when I try to import ROOT when using python it says module not found.

@eguiraud @bellenot
To give some more information: I started by building via:

sudo cmake -DCMAKE_INSTALL_PREFIX=../install -DPython3_EXECUTABLE=/Users/me/.pyenv/versions/3.9.6/bin/python ../root_src

Regarding the python issue, during the building I get:

-- Looking for Python
-- Found Python3: /Users/me/.pyenv/versions/3.9.6/bin/python (found version "3.9.6") found components: Interpreter Development NumPy Development.Module Development.Embed 
...
-- PyROOT will be built for versions 3.9.6 (Main) and 2.7.16
-- Found PythonInterp: /Users/me/.pyenv/versions/3.9.6/bin/python (found version "3.9.6") 

I guess that this is looking good. So I am wondering why I cannot import it when using python.
But when I try to install I get the following error:

**Creating directories for 'XROOTD'**

cmake -E touch: failed to update "/Users/me/root6.2/build/XROOTD-prefix/src/XROOTD-stamp/XROOTD-mkdir".

make[2]: *** [XROOTD-prefix/src/XROOTD-stamp/XROOTD-mkdir] Error 1

make[1]: *** [CMakeFiles/XROOTD.dir/all] Error 2

make: *** [all] Error 2

I do not know what this means. All I can add is what I get during the building process:

-- Looking for XROOTD

-- XROOTD not found, enabling 'builtin_xrootd' option

-- Downloading and building XROOTD version

I then did some searching and found as a suggestion the build options:

-Druntime_cxxmodules=OFF 
and
-Dminimal=ON

With only the first one it still did not work. I added the second suggestion and it installed. And now I am where I am at.

Ok I guess this behavior has something to do with the chosen build options.

I have reinstalled root via:

cmake -DCMAKE_INSTALL_PREFIX=../install -DPython3_EXECUTABLE=/Users/me/.pyenv/versions/3.9.6/bin/python -Dxrootd=OFF -Dbuiltin_xrootd=OFF ../root_src

and now everything is working as expected!

I’m glad you managed to work around it.
That’s really weird though, if you ever need xrootd let us know and we can take another look :grinning_face_with_smiling_eyes:

Cheers,
Enrico

-Dminimal=ON

causes no root to be built, only root.exe.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.