Build is failing on macOS

Hi,
trying to compile latest ROOT on my MacBook. After I issue:

cmake --build .

it runs for a while and it reaches 91% and then boom:
I can’t understand what’s wrong…

Scanning dependencies of target onepcm

[ 91%] Generating etc/allDict.cxx.pch

Generating PCH for bindings/pyroot core core/clingutils core/imt core/multiproc core/rint core/thread graf2d/asimage graf2d/cocoa graf2d/gpad graf2d/graf graf2d/postscript graf3d/g3d graf3d/gl gui/fitpanel gui/gui hist/hist hist/histpainter hist/spectrum hist/spectrumpainter hist/unfold io/io math/genetic math/genvector math/mathcore math/matrix math/minuit math/physics math/smatrix math/vecops net/net net/netx net/netxng roofit/histfactory roofit/roofit roofit/roofitcore roofit/roostats tmva/tmva tmva/tmvagui tree/dataframe tree/tree tree/treeplayer tree/treeviewer

Usage: rootcling [-v][-v0-4] [-f] [out.cxx] [opts] file1.h[+][-][!] file2.h[+][-][!] …[LinkDef.h]

Only one verbose flag is authorized (one of -v, -v0, -v1, -v2, -v3, -v4)

and must be before the -f flags

For more extensive help type: ./bin/rootcling -h

gmake[2]: *** [CMakeFiles/onepcm.dir/build.make:178: etc/allDict.cxx.pch] Error 1

gmake[1]: *** [CMakeFiles/Makefile2:7461: CMakeFiles/onepcm.dir/all] Error 2
gmake: *** [Makefile:172: all] Error 2


ROOT Version: 6.20.04
Platform: MacOS 10.15.4
Compiler: Not Provided


@vvassilev can you take a look please?

Could you try a build from scratch and paste the your cmake build configuration?

here it is:

➜ build cmake /Volumes/MEMORY/root-6.20.04 -DPYTHON_EXECUTABLE=/opt/local/bin/python3 -Dbuiltin_glew=ON
– Looking for python
– Preferring Python version 3
– ROOT default compression algorithm: zlib
– Found a Mac OS X System 10.15
– Found a 64bit system
– Found LLVM compiler collection
– ROOT Platform: macosx
– ROOT Architecture: macosx64
– Build Type: Release (flags = ‘-O2 -DNDEBUG’)
– Compiler Flags: -O2 -DNDEBUG -std=c++11 -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -stdlib=libc++
– Looking for ZLib
– Building freetype version 2.6.1 included in ROOT itself
– Looking for PCRE
– Looking for LZMA
– Looking for ZSTD
– Looking for LZ4
– Building AfterImage library included in ROOT itself
– Looking for OpenGL
– Looking for gl2ps
CMake Warning (dev) at /opt/local/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
The package name passed to find_package_handle_standard_args (GL2PS) does
not match the name of the calling package (gl2ps). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
cmake/modules/Findgl2ps.cmake:27 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
cmake/modules/SearchInstalledSoftware.cmake:15 (_find_package)
cmake/modules/SearchInstalledSoftware.cmake:541 (find_Package)
CMakeLists.txt:168 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

– Could NOT find GL2PS (missing: GL2PS_LIBRARY GL2PS_INCLUDE_DIR)
– gl2ps not found. Switching on builtin_gl2ps option
– Looking for LibXml2
– Found LibXml2: /opt/local/lib/libxml2.dylib (found version “2.9.10”)
– Found OpenSSL: /opt/local/lib/libcrypto.dylib (found version “1.1.1g”)
– Looking for MySQL
CMake Warning (dev) at /opt/local/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
The package name passed to find_package_handle_standard_args (MYSQL) does
not match the name of the calling package (MySQL). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
cmake/modules/FindMySQL.cmake:65 (find_package_handle_standard_args)
cmake/modules/SearchInstalledSoftware.cmake:15 (_find_package)
cmake/modules/SearchInstalledSoftware.cmake:607 (find_package)
CMakeLists.txt:168 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

