I am having problems building ROOT 6.22.00 from source on macOS.
Note, my (ultimate) aim here is to update the build within MacPorts, so I am building with a number of dependencies required by that build installed in the usual MacPorts prefix, /opt/local. The build errors however can be reproduced outside MacPorts using a simple cmake build i.e.
git clone firstname.lastname@example.org:root-project/root.git cd root git checkout v6-22-00-patches cd .. mkdir build cd build cmake ../root cmake --build . -- -j8
With the above, the build fails with
/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: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ctype.h:38: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>
Full configure and build log is attached.
Note, if I repeat the above, instead using the git tag for the v6.20.06 release, the build is fine. log also attached.
It appears from the above logs the build is mixing up two different versions of headers for nurses. One from Xcode and MacPorts own installation, leading to an incompatibility error ?
ROOT Version: v6.22.00
Platform: Mac OS 10.15
Compiler: Xcode 11.5