Compilation Error for 6.22 on Mac

When I try to compile ROOT 6.22.02, I get the following compilation error:

 46%] 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/include/c++/v1/ctype.h:39:
In file included from <module-includes>:1067:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.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:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/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/nevay/physics/packages/root-6.22.02-build/etc/cling/Interpreter/RuntimeUniverse.h:26:10: fatal error: could not build module 'std'
#include <new>
 ~~~~~~~~^
/Users/nevay/physics/packages/root-6.22.02-build/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/nevay/physics/packages/root-6.22.02-build/etc/cling/lib/clang/5.0.0/include/immintrin.h:32:
In file included from /Users/nevay/physics/packages/root-6.22.02-build/etc/cling/lib/clang/5.0.0/include/xmmintrin.h:39:
In file included from /Users/nevay/physics/packages/root-6.22.02-build/etc/cling/lib/clang/5.0.0/include/mm_malloc.h:27:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdlib.h:94:
/Users/nevay/physics/packages/root-6.22.02-build/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: *** [all] Error 2
LN-MacBook:root-6.22.02-build nevay$ 

I specified the python executable (as it was picking up python 3.8 rather than the 3.7 I use regularly with all other packages). Also, to use included glu.

Any advice?

Many thanks,
Laurie


ROOT Version: 6.22.02
Platform: Mac OSX 10.14.6
Compiler: Apple LLVM version 10.0.1 (clang-1001.0.46.4), XCode 10.8 (10G8)


@Axel @vvassilev do you know what we can suggest here?
(I found V6.22.00 build error on MacOS thread, but basically it only advising to turn off -Druntime_cxxmodules=OFF)

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

Sorry for not reacting in time! Two ideas that might help: download binaries from https://root.cern/releases/release-62202/ e.g. cd ~/Downloads; curl -O https://root.cern/download/root_v6.22.02.macosx64-10.14-clang100.pkg. But you want your own Python - so you probably indeed need to build ROOT.

For that, what does clang --version say (I trust you know the version - I want to see whether clang behaves). If there is an error message, try xcode-select --install. Does that help?

Hello,

The output is:

$ clang --version
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I’ve already done xcode-select --install - I use the command line tools all the time :slight_smile:

Cheers,
Laurie

OK that seems to be the same as V6.22.00 build error on MacOS

You have /opt/local/include/unctrl.h in the way. Please move /opt/local out of the way for building ROOT, or make sure the ROOT build does not use it to resolve any external dependencies (i.e. some “found FOO in /opt/local/include/FOO.h”).

Does that do it?

Cheers, Axel.

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