Fatal error showing when installing old root version

Dear all experts,

I’m trying to install old version root by compiling from source code, and I have installed all the required and most common dependencies through homebrew.

after cmake-gui and set install_prefix and providing those paths, I ran make -j4 then these series of fatal error messages showed up when [ 76%] Built target MetaCling start

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/merge.h:12:10: fatal error: could not build module 'std_private_algorithm_comp'
#include <__algorithm/comp.h>
 ~~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/minmax.h:12:10: fatal error: could not build module 'std_private_algorithm_comp'
#include <__algorithm/comp.h>
 ~~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/minmax_element.h:12:10: fatal error: could not build module 'std_private_algorithm_comp'
#include <__algorithm/comp.h>
 ~~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/mismatch.h:13:10: fatal error: could not build module 'std_private_algorithm_comp'
#include <__algorithm/comp.h>
 ~~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/simd_utils.h:12:10: fatal error: could not build module 'std_private_algorithm_min'
#include <__algorithm/min.h>
 ~~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__bit/bit_cast.h:14:10: fatal error: could not build module 'std_core'
#include <__type_traits/is_trivially_copyable.h>
 ~~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__bit/countl.h:15:10: fatal error: could not build module 'std_private_bit_rotate'
#include <__bit/rotate.h>
 ~~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__iterator/aliasing_iterator.h:13:10: fatal error: could not build module 'std_private_iterator_iterator_traits'
#include <__iterator/iterator_traits.h>
 ~~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/next_permutation.h:12:10: fatal error: could not build module 'std_private_algorithm_comp'
#include <__algorithm/comp.h>
 ~~~~~~~~^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/reverse.h:12:10: fatal error: could not build module 'std_private_algorithm_iter_swap'
#include <__algorithm/iter_swap.h>
...

can anyone give me some ideas how to solve it?

ROOT Version: 6.32.08 (want to install)
Platform: macOS Sonoma 14.7 with M1 Pro chip
Compiler: clang-1700.0.13.5
Xcode:16.4


@couet could you please take a look?

I have tried to reinstall Xcode the 15.4 and ran cmake then make, but the same error is still showing

I did the following on our M1 MacOs 14.7 machine:

 $  git clone https://github.com/root-project/root.git
 $  cd root
 $  git checkout v6-32-00-patches
 $  cd ..
 $  mkdir build
 $  cd build
 $  cmake ../root
 $  make -j8
 $  source bin/thisroot.sh
 $  root
   ------------------------------------------------------------------
  | Welcome to ROOT 6.32.15                        https://root.cern |
  | (c) 1995-2025, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for macosxarm64 on Jul 04 2025, 09:17:25                   |
  | From heads/v6-32-00-patches@v6-32-14-15-gadad149d7d              |
  | With Apple clang version 16.0.0 (clang-1600.0.26.6)              |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------

root [0] 

The command line tools are:

$ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 16.2.0.0.1.1733547573

Hi @couet , thank you for the solution you provided, much appreciate it. Unfortunately, when I ran make -j4, I still got the same errors showing up at 76% progress. the CMakeError was showing and telling me to turn on builtin glew,-Dbuiltin_glew=ON I also set CMAKE_INSTALL_PREFIX= to the install folder I made. Now the Xcode version is 16.2, which is the latest compatible version with Sonoma 14.7.

