Issue
Hello,
I have ROOT installed via dnf install root
and also have built debug version from source.
I wanted to test build (glad I’ve done this before adding lines to .bashrc
) and got this:
$ source /opt/root-6.34.04-debug/bin/thisroot.sh
bash: sed: command not found...
Install package 'sed' to provide command 'sed'? [N/y]
After some investigation I’ve realized that thisroot.sh
drops /usr/bin
from PATH
.
$ printenv ROOTSYS
/usr
Is it possible to fix this behavior on the ROOT side?
May be there are recommendations on this case? Although what I did seems to be a recommended approach.
To reproduce
dnf upgrade --assumeyes
dnf --assumeyes install 'dnf-command(config-manager)'
dnf --assumeyes reinstall tzdata
# development tools
dnf install --assumeyes gcc gcc-c++ gcc-gfortran binutils make cmake patch git \
python3 python3-devel python3-numpy python3-pip
# at least for giflib-devel
dnf config-manager --set-enabled crb
# at least for nlohmann_json
dnf install --assumeyes epel-release
dnf install --assumeyes bzip2-devel hdf5-devel json-devel protobuf-compiler \
protobuf-devel libxml2-devel lz4-devel xz-devel zlib-devel libzstd-devel \
libAfterImage-devel freetype-devel \
giflib-devel libjpeg-turbo-devel libpng-devel libtiff-devel \
libX11-devel libXpm-devel libXft-devel libXext-devel \
ftgl-devel gl2ps-devel glew-devel \
mesa-libGL-devel mesa-libGLU-devel \
cfitsio-devel davix-devel gsl-devel \
openssl-devel pcre-devel readline-devel tbb-devel \
libuuid-devel xrootd-server-devel xxhash-devel \
mysql-devel libpq-devel sqlite-devel \
fftw-devel unuran-devel
# this may be quite long
dns install --assumeyes root-*
dnf install --assumeyes wget tar
cd /opt
# this may be quite long
wget -q https://github.com/root-project/root/archive/refs/tags/v6-34-04.tar.gz
tar xzf v6-34-04.tar.gz
mkdir root-6-34-04-build
mkdir root-6-34-04-debug
cmake -S root-6-34-04/ -B root-6-34-04-build/ \
-DCMAKE_INSTALL_PREFIX=root-6-34-04-debug \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
-DCMAKE_CXX_EXTENSIONS=OFF \
-Dasimage=ON -Dbuiltin_vdt=ON -Dfftw3=ON -Dfortran=ON -Dmathmore=ON \
-Dmlp=ON -Dtmva=ON -Dsoversion=ON \
-Dunuran=ON -Dx11=ON -Dxrootd=ON -Dfail-on-missing=ON
# this is very long
cmake --build root-6-34-04-build --parallel $(nproc) --target install
source root-6-34-04-debug/bin/thisroot.sh
which root
root --version
Setup
ROOT Version: 6.34.02
Platform: AlmaLinux 9.5 (Teal Serval) x86-64
Compiler: gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-2)