Fatal error in building process

Hey guys,
I am new here and I have some problems installing ROOT via the instructions on official website(https://root.cern.ch/building-root).
I downloaded the latest ROOT version via Terminal from Github. Steps 2-4 works fine. In Step 5 I get some fatal errors which you can see below.

(work) sven@Svens-MacBook-Air ROOT_1 % sudo cmake --build . -- -j4  
Password:
Scanning dependencies of target VDT
Scanning dependencies of target move_header_core_clib
Scanning dependencies of target move_header_roofit_histfactory
Scanning dependencies of target XROOTD
[  0%] Creating directories for 'VDT'

[...] many lines between those.

**Scanning dependencies of target rootcling_stage1**

[ 76%] Building CXX object core/rootcling_stage1/CMakeFiles/rootcling_stage1.dir/src/rootcling_stage1.cxx.o

[ 76%] **Linking CXX executable src/rootcling_stage1**

[ 76%] Building CXX object core/metacling/src/CMakeFiles/MetaCling.dir/TClingValue.cxx.o

[ 76%] Built target rootcling_stage1

[ 76%] **Generating G__Core.cxx, ../lib/Core.pcm**

While building module 'Core':

While building module 'std' imported from input_line_1:1:

While building module 'Darwin' imported from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ctype.h:39:

In file included from <module-includes>:1070:

In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/ncurses.h:141:

**/opt/local/include/unctrl.h:61:38:** **error:** **cannot initialize a variable of type 'char *' with an lvalue of type 'char *(chtype)' (aka 'char *(unsigned int)')**

NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*, chtype);

**^ ~~~~~~**

**/opt/local/include/unctrl.h:61:61:** **error:** **expected ';' after top level declarator**

NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*, chtype);

**^**

While building module 'Core':

While building module 'std' imported from input_line_1:1:

In file included from <module-includes>:2:

**/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ctype.h:39:15:** **fatal error:** **could not build module 'Darwin'**

#include_next <ctype.h>

**~~~~~~~~~~~~~^**

**input_line_1:1:10:** **fatal error:** **could not build module 'std'**

#include <new>

**~~~~~~~~^**

Warning in cling::IncrementalParser::CheckABICompatibility():

Failed to extract C++ standard library version.

Warning in cling::IncrementalParser::CheckABICompatibility():

Possible C++ standard library mismatch, compiled with _LIBCPP_ABI_VERSION '1'

Extraction of runtime standard library version was: ''

While building module 'Core':

While building module 'Cling_Runtime' imported from input_line_2:1:

In file included from <module-includes>:1:

**/Users/sven/Python/ROOT_1/etc/cling/Interpreter/RuntimeUniverse.h:26:10:** **fatal error:** **could not build module 'std'**

#include <new>

**~~~~~~~~^**

**/Users/sven/Python/ROOT_1/etc/cling/Interpreter/DynamicExprInfo.h:13:10:** **fatal error:** **could not build module 'std'**

#include <string>

**~~~~~~~~^**

While building module 'Core':

While building module '_Builtin_intrinsics':

In file included from <module-includes>:2:

In file included from /Users/sven/Python/ROOT_1/etc/cling/lib/clang/5.0.0/include/immintrin.h:32:

In file included from /Users/sven/Python/ROOT_1/etc/cling/lib/clang/5.0.0/include/xmmintrin.h:39:

In file included from /Users/sven/Python/ROOT_1/etc/cling/lib/clang/5.0.0/include/mm_malloc.h:27:

In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdlib.h:94:

**/Users/sven/Python/ROOT_1/etc/cling/lib/clang/5.0.0/include/stdlib.h:8:15:** **fatal error:** **could not build module 'Darwin'**

#include_next <stdlib.h>

**~~~~~~~~~~~~~^**

While building module 'Core':

<<< cling interactive line includer >>>: **fatal error:** **could not build module '_Builtin_intrinsics'**

Failed to load module _Builtin_intrinsics

Error: Error loading the default header files.

make[2]: *** [core/G__Core.cxx] Error 1

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

make[1]: *** Waiting for unfinished jobs....

[ 76%] Built target MetaCling

make: *** [all] Error 2

Do you have any idea what is going wrong there and what could be a solution for this?


ROOT Version: root_v6.20/04
Platform: macOS Catalina Version 10.15.4
Compiler: I’m not sure but I think Clang


Problem solved by installing an older version of ROOT.

Hi,

You have probably to install the latest XCode version and run xcode-select --install as described here:
https://root.cern.ch/build-prerequisites#macosx

For the record, this is another occurrence of V6.22.00 build error on MacOS