contexts below are the most part of the error…
thanks for helping :(((

While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
While building module 'std_cstddef' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/new:96:
While building module 'DarwinFoundation' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:64:
In file included from <module-includes>:4:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h:37:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/arm/endian.h:61:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h:131:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:33:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h:34:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/arm/_types.h:16:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ptrdiff_t.h:41:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:64:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
typedef __uint32_t      __darwin_wctype_t;
        ^
note: '__uint128_t' declared here
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
While building module 'std_cstddef' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/new:96:
While building module 'DarwinFoundation' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:64:
In file included from <module-includes>:4:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h:37:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/arm/endian.h:61:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h:131:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:33:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h:34:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/arm/_types.h:16:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_ptrdiff_t.h:41:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:67:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_null.h:40:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:68:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_offsetof.h:40:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:77:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h:40:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:79:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wchar_t.h:41:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:82:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_wint_t.h:32:9: error: unknown type name '__darwin_wint_t'
typedef __darwin_wint_t wint_t;
        ^
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
While building module 'std_cstddef' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/new:96:
While building module 'DarwinFoundation' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:64:
In file included from <module-includes>:4:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/endian.h:37:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/arm/endian.h:61:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_endian.h:131:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h:32:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types.h:33:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/_types.h:34:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/arm/_types.h:75:9: error: unknown type name 'ptrdiff_t'
typedef ptrdiff_t               __darwin_ptrdiff_t;     /* ptr1 - ptr2 */
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/arm/_types.h:85:9: error: unknown type name 'size_t'
typedef size_t                  __darwin_size_t;        /* sizeof() */
        ^
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
While building module 'std_cstddef' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/new:96:
In file included from <module-includes>:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:43:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stddef.h:64:10: fatal error: could not build module 'DarwinFoundation'
#include <_types.h>
 ~~~~~~~~^
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
In file included from <module-includes>:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/new:96:10: fatal error: could not build module 'std_cstddef'
#include <cstddef>
 ~~~~~~~~^
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
While building module '_stdlib' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:58:
In file included from <module-includes>:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdlib.h:62:10: fatal error: could not build module 'DarwinFoundation'
#include <sys/cdefs.h>
 ~~~~~~~~^
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
While building module '_stdlib' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:58:
While building module 'sys_wait' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdlib.h:66:
In file included from <module-includes>:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h:67:10: fatal error: could not build module 'DarwinFoundation'
#include <sys/cdefs.h>
 ~~~~~~~~^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h:72:10: fatal error: could not build module 'DarwinFoundation'
#include <sys/appleapiopts.h>
 ~~~~~~~~^
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
While building module '_stdlib' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:58:
While building module 'sys_wait' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdlib.h:66:
While building module 'sys_types' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h:89:
While building module 'netinet_in' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h:113:
In file included from <module-includes>:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_in_addr_t.h:30:10: fatal error: could not build module 'DarwinFoundation'
#include <machine/types.h> /* __uint32_t */
 ~~~~~~~~^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_useconds_t.h:30:10: fatal error: could not build module 'DarwinFoundation'
#include <sys/_types.h> /* __darwin_useconds_t */
 ~~~~~~~~^
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
While building module '_stdlib' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:58:
While building module 'sys_wait' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdlib.h:66:
While building module 'sys_types' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h:89:
While building module '_errno' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h:178:
In file included from <module-includes>:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/errno.h:23:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/errno.h:72:10: fatal error: could not build module 'DarwinFoundation'
#include <sys/cdefs.h>
 ~~~~~~~~^
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
While building module '_stdlib' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:58:
While building module 'sys_wait' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdlib.h:66:
While building module 'sys_types' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h:89:
While building module '_sys_select' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/types.h:187:
In file included from <module-includes>:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_fd_def.h:31:10: fatal error: could not build module 'DarwinFoundation'
#include <machine/types.h> /* __int32_t and uintptr_t */
 ~~~~~~~~^
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
While building module '_stdlib' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:58:
While building module 'sys_wait' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdlib.h:66:
While building module '_signal' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h:109:
In file included from <module-includes>:1:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/machine/signal.h:34:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/arm/signal.h:14:10: fatal error: could not build module 'DarwinFoundation'
#include <sys/cdefs.h>
 ~~~~~~~~^
While building module 'Core':
While building module 'std_new' imported from input_line_1:1:
While building module '_stdlib' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:58:
While building module 'sys_wait' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdlib.h:66:
While building module 'sys_resource' imported from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/wait.h:110:
In file included from <module-includes>:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/resource.h:67:10: fatal error: could not build module 'DarwinFoundation'
#include <sys/appleapiopts.h>
 ~~~~~~~~^
...
Stack dump:
0.	Program arguments: /Users/brianhuang/ROOT_installation/build/core/rootcling_stage1/src/rootcling_stage1 -v2 -f G__Core.cxx -cxxmodule -s /Users/brianhuang/ROOT_installation/build/lib/libCore.so -excludePath /Users/brianhuang/ROOT_installation/root -excludePath /Users/brianhuang/ROOT_installation/build/ginclude -excludePath /Users/brianhuang/ROOT_installation/build/externals -excludePath /Users/brianhuang/ROOT_installation/build/builtins -writeEmptyRootPCM -mByproduct Darwin -m _Builtin_intrinsics -mByproduct _Builtin_intrinsics -mByproduct ROOT_Foundation_Stage1_NoRTTI -mByproduct ROOT_Foundation_C -mByproduct ROOT_Rtypes -DR__ARC4_STDLIB -D__STDC_NO_COMPLEX__ -D__COMPLEX_H__ -D_COMPLEX_H -D__CLANG_STDATOMIC_H -compilerI/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1 -compilerI/Library/Developer/CommandLineTools/usr/lib/clang/16/include -compilerI/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -compilerI/Library/Developer/CommandLineTools/usr/include -compilerI/Library/Developer/CommandLineTools/usr/lib/clang/16/include -compilerI/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -compilerI/Library/Developer/CommandLineTools/usr/include -I/Users/brianhuang/ROOT_installation/build/include -I/opt/homebrew/include -I/Users/brianhuang/ROOT_installation/build/ginclude -I/Users/brianhuang/ROOT_installation/root/core/base/inc -I/Users/brianhuang/ROOT_installation/root/core/base/v7/inc -I/Users/brianhuang/ROOT_installation/root/core/clib/inc -I/Users/brianhuang/ROOT_installation/root/core/clingutils/inc -I/Users/brianhuang/ROOT_installation/root/core/clingutils/res -I/Users/brianhuang/ROOT_installation/root/core/cont/inc -I/Users/brianhuang/ROOT_installation/root/core/foundation/inc -I/Users/brianhuang/ROOT_installation/root/core/foundation/v7/inc -I/Users/brianhuang/ROOT_installation/root/core/foundation/res -I/Users/brianhuang/ROOT_installation/root/core/gui/inc -I/Users/brianhuang/ROOT_installation/root/core/meta/inc -I/Users/brianhuang/ROOT_installation/root/core/rint/inc -I/Users/brianhuang/ROOT_installation/root/core/textinput/inc -I/Users/brianhuang/ROOT_installation/root/core/textinput/src -I/Users/brianhuang/ROOT_installation/root/core/thread/inc -I/Users/brianhuang/ROOT_installation/root/core/zip/inc -I/Users/brianhuang/ROOT_installation/root/core/lzma/inc -I/opt/homebrew/include -I/Users/brianhuang/ROOT_installation/root/core/lz4/inc -I/Users/brianhuang/ROOT_installation/root/core/zstd/inc -I/Users/brianhuang/ROOT_installation/root/core/macosx/inc -I/Users/brianhuang/ROOT_installation/root/core/unix/inc -I/Users/brianhuang/ROOT_installation/root/core/unix/../clib/res -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Users/brianhuang/ROOT_installation/root/builtins/xxhash ROOT/TErrorDefaultHandler.hxx ROOT/TExecutorCRTP.hxx ROOT/TSequentialExecutor.hxx ROOT/StringConv.hxx Buttons.h Bytes.h Byteswap.h KeySymbols.h MessageTypes.h Riostream.h Rtypes.h TApplication.h TAtt3D.h TAttAxis.h TAttBBox2D.h TAttBBox.h TAttFill.h TAttLine.h TAttMarker.h TAttPad.h TAttText.h TBase64.h TBenchmark.h TBuffer3D.h TBuffer3DTypes.h TBuffer.h TColor.h TColorGradient.h TDatime.h TDirectory.h TEnv.h TException.h TExec.h TFileCollection.h TFileInfo.h TFolder.h TInetAddress.h TMacro.h TMathBase.h TMD5.h TMemberInspector.h TMessageHandler.h TNamed.h TNotifyLink.h TObject.h TObjString.h TParameter.h TPluginManager.h TPoint.h TPRegexp.h TProcessID.h TProcessUUID.h TQClass.h TQCommand.h TQConnection.h TQObject.h TRedirectOutputGuard.h TRefCnt.h TRef.h TRegexp.h TRemoteObject.h TROOT.h TRootIOCtor.h TStopwatch.h TStorage.h TString.h TStringLong.h TStyle.h TSysEvtHandler.h TSystemDirectory.h TSystemFile.h TSystem.h TTask.h TThreadSlots.h TTime.h TTimer.h TTimeStamp.h TUri.h TUrl.h TUUID.h TVersionCheck.h TVirtualAuth.h TVirtualFFT.h TVirtualGL.h TVirtualMonitoring.h TVirtualMapFile.h TVirtualMutex.h TVirtualPadEditor.h TVirtualPad.h TVirtualPadPainter.h TVirtualPerfStats.h TVirtualPS.h TVirtualQConnection.h TVirtualRWMutex.h TVirtualTableInterface.h TVirtualViewer3D.h TVirtualX.h ROOT/RFloat16.hxx ROOT/RDirectoryEntry.hxx ROOT/RIndexIter.hxx strlcpy.h snprintf.h strtok.h root_std_complex.h ROOT/TSeq.hxx TArrayC.h TArrayD.h TArrayF.h TArray.h TArrayI.h TArrayL64.h TArrayL.h TArrayS.h TBits.h TBtree.h TClassTable.h TClonesArray.h TCollection.h TCollectionProxyInfo.h TExMap.h THashList.h THashTable.h TIterator.h TList.h TMap.h TObjArray.h TObjectTable.h TOrdCollection.h TRefArray.h TRefTable.h TSeqCollection.h TSortedList.h TVirtualCollectionProxy.h ESTLType.h RStringView.h TClassEdit.h TError.h ThreadLocalStorage.h ROOT/RLogger.hxx ROOT/RNotFn.hxx ROOT/RRangeCast.hxx ROOT/RSpan.hxx ROOT/RStringView.hxx ROOT/StringUtils.hxx ROOT/span.hxx ROOT/TypeTraits.hxx ROOT/RError.hxx GuiTypes.h TApplicationImp.h TBrowser.h TBrowserImp.h TCanvasImp.h TClassMenuItem.h TContextMenu.h TContextMenuImp.h TControlBarImp.h TGuiFactory.h TInspectorImp.h TObjectSpy.h TToggleGroup.h TToggle.h TBaseClass.h TClassGenerator.h TClass.h TClassRef.h TClassStreamer.h TDataMember.h TDataType.h TDictAttributeMap.h TDictionary.h TEnumConstant.h TEnum.h TFileMergeInfo.h TFunction.h TFunctionTemplate.h TGenericClassInfo.h TGlobal.h TInterpreter.h TInterpreterValue.h TIsAProxy.h TListOfDataMembers.h TListOfEnums.h TListOfEnumsWithLock.h TListOfFunctions.h TListOfFunctionTemplates.h TMemberStreamer.h TMethodArg.h TMethodCall.h TMethod.h TProtoClass.h TRealData.h TSchemaHelper.h TSchemaRule.h TSchemaRuleSet.h TStatusBitsChecker.h TStreamerElement.h TStreamer.h TVirtualIsAProxy.h TVirtualRefProxy.h TVirtualStreamerInfo.h TVirtualArray.h TVirtualObject.h Getline.h TMacOSXSystem.h TUnixSystem.h /Users/brianhuang/ROOT_installation/root/core/base/inc/LinkDef.h
1.	/Users/brianhuang/ROOT_installation/build/etc/cling/Interpreter/RuntimePrintValue.h:20:2: current parser token 'include'
2.	/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/filesystem:539:2: current parser token 'include'
3.	/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__filesystem/directory_entry.h:20:2: current parser token 'include'
4.	/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__filesystem/filesystem_error.h:15:2: current parser token 'include'
5.	/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__filesystem/path.h:31:4: current parser token 'include'
6.	/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/iomanip:47:2: current parser token 'include'
7.	/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/istream:170:2: current parser token 'include'
8.	/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:189:2: current parser token 'include'
9.	/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/format:195:2: current parser token 'include'
10.	/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/container_adaptor.h:20:2: current parser token 'include'
11.	/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/range_default_formatter.h:23:2: current parser token 'include'
12.	/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/range_formatter.h:23:2: current parser token 'include'
13.	/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__format/format_context.h:30:4: current parser token 'include'
14.	/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:209:2: current parser token 'include'
15.	/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:599:3: current parser token 'ios_base'
16.	/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:248:1 <Spelling=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:901:39>: parsing namespace 'std'
17.	/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:248:1 <Spelling=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:902:39>: parsing namespace 'std::__1'
18.	/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:598:115: in compound statement ('{}')
Segmentation fault

did you download every required and most common dependency through homebrew before installing root?

No, I use Mac Port.
I guess you tried -Dbuiltin_glew=ON option for the cmake command (don’t forget to clean the build folder before.

cd build
rm -rf *
cmake ../root -Dbuiltin_glew=ON
make -j8

Hi @couet,
Thanks for helping, but it still failed unfortunately…
I have installed ROOT 6.36.0 through homebrew and it worked, I think installing the latest version is the only way… :frowning:

Ok, it is weird because I had no problems installing on a similar machine as yours.

One more thing: what is the exact cmake command you are using ?

my cmake command is:

cmake -DCMAKE_INSTALL_PREFIX=/Users/Home/ROOT_installation/install \
-Dbuiltin_glew=ON \
 ../root

It looks this thread is similar to your problem.

Hello @Brian_Huang,

if installing from homebrew unblocked you, I think we could leave it at that.
If, however, you really need to compile from source, compiling the latest versions of ROOT is the better approach, because we are updating them regularly to keep track of changes in OS X.