– Could NOT find MYSQL (missing: MYSQL_INCLUDE_DIR MYSQL_LIBRARIES)
– MySQL not found. Switching off mysql option
– Looking for Oracle
– Oracle not found.
– Oracle: You can specify includes: -DORACLE_PATH_INCLUDES=/usr/include/oracle/10.2.0.3/client
– currently found includes:
– Oracle: You can specify libs: -DORACLE_PATH_LIB=/usr/lib/oracle/10.2.0.3/client/lib
– currently found libs: ORACLE_LIBRARY_OCCI-NOTFOUND;ORACLE_LIBRARY_CLNTSH-NOTFOUND;ORACLE_LIBRARY_LNNZ-NOTFOUND
– Oracle not found. Switching off oracle option
– Looking for PostgreSQL
– Could NOT find PostgreSQL (missing: PostgreSQL_INCLUDE_DIR)
– PostgreSQL not found. Switching off pgsql option
– Looking for SQLite
– Found Sqlite: /opt/local/include
– Looking for Pythia6
– Pythia6 not found. Switching off pythia6 option
– Looking for Pythia8
– Could NOT find Pythia8 (missing: PYTHIA8_INCLUDE_DIR PYTHIA8_LIBRARY)
– Pythia8 not found. Switching off pythia8 option
– Looking for FFTW3
– Found fftw3 includes at /opt/local/include
– Found fftw3 library at /opt/local/lib/libfftw3.dylib
– Looking for CFITSIO
– Could NOT find CFITSIO (missing: CFITSIO_LIBRARY CFITSIO_INCLUDE_DIR)
– CFITSIO not found. You can enable the option ‘builtin_cfitsio’ to build the library internally’
– For the time being switching off ‘fitsio’ option
– Looking for XROOTD
– Found Xrootd version num: 4.3.0 (setting -DROOTXRDVERS=400030000)
– libXrdMain not found: xproofd will be a wrapper around xrootd
– include_dirs: /usr/local/include/xrootd;/usr/local/include/xrootd/private
– libraries: /usr/local/lib/libXrdUtils.dylib;/usr/local/lib/libXrdClient.dylib;/usr/local/lib/libXrdCl.dylib
– Could NOT find GFAL (missing: GFAL_INCLUDE_DIR SRM_IFCE_INCLUDE_DIR GFAL_LIBRARY)
– GFAL library not found. Set variable GFAL_DIR to point to your gfal installation
and the variable SRM_IFCE_DIR to the srm_ifce installation
– For the time being switching OFF ‘gfal’ option
– Could NOT find FTGL (missing: FTGL_INCLUDE_DIR FTGL_LIBRARY)
– ftgl library not found. Set variable FTGL_ROOT_DIR to point to your installation
– For the time being switching ON ‘builtin_ftgl’ option
– Checking for module ‘davix>=0.6.4’
– No package ‘davix’ found
– Looking for uuid_generate_random in uuid
– Looking for uuid_generate_random in uuid - not found
CMake Warning (dev) at /opt/local/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
The package name passed to find_package_handle_standard_args (uuid) does
not match the name of the calling package (libuuid). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
cmake/modules/Findlibuuid.cmake:75 (find_package_handle_standard_args)
cmake/modules/SearchInstalledSoftware.cmake:15 (_find_package)
cmake/modules/SearchInstalledSoftware.cmake:1074 (find_package)
CMakeLists.txt:168 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

– Found uuid: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include
– Davix not found, switching ON ‘builtin_davix’ option.
CMake Warning (dev) at /opt/local/share/cmake-3.17/Modules/FindPackageHandleStandardArgs.cmake:272 (message):
The package name passed to find_package_handle_standard_args (uuid) does
not match the name of the calling package (libuuid). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
cmake/modules/Findlibuuid.cmake:75 (find_package_handle_standard_args)
cmake/modules/SearchInstalledSoftware.cmake:15 (_find_package)
builtins/davix/CMakeLists.txt:9 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

