Installing root with XCode 14 on MacOS 12.6

Hello,
Did anybody manage to successfully install root with the latest XCode 14.0 and MacOS 12.6. For me it fails with:
While building module ‘Darwin’ imported from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1/ctype.h:38:
In file included from :1421:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.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);

Any help is appreciated. I saw some instructions for older releases, but I am not able to revert the XCode version.
Cheers,
Judita


Please read tips for efficient and successful posting and posting code

_ROOT Version:6.26.00 - 6.26.06
_Platform:MacOS 12.6
Compiler: Not Provided


Yes, I managed (several times per day) for the ROOT master. I will try with 6.26 but I think it should be ok.

I just did it wich the same version of Xcode and MacOS. It is fine.

Can you please give me detailed instructions how you managed?

Something similar to:

$ git clone https://github.com/root-project/root.git
$ mkdir build
$ cd build
$ cmake ../root
$ make

You might already have the root sources so you do not need the git clone.

I am not sure what the difference in your and my environment is, I had to change to python 2.7, as I was getting a warning that a python 3 will produce problems at later stage. I basically did already what you showed, but still without successful compilation:
[ 74%] 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 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1/ctype.h:38:
In file included from :1421:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.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 :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>

It seems something similar was already answered here:

Hi,
This is exactly the problem I am getting, but I don’t understand the replies, there is no clear solution. But I don’t understand how it works for you?
Cheers,
Judita

The answer was from @Axel, maybe he can help you.

sudo mv /opt/local/include /opt/local/include-out-of-the-way will do - but might break your homebrew installation. Homebrew and Xcode are incompatible.

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