Home | News | Documentation | Download

Need help building ROOT v6.23.01 on ARM MacBook


Please read tips for efficient and successful posting and posting code

ROOT Version: v6.23.01
Platform: macOS 11.1 (20C69)
Compiler: Not Provided


Problem: make error when building ROOT v6.23.01

[ 36%] Building CXX object core/meta/CMakeFiles/Meta.dir/src/TBaseClass.cxx.o
CMake Error at /Users/hangyi/Documents/workspaces/root-build/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-Release.cmake:49 (message):
  Command failed: 2

   '/Library/Developer/CommandLineTools/usr/bin/make'

  See also

    /Users/hangyi/Documents/workspaces/root-build/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-*.log


make[2]: *** [XROOTD-prefix/src/XROOTD-stamp/XROOTD-build] Error 1
make[1]: *** [CMakeFiles/XROOTD.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Steps to reproduce:

git clone --branch v6-23-01 https://github.com/root-project/root.git root-src
mkdir root-build root-install && cd root-build
cmake -DCMAKE_INSTALL_PREFIX=../root-install -Dtbb=OFF -Dbuiltin_xrootd=OFF -Dimt=OFF -DPYTHON_EXECUTABLE=/usr/local/bin/python3 ../root-src | tee build.txt
cmake --build . --target install -j8 | tee install.txt

Build log file: build.txt (9.6 KB)
Install log file: install.txt (593.3 KB)
XROOTD build log file: XROOTD-build-err.txt (2.4 KB)

I’ve already disabled XROOTD with -Dbuiltin_xrootd=OFF, so I’m confused why it’s still trying to build it. In this sense, I’m afraid imt and tbb weren’t disabled as well.

Hello,

It seems that it enables builtin_xrootd because it can’t find it in the system.
-- XROOTD not found, enabling 'builtin_xrootd' option

Perhaps you could try installing xrootd yourself (to workaround the build failure of the built_in xrootd).

Informing @oshadura so that she can have a look.

Thanks for replying!

I’ve bypassed this error by specifying my local xrootd path. But now I got another error which seems very prominent in many of my previous building attempts and it also has something to do with the new arm64 architecture.

Error:

[ 40%] Copying /Users/hangyi/Documents/workspaces/root-src/icons/mb_stop_s.xpm
ld: warning: ignoring file ../../FREETYPE-prefix/src/FREETYPE/objs/.libs/libfreetype.a, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
[ 40%] Copying /Users/hangyi/Documents/workspaces/root-src/icons/mdi_close.xpm
Undefined symbols for architecture arm64:
  "_FT_Attach_File", referenced from:
      FTFace::Attach(char const*) in FTFace.cxx.o
  "_FT_Attach_Stream", referenced from:
      FTFace::Attach(unsigned char const*, unsigned long) in FTFace.cxx.o
  "_FT_Done_Face", referenced from:
      FTFace::~FTFace() in FTFace.cxx.o
      FTFace::~FTFace() in FTFace.cxx.o
      FTFace::~FTFace() in FTFace.cxx.o
  "_FT_Done_FreeType", referenced from:
      FTLibrary::~FTLibrary() in FTLibrary.cxx.o
      FTLibrary::~FTLibrary() in FTLibrary.cxx.o
  "_FT_Get_Char_Index", referenced from:
      FTCharmap::FontIndex(unsigned int) in FTCharmap.cxx.o
  "_FT_Get_Kerning", referenced from:
      FTFace::KernAdvance(unsigned int, unsigned int) in FTFace.cxx.o
  "_FT_Init_FreeType", referenced from:
      FTLibrary::Instance() in FTLibrary.cxx.o
      FTLibrary::FTLibrary() in FTLibrary.cxx.o
      FTLibrary::FTLibrary() in FTLibrary.cxx.o
      FTLibrary::Initialise() in FTLibrary.cxx.o
  "_FT_Load_Glyph", referenced from:
      FTFace::Glyph(unsigned int, int) in FTFace.cxx.o
  "_FT_New_Face", referenced from:
      FTFace::FTFace(char const*) in FTFace.cxx.o
  "_FT_New_Memory_Face", referenced from:
      FTFace::FTFace(unsigned char const*, unsigned long) in FTFace.cxx.o
  "_FT_Outline_Get_CBox", referenced from:
      FTGlyph::FTGlyph(FT_GlyphSlotRec_*, bool) in FTGlyph.cxx.o
  "_FT_Render_Glyph", referenced from:
      FTBitmapGlyph::FTBitmapGlyph(FT_GlyphSlotRec_*) in FTBitmapGlyph.cxx.o
      FTPixmapGlyph::FTPixmapGlyph(FT_GlyphSlotRec_*) in FTPixmapGlyph.cxx.o
      FTTextureGlyph::FTTextureGlyph(FT_GlyphSlotRec_*, int, int, int, int, int) in FTTextureGlyph.cxx.o
  "_FT_Select_Charmap", referenced from:
      FTCharmap::CharMap(FT_Encoding_) in FTCharmap.cxx.o
  "_FT_Set_Char_Size", referenced from:
      FTSize::CharSize(FT_FaceRec_**, unsigned int, unsigned int, unsigned int) in FTSize.cxx.o
  "_FT_Set_Charmap", referenced from:
      FTCharmap::FTCharmap(FTFace*) in FTCharmap.cxx.o
      FTCharmap::FTCharmap(FTFace*) in FTCharmap.cxx.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libFTGL.so] Error 1