– Looking for clock_gettime
– Looking for clock_gettime - found
– Looking for TBB
– Could NOT find TBB (missing: TBB_ROOT_DIR TBB_INCLUDE_DIR TBB_LIBRARY) (Required is at least version “2018”)
– TBB not found, enabling ‘builtin_tbb’ option
– Performing Test CXX_HAS_mno_rtm
– Performing Test CXX_HAS_mno_rtm - Success
– Looking for VDT
– Could NOT find Vdt (missing: VDT_INCLUDE_DIR VDT_LIBRARY) (Required is at least version “0.4”)
– VDT not found. Ensure that the installation of VDT is in the CMAKE_PREFIX_PATH
– Switching ON ‘builtin_vdt’ option
– Cannot select cudnn without selecting cuda or tmva-gpu. Option is ignored
– Looking for BLAS for optional parts of TMVA
– Looking for sgemm_
– Looking for sgemm_ - not found
– Looking for dgemm_
– Looking for dgemm_ - found
– Found BLAS: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Accelerate.framework
– Performing Test ROOT_HAVE_CXX_ATOMICS_WITHOUT_LIB
– Performing Test ROOT_HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
– Building LLVM in ‘Release’ mode.
– The ASM compiler identification is Clang
– Found assembler: /Library/Developer/CommandLineTools/usr/bin/cc
– Found libtool - /Library/Developer/CommandLineTools/usr/bin/libtool
– Looking for backtrace
– Looking for backtrace - found
– backtrace facility detected in default set of libraries
– Found Backtrace: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include
– Native target architecture is X86
– Threads disabled.
– Doxygen disabled.
– Go bindings disabled.
– Found ld64 - /Library/Developer/CommandLineTools/usr/bin/ld
– LLVM host triple: x86_64-apple-darwin19.4.0
– LLVM default target triple: x86_64-apple-darwin19.4.0
– Building with -fPIC
– Found PythonInterp: /opt/local/bin/python3 (found version “3.7.7”)
– Constructing LLVMBuild project information
– SysLibs: curses;/opt/local/lib/libz.dylib
– Targeting X86
– Targeting NVPTX
– Clang version: 5.0.0
– Cling version (from VERSION file): ROOT_0.7~dev
– Cling will look for C++ headers in ‘/Library/Developer/CommandLineTools/usr/bin/…/include/c++/v1’ at runtime.
– And if not found, will invoke: '/Library/Developer/CommandLineTools/usr/bin/c++ ’ for them.
– Performing Test __result
– Performing Test __result - Failed
– Performing Test CXX_HAS_fno_rtti
– Performing Test CXX_HAS_fno_rtti - Success
– Performing Test CXX_HAS_Wno_conditional_uninitialized
– Performing Test CXX_HAS_Wno_conditional_uninitialized - Success
– Performing Test C_HAS_Wno_strict_overflow
– Performing Test C_HAS_Wno_strict_overflow - Success
– Performing Test C_HAS_Wno_maybe_uninitialized
– Performing Test C_HAS_Wno_maybe_uninitialized - Failed
– Performing Test C_HAS_Wno_parentheses_equality
– Performing Test C_HAS_Wno_parentheses_equality - Success
– Looking for m
– Looking for m - not found
– Performing Test CXX_HAS_Wno_nonnull_compare
– Performing Test CXX_HAS_Wno_nonnull_compare - Failed
– Performing Test CXX_HAS_fno_strict_aliasing
– Performing Test CXX_HAS_fno_strict_aliasing - Success
– Performing Test CXX_HAS_Wno_parentheses_equality
– Performing Test CXX_HAS_Wno_parentheses_equality - Success
– Performing Test CXX_HAS_Wno_cast_function_type
– Performing Test CXX_HAS_Wno_cast_function_type - Failed
– Performing Test CXX_HAS_Wno_deprecated_register
– Performing Test CXX_HAS_Wno_deprecated_register - Success
– Performing Test CXX_HAS_Wno_register
– Performing Test CXX_HAS_Wno_register - Success
– Performing Test found_setresuid
– Performing Test found_setresuid - Failed
– Performing Test found_stdstringview
– Performing Test found_stdstringview - Success
– Performing Test found_stod_stringview
– Performing Test found_stod_stringview - Failed
– Performing Test found_opplusequal_stringview
– Performing Test found_opplusequal_stringview - Success
– Performing Test found_stdapply
– Performing Test found_stdapply - Failed
– Performing Test found_stdinvoke
– Performing Test found_stdinvoke - Failed
– Performing Test found_stdindexsequence
– Performing Test found_stdindexsequence - Failed
– Performing Test found_attribute_always_inline
– Performing Test found_attribute_always_inline - Success
– Performing Test has_found_attribute_noinline
– Performing Test has_found_attribute_noinline - Success
Running /Volumes/MEMORY/root-6.20.04/build/unix/compiledata.sh
Making /Volumes/emudisc/build/include/compiledata.h
– Enabled support for: asimage builtin_afterimage builtin_clang builtin_davix builtin_freetype builtin_ftgl builtin_gl2ps builtin_glew builtin_llvm builtin_tbb builtin_vdt builtin_xxhash clad cocoa dataframe davix exceptions fftw3 gdml http imt libcxx mlp opengl pyroot roofit shared sqlite ssl tmva tmva-cpu tmva-pymva spectrum vdt xml xrootd
– Configuring done
– Generating done
– Build files have been written to: /Volumes/emudisc/build

