I have a problem compiling root on Apple Silicon. This is a clean installation and make fails with
[ 64%] Linking CXX shared library ../../lib/libGraf.so
ld: warning: ignoring file '../../FREETYPE-prefix/src/FREETYPE/objs/.libs/libfreetype.a(dlg.o)': found architecture 'x86_64', required architecture 'arm64'
What is crazy is the following:
$ cd FREETYPE-prefix/src/FREETYPE
$ file objs/ftbdf.*
objs/ftbdf.lo: libtool object file, ASCII text
objs/ftbdf.o: Mach-O 64-bit object x86_64
$ rm objs/ftbdf.*
$ make VERBOSE=1
./builds/unix/libtool --mode=compile /usr/bin/cc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk -pedantic -std=c99 -I/usr/local/root-git/buildroot/FREETYPE-prefix/src/FREETYPE/src/base -I/usr/local/root-git/buildroot/FREETYPE-prefix/src/FREETYPE/objs -I./builds/unix -I/usr/local/root-git/buildroot/FREETYPE-prefix/src/FREETYPE/include -c -Wall -O -fvisibility=hidden -DDARWIN_NO_CARBON -pthread -DFT_CONFIG_CONFIG_H="<ftconfig.h>" -DFT_CONFIG_MODULES_H="<ftmodule.h>" -DFT_CONFIG_OPTIONS_H="<ftoption.h>" -DFT2_BUILD_LIBRARY -o /usr/local/root-git/buildroot/FREETYPE-prefix/src/FREETYPE/objs/ftbdf.lo /usr/local/root-git/buildroot/FREETYPE-prefix/src/FREETYPE/src/base/ftbdf.c
libtool: compile: /usr/bin/cc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk -pedantic -std=c99 -I/usr/local/root-git/buildroot/FREETYPE-prefix/src/FREETYPE/src/base -I/usr/local/root-git/buildroot/FREETYPE-prefix/src/FREETYPE/objs -I./builds/unix -I/usr/local/root-git/buildroot/FREETYPE-prefix/src/FREETYPE/include -c -Wall -O -fvisibility=hidden -DDARWIN_NO_CARBON -pthread "-DFT_CONFIG_CONFIG_H=<ftconfig.h>" "-DFT_CONFIG_MODULES_H=<ftmodule.h>" "-DFT_CONFIG_OPTIONS_H=<ftoption.h>" -DFT2_BUILD_LIBRARY /usr/local/root-git/buildroot/FREETYPE-prefix/src/FREETYPE/src/base/ftbdf.c -fno-common -DPIC -o /usr/local/root-git/buildroot/FREETYPE-prefix/src/FREETYPE/objs/ftbdf.o
$ file objs/ftbdf.*
objs/ftbdf.lo: libtool object file, ASCII text
objs/ftbdf.o: Mach-O 64-bit object x86_64
The file produced is x86_64 and the build fails. Now I take exactly the same line and I copy paste it and I execute it
$ rm objs/ftbdf.*
$ ./builds/unix/libtool --mode=compile /usr/bin/cc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk -pedantic -std=c99 -I/usr/local/root-git/buildroot/FREETYPE-prefix/src/FREETYPE/src/base -I/usr/local/root-git/buildroot/FREETYPE-prefix/src/FREETYPE/objs -I./builds/unix -I/usr/local/root-git/buildroot/FREETYPE-prefix/src/FREETYPE/include -c -Wall -O -fvisibility=hidden -DDARWIN_NO_CARBON -pthread -DFT_CONFIG_CONFIG_H="<ftconfig.h>" -DFT_CONFIG_MODULES_H="<ftmodule.h>" -DFT_CONFIG_OPTIONS_H="<ftoption.h>" -DFT2_BUILD_LIBRARY -o /usr/local/root-git/buildroot/FREETYPE-prefix/src/FREETYPE/objs/ftbdf.lo /usr/local/root-git/buildroot/FREETYPE-prefix/src/FREETYPE/src/base/ftbdf.c
$ file objs/ftbdf.*
objs/ftbdf.lo: libtool object file, ASCII text
objs/ftbdf.o: Mach-O 64-bit object arm64
And now the file produced is arm!!!
HELP!
Please read tips for efficient and successful posting and posting code
Please fill also the fields below. Note that root -b -q
will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug
from the ROOT prompt to pre-populate a topic.
ROOT Version: v6-36-00-patches
Platform: Darwin MacBook-Air.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:40 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T8132 arm64
Compiler: Apple clang version 17.0.0 (clang-1700.0.13.5)