make[1]: *** [graf3d/ftgl/CMakeFiles/FTGL.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Steps to reproduce is almost the same expect I added -DXROOTD_ROOT_DIR=/usr/local/Cellar/xrootd/5.0.3 in the build step.

git clone --branch v6-23-01 https://github.com/root-project/root.git root-src
mkdir root-build root-install && cd root-build
cmake -DCMAKE_INSTALL_PREFIX=../root-install -Dtbb=OFF -Dbuiltin_xrootd=OFF -Dimt=OFF -DPYTHON_EXECUTABLE=/usr/local/bin/python3 -DXROOTD_ROOT_DIR=/usr/local/Cellar/xrootd/5.0.3 ../root-src | tee build.txt
cmake --build . --target install -j8 | tee install.txt

Build log file: build.txt (10.0 KB)
Install log file: install.txt (606.9 KB)

Thanks for the report, at this point I hand it over to @oshadura

1 Like

Update

The above problem happens in building FTGL. It’s bypassed by specifying the path to my local FTGL (installed via Homebrew).

Now I’m getting this error

Scanning dependencies of target Cling
[ 77%] Linking CXX shared library ../../../lib/libCling.so
While building module 'Core':
While building module 'std' imported from input_line_1:1:
While building module 'Darwin' imported from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ctype.h:38:
In file included from <module-includes>:1073:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.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:
/Library/Developer/CommandLineTools/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>
 ~~~~~~~~^
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/hangyi/workspaces/root-build/etc/cling/Interpreter/RuntimeUniverse.h:26:10: fatal error: could not build module 'std'
#include <new>
 ~~~~~~~~^
/Users/hangyi/workspaces/root-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/hangyi/workspaces/root-build/etc/cling/lib/clang/5.0.0/include/immintrin.h:32:
In file included from /Users/hangyi/workspaces/root-build/etc/cling/lib/clang/5.0.0/include/xmmintrin.h:39:
In file included from /Users/hangyi/workspaces/root-build/etc/cling/lib/clang/5.0.0/include/mm_malloc.h:27:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdlib.h:97:
/Users/hangyi/workspaces/root-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[1]: *** Waiting for unfinished jobs....
[ 77%] Built target Cling
make: *** [all] Error 2

Steps to reproduce (I added -DFTGL_ROOT_DIR=/usr/local/Cellar/ftgl/2.1.3-rc5 and -Druntime_cxxmodules=OFF)

git clone --branch v6-23-01 https://github.com/root-project/root.git root-src
mkdir root-build root-install && cd root-build
cmake -DCMAKE_INSTALL_PREFIX=../root-install -Dtbb=OFF -Dbuiltin_xrootd=OFF -Dimt=OFF -DPYTHON_EXECUTABLE=/usr/local/bin/python3 -DXROOTD_ROOT_DIR=/usr/local/Cellar/xrootd/5.0.3 -DFTGL_ROOT_DIR=/usr/local/Cellar/ftgl/2.1.3-rc5 -Druntime_cxxmodules=OFF ../root-src | tee build.txt
cmake --build . --target install -j8 | tee install.txt

Build log file: build.txt (9.8 KB)
Install log file: install.txt (692.2 KB)

@Patrick_Wu what if you turn on modules on? -Druntime_cxxmodules=ON

Basically to summarize, builtin_xrootd and builtin_ftgl doesn’t work on new Mac ARMs? Could you please add an issue here: https://github.com/root-project/root/issues

1 Like

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

And FYI, building builtin ftgl and xrootd works for us, or ARM macs. You can see it at https://lcgapp-services.cern.ch/root-jenkins/job/root-release-master/BUILDTYPE=Release,LABEL=mac110arm,V=master/361/consoleFull of you have a CERN account.

So there must be something else specific for your setup.

Also git clone --branch v6-23-01 looks suspicious to me - we have no such branch.

1 Like

For the record, this is another occurrence of V6.22.00 build error on MacOS