Trouble building ROOT 6.12.06 on macOS Sierra 10.12.6

Hello,

I am trying to rebuild ROOT from source using CMake as ROOT stopped working for me due to a problem with libmpfr.4.dylib. I decided to build from scratch a newer version (6.12.06) as the older version (root-6.04.18), and am following the build instructions, then building using cmake, where ROOT suddenly runs into an error. To debug I cleaned the make using make clean then ran make +V it order to get a more verbose description of my error. This is what I have:

[ 54%] Built target Dictgen
Scanning dependencies of target rootcling_stage1
[ 54%] Building CXX object core/rootcling_stage1/CMakeFiles/rootcling_stage1.dir/src/rootcling_stage1.cxx.o
[ 54%] Linking CXX executable src/rootcling_stage1
[ 54%] Built target rootcling_stage1
Scanning dependencies of target G__Core
[ 54%] Generating G__Core.cxx, ../../lib/libCore.rootmap
dyld: Library not loaded: /usr/local/opt/mpfr/lib/libmpfr.4.dylib
  Referenced from: /usr/local/bin/awk
  Reason: image not found
ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
  LC_ALL=C /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++   -O2 -DNDEBUG -xc++ -E -v /dev/null 2>&1 >/dev/null | awk '/^#include </,/^End of search/{if (!/^#include </ && !/^End of search/){ print }}' | GREP_OPTIONS= grep -E "(c|g)\+\+"
Results was:
dyld: Library not loaded: /usr/local/opt/mpfr/lib/libmpfr.4.dylib
  Referenced from: /usr/local/bin/awk
  Reason: image not found
With exit code 256
input_line_1:1:10: fatal error: 'new' file not found
#include <new>
         ^~~~~
Warning in cling::IncrementalParser::CheckABICompatibility():
  Possible C++ standard library mismatch, compiled with _LIBCPP_VERSION '3700'
  Extraction of runtime standard library version was: ''
In file included from input_line_4:1:
In file included from /Users/myname/root-6.12.06-build/etc/cling/lib/clang/5.0.0/include/assert.h:8:
In file included from /usr/include/assert.h:42:
/usr/include/sys/cdefs.h:81:2: warning: "Unsupported compiler detected" [-W#warnings]
#warning "Unsupported compiler detected"
 ^
/usr/include/sys/cdefs.h:761:2: error: Unsupported architecture
#error Unsupported architecture
 ^
In file included from input_line_4:2:
In file included from /Users/myname/root-6.12.06-build/etc/cling/lib/clang/5.0.0/include/stdlib.h:8:
In file included from /usr/include/stdlib.h:63:
In file included from /usr/include/_types.h:27:
In file included from /usr/include/sys/_types.h:33:
/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
 ^
In file included from input_line_4:2:
In file included from /Users/myname/root-6.12.06-build/etc/cling/lib/clang/5.0.0/include/stdlib.h:8:
In file included from /usr/include/stdlib.h:63:
In file included from /usr/include/_types.h:27:
/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'; did you mean '__int128_t'?
typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
        ^
note: '__int128_t' declared here
/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
        ^
note: '__int128_t' declared here
/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t       __darwin_dev_t;         /* dev_t */
        ^
note: '__int128_t' declared here
/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
        ^
note: '__uint128_t' declared here
/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
        ^
note: '__uint128_t' declared here
/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'; did you mean '__uint128_t'?
typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
        ^
note: '__uint128_t' declared here
/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
        ^
/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
        ^
note: '__uint128_t' declared here
/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'; did you mean '__int128_t'?
typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
        ^
note: '__int128_t' declared here
/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
        ^
note: '__int128_t' declared here
/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
        ^
note: '__uint128_t' declared here
/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
        ^
note: '__int128_t' declared here
/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
        ^
note: '__uint128_t' declared here
/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
        ^
note: '__uint128_t' declared here
In file included from input_line_4:2:
In file included from /Users/myname/root-6.12.06-build/etc/cling/lib/clang/5.0.0/include/stdlib.h:8:
In file included from /usr/include/stdlib.h:65:
In file included from /usr/include/sys/wait.h:109:
In file included from /usr/include/sys/signal.h:82:
/usr/include/machine/signal.h:34:2: error: architecture not supported
#error architecture not supported
 ^
In file included from input_line_4:2:
In file included from /Users/myname/root-6.12.06-build/etc/cling/lib/clang/5.0.0/include/stdlib.h:8:
In file included from /usr/include/stdlib.h:65:
In file included from /usr/include/sys/wait.h:109:
In file included from /usr/include/sys/signal.h:146:
/usr/include/machine/_mcontext.h:31:2: error: architecture not supported
#error architecture not supported
 ^
In file included from input_line_4:2:
In file included from /Users/myname/root-6.12.06-build/etc/cling/lib/clang/5.0.0/include/stdlib.h:8:
In file included from /usr/include/stdlib.h:65:
In file included from /usr/include/sys/wait.h:109:
In file included from /usr/include/sys/signal.h:150:
/usr/include/sys/_types/_sigaltstack.h:39:2: error: unknown type name '__darwin_size_t'
        __darwin_size_t ss_size;        /* signal stack length */
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
Error: Error loading the default header files.
make[2]: *** [core/base/G__Core.cxx] Error 1
make[1]: *** [core/base/CMakeFiles/G__Core.dir/all] Error 2
make: *** [all] Error 2

Upon digging though my files, I see that I have a file called libmpfr.6.dylib but not libmpfr.4.dylib. I have built ROOT before without problems before, but it does not seem to be working now. May anyone help me resolve this.

I would guess I would have to provide more information about my set-up to diagnose this, but I’m not sure what other information I should include.

Thanks in advance

I fixed the problem myself and would like to post the solution in case someone else has the problem: apparently there is a conflict if gawk installed. Doing the following resolved my problem:

brew unlink gawk
brew reinstall awk

Not sure if reinstalling awk is necessary but I did that for good measure.

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