Building ROOT from source is discouraged, unless otherwise justified by a specific feature that is not part of the binary releases.
You may install a binary distribution of ROOT following the instructions here or using a Conda package.
That said, if you still want to go ahead building ROOT from source, see below.
It seems that the value for the option --config is missing in the formatted command line. You could try adding the -DCMAKE_BUILD_TYPE=Release option to the CMake command, as in:
Thanks for the help, using that option worked to get past the PCRE issue I was having.
The build failed due to an issue with Python 3.11 and not finding code.h in one of the files. I found this issue here from last week Fail to include "code.h" again v6.26/{08,10} again, so I will probably downgrade to another version of python.
I have never used the prebuilt binaries and always built root from source. I cannot find a page that lists what options are turned on for the binaries or if they are built for a specific version of python to utilize pyroot. I have tried to install the binary pkg and pyroot doesn’t seem to work so I have some more work to do to use it or try to build from source again.
If you are not enabling any particular features and just using PyROOT, the installation via Conda should be fairly straightforward and quite probably fits your needs. You could also try to give it a try - see here.