Looks pretty standard. Could you now type make -j12 VERBOSE=1 and attach the output. It should print some additional debug output for rootcling when genarating the PCH at the end of the build.

this is the last part where the error occurs:

cd /Users/tetto/core/metacling/src && /Library/Developer/CommandLineTools/usr/bin/c++ -I/Volumes/MEMORY/root-6.20.04/core/metacling/src/…/res -I/Volumes/MEMORY/root-6.20.04/core/metacling/src/…/…/clingutils/res -I/Volumes/MEMORY/root-6.20.04/core/metacling/src/…/…/foundation/res -I/Volumes/MEMORY/root-6.20.04/interpreter/cling/include -I/Users/tetto/include -isystem /Volumes/MEMORY/root-6.20.04/interpreter/llvm/src/tools/clang/include -isystem /Users/tetto/interpreter/llvm/src/tools/clang/include -isystem /Volumes/MEMORY/root-6.20.04/interpreter/llvm/src/include -isystem /Users/tetto/interpreter/llvm/src/include -std=c++11 -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -m64 -pipe -W -Wall -Woverloaded-virtual -fsigned-char -fno-common -Qunused-arguments -pthread -stdlib=libc++ -fvisibility=hidden -Wno-shadow -fno-strict-aliasing -Wno-unused-parameter -Wwrite-strings -Wno-long-long -DLLVM_BUILD_GLOBAL_ISEL -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Wno-conditional-uninitialized -O2 -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIC -std=c++11 -fno-rtti -o CMakeFiles/MetaCling.dir/TClingCallbacks.cxx.o -c /Volumes/MEMORY/root-6.20.04/core/metacling/src/TClingCallbacks.cxx
make[1]: *** [interpreter/llvm/src/lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/all] Error 2
make[1]: *** [core/dictgen/CMakeFiles/Dictgen.dir/all] Error 2
make[1]: *** [core/metacling/src/CMakeFiles/MetaCling.dir/all] Error 2
make: *** [all] Error 2

Could you attach the entire log?

find attached the entire logoutput.txt.zip (243.0 KB)

The underlying issue is read jobs pipe: Resource temporarily unavailable. Could be any of the following:

  • broken make binary
  • ulimit too low
  • out of memory
  • /tmp full
    …and whatever else I cannot think of right now. Not even the Internet has seen this error; I don’t think we can help :frowning: In the end, this is a system config issue, not something related to ROOT. Running make -j2 or so might or might not help.

Cheers, Axel.

Thanks, indeed after a clean reboot of my machine and two additional trials, I got to work, thanks for your help!

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