ROOT 6.30.04 build failed on macOS 14.4 arm64 Xcode 15.3

Dear Experts, I was trying to build ROOT 6.30.04 on my MacOS Sonoma and it failed with the following errors. Can you please help me?

[ 75%] Linking CXX executable src/rootcling_stage1
[ 75%] Built target rootcling_stage1
[ 75%] Generating G__Core.cxx, ../lib/Core.pcm
In file included from input_line_3:2:
In file included from /Users/subhadippal/HEPSoft/ROOT/root_build/include/Rtypes.h:193:
/Users/subhadippal/HEPSoft/ROOT/root_build/include/TGenericClassInfo.h:22:10: remark: building module 'std_vector' as '/Users/subhadippal/HEPSoft/ROOT/root_build/lib/std_vector.pcm' [-Rmodule-build]
#include <vector>
         ^
Error: Building module 'std_vector' implicitly. If 'std_vector' requires a 
dictionary please specify build dependency: 'G__Core.cxx' depends on 'std_vector'.
Otherwise, specify '-mByproduct std_vector' to disable this diagnostic.
In file included from input_line_7:16:
In file included from /Users/subhadippal/HEPSoft/ROOT/root_build/include/ROOT/TExecutorCRTP.hxx:15:
In file included from /Users/subhadippal/HEPSoft/ROOT/root_build/include/ROOT/TSeq.hxx:15:
/Users/subhadippal/HEPSoft/ROOT/root_build/include/TError.h:37:10: remark: building module 'std_functional' as '/Users/subhadippal/HEPSoft/ROOT/root_build/lib/std_functional.pcm' [-Rmodule-build]
#include <functional>
         ^
Error: Building module 'std_functional' implicitly. If 'std_functional' requires a 
dictionary please specify build dependency: 'G__Core.cxx' depends on 'std_functional'.
Otherwise, specify '-mByproduct std_functional' to disable this diagnostic.
In file included from input_line_7:16:
In file included from /Users/subhadippal/HEPSoft/ROOT/root_build/include/ROOT/TExecutorCRTP.hxx:15:
/Users/subhadippal/HEPSoft/ROOT/root_build/include/ROOT/TSeq.hxx:222:10: remark: building module 'std_sstream' as '/Users/subhadippal/HEPSoft/ROOT/root_build/lib/std_sstream.pcm' [-Rmodule-build]
#include <sstream>
         ^
Error: Building module 'std_sstream' implicitly. If 'std_sstream' requires a 
dictionary please specify build dependency: 'G__Core.cxx' depends on 'std_sstream'.
Otherwise, specify '-mByproduct std_sstream' to disable this diagnostic.
In file included from input_line_7:17:
/Users/subhadippal/HEPSoft/ROOT/root_build/include/ROOT/TSequentialExecutor.hxx:20:10: remark: building module 'std_numeric' as '/Users/subhadippal/HEPSoft/ROOT/root_build/lib/std_numeric.pcm' [-Rmodule-build]
#include <numeric> //std::accumulate
         ^
Error: Building module 'std_numeric' implicitly. If 'std_numeric' requires a 
dictionary please specify build dependency: 'G__Core.cxx' depends on 'std_numeric'.
Otherwise, specify '-mByproduct std_numeric' to disable this diagnostic.
In file included from input_line_7:24:
/Users/subhadippal/HEPSoft/ROOT/root_build/include/Riostream.h:24:10: remark: building module 'std_fstream' as '/Users/subhadippal/HEPSoft/ROOT/root_build/lib/std_fstream.pcm' [-Rmodule-build]
#include <fstream>
         ^
Error: Building module 'std_fstream' implicitly. If 'std_fstream' requires a 
dictionary please specify build dependency: 'G__Core.cxx' depends on 'std_fstream'.
Otherwise, specify '-mByproduct std_fstream' to disable this diagnostic.
/Users/subhadippal/HEPSoft/ROOT/root_build/include/Riostream.h:25:10: remark: building module 'std_iostream' as '/Users/subhadippal/HEPSoft/ROOT/root_build/lib/std_iostream.pcm' [-Rmodule-build]
#include <iostream>
         ^
Error: Building module 'std_iostream' implicitly. If 'std_iostream' requires a 
dictionary please specify build dependency: 'G__Core.cxx' depends on 'std_iostream'.
Otherwise, specify '-mByproduct std_iostream' to disable this diagnostic.
In file included from input_line_7:26:
In file included from /Users/subhadippal/HEPSoft/ROOT/root_build/include/TApplication.h:30:
In file included from /Users/subhadippal/HEPSoft/ROOT/root_build/include/TQObject.h:42:
In file included from /Users/subhadippal/HEPSoft/ROOT/root_build/include/TVirtualQConnection.h:16:
/Users/subhadippal/HEPSoft/ROOT/root_build/include/TInterpreter.h:31:10: remark: building module 'std_map' as '/Users/subhadippal/HEPSoft/ROOT/root_build/lib/std_map.pcm' [-Rmodule-build]
#include <map>
         ^
Error: Building module 'std_map' implicitly. If 'std_map' requires a 
dictionary please specify build dependency: 'G__Core.cxx' depends on 'std_map'.
Otherwise, specify '-mByproduct std_map' to disable this diagnostic.
In file included from input_line_7:40:
In file included from /Users/subhadippal/HEPSoft/ROOT/root_build/include/TBuffer.h:26:
/Users/subhadippal/HEPSoft/ROOT/root_build/include/TClass.h:39:10: remark: building module 'std_unordered_set' as '/Users/subhadippal/HEPSoft/ROOT/root_build/lib/std_unordered_set.pcm' [-Rmodule-build]
#include <unordered_set>
         ^
Error: Building module 'std_unordered_set' implicitly. If 'std_unordered_set' requires a 
dictionary please specify build dependency: 'G__Core.cxx' depends on 'std_unordered_set'.
Otherwise, specify '-mByproduct std_unordered_set' to disable this diagnostic.
In file included from input_line_7:111:
/Users/subhadippal/HEPSoft/ROOT/root_build/include/ROOT/RDirectoryEntry.hxx:21:10: remark: building module 'std_chrono' as '/Users/subhadippal/HEPSoft/ROOT/root_build/lib/std_chrono.pcm' [-Rmodule-build]
#include <chrono>
         ^
Error: Building module 'std_chrono' implicitly. If 'std_chrono' requires a 
dictionary please specify build dependency: 'G__Core.cxx' depends on 'std_chrono'.
Otherwise, specify '-mByproduct std_chrono' to disable this diagnostic.
In file included from input_line_7:116:
/Users/subhadippal/HEPSoft/ROOT/root_build/include/root_std_complex.h:13:10: remark: building module 'std_complex' as '/Users/subhadippal/HEPSoft/ROOT/root_build/lib/std_complex.pcm' [-Rmodule-build]
#include <complex>
         ^
Error: Building module 'std_complex' implicitly. If 'std_complex' requires a 
dictionary please specify build dependency: 'G__Core.cxx' depends on 'std_complex'.
Otherwise, specify '-mByproduct std_complex' to disable this diagnostic.
In file included from input_line_7:131:
/Users/subhadippal/HEPSoft/ROOT/root_build/include/TCollectionProxyInfo.h:25:10: remark: building module 'std_forward_list' as '/Users/subhadippal/HEPSoft/ROOT/root_build/lib/std_forward_list.pcm' [-Rmodule-build]
#include <forward_list>
         ^
Error: Building module 'std_forward_list' implicitly. If 'std_forward_list' requires a 
dictionary please specify build dependency: 'G__Core.cxx' depends on 'std_forward_list'.
Otherwise, specify '-mByproduct std_forward_list' to disable this diagnostic.
In file included from input_line_7:151:
/Users/subhadippal/HEPSoft/ROOT/root_build/include/ROOT/RLogger.hxx:20:10: remark: building module 'std_list' as '/Users/subhadippal/HEPSoft/ROOT/root_build/lib/std_list.pcm' [-Rmodule-build]
#include <list>
         ^
Error: Building module 'std_list' implicitly. If 'std_list' requires a 
dictionary please specify build dependency: 'G__Core.cxx' depends on 'std_list'.
Otherwise, specify '-mByproduct std_list' to disable this diagnostic.
make[2]: *** [core/G__Core.cxx] Error 1
make[1]: *** [core/CMakeFiles/G__Core.dir/all] Error 2
make: *** [all] Error 2

ROOT Version: 6.30.04
Platform: macOS Sonoma 14.4
Compiler: clang-1500.3.9.4


2 Likes

I encountered the same problem.

Hi, Did you find any solution?

No, I have no idea. The same error occurs on Intel processors. There was an XCode update today, and maybe it’s related to that.

Dear Wolfgang, Subhadip,

I am sorry you encountered this issue.

We are aware of this and are working on a fix. This is due to an XCode update: Apple changed the way C++ modules of the STL are organised.
In the meantime, if that is an option for you, you can roll-back temporarily the update.

Best,
Danilo

Hello Everyone,

I found a somewhat working solution. As suggested in the error message, I specified -mByproduct std_xyz' to disable this diagnostic.

I added the following lines

  list(APPEND core_implicit_modules "-mByproduct" "std_vector")
  list(APPEND core_implicit_modules "-mByproduct" "std_functional")
  list(APPEND core_implicit_modules "-mByproduct" "std_sstream")
  list(APPEND core_implicit_modules "-mByproduct" "std_numeric")
  list(APPEND core_implicit_modules "-mByproduct" "std_fstream")
  list(APPEND core_implicit_modules "-mByproduct" "std_iostream")
  list(APPEND core_implicit_modules "-mByproduct" "std_map")
  list(APPEND core_implicit_modules "-mByproduct" "std_unordered_set")
  list(APPEND core_implicit_modules "-mByproduct" "std_chrono")
  list(APPEND core_implicit_modules "-mByproduct" "std_complex")
  list(APPEND core_implicit_modules "-mByproduct" "std_forward_list")
  list(APPEND core_implicit_modules "-mByproduct" "std_list")
  list(APPEND core_implicit_modules "-mByproduct" "std_condition_variable")
  list(APPEND core_implicit_modules "-mByproduct" "std_thread")
  list(APPEND core_implicit_modules "-mByproduct" "std_queue")

manually after the following lines in core/CMakeLists.txt and rebuilt ROOT. It worked for me.

  list(APPEND core_implicit_modules "-m" "_Builtin_intrinsics" "-mByproduct" "_Builtin_intrinsics")
  list(APPEND core_implicit_modules "-mByproduct" "ROOT_Foundation_Stage1_NoRTTI")
  list(APPEND core_implicit_modules "-mByproduct" "ROOT_Foundation_C")
  list(APPEND core_implicit_modules "-mByproduct" "ROOT_Rtypes")
2 Likes

Thank you for the proposed temporary fix. I have finally managed to install it…

1 Like

I am experiencing the same issue, and unfortunately this workaround doesn’t work for me.

In case this helps, I have applied this workaround to the master branch (the development version) and not to 6.30.04. Also do not forget to run cmake after this fix, before compiling the code.

same issue, and thanks for temporary fix

1 Like

Hi! Same problem. I tried to use the @Subhadip_Pal solution but I am getting further errors:

In file included from input_line_7:18:
/Users/marias/Software/root_build/include/TThreadPool.h:28:10: remark: building module ‘std_queue’ as ‘/Users/marias/Software/root_build/lib/std_queue.pcm’ [-Rmodule-build]
#include
^
Error: Building module ‘std_queue’ implicitly. If ‘std_queue’ requires a
dictionary please specify build dependency: ‘G__Thread.cxx’ depends on ‘std_queue’.
Otherwise, specify ‘-mByproduct std_queue’ to disable this diagnostic.
[ 76%] Built target G__complexDict
[ 76%] Generating G__mapDict.cxx, …/…/lib/libmapDict.rootmap
[ 76%] Built target G__forward_listDict
[ 76%] Generating G__map2Dict.cxx, …/…/lib/libmap2Dict.rootmap
[ 76%] Built target G__listDict
[ 76%] Generating G__unordered_mapDict.cxx, …/…/lib/libunordered_mapDict.rootmap
[ 76%] Building CXX object core/rint/CMakeFiles/G__Rint.dir/G__Rint.cxx.o
[ 76%] Built target G__vectorDict
[ 76%] Generating G__multimapDict.cxx, …/…/lib/libmultimapDict.rootmap
[ 76%] Linking CXX shared library …/…/…/…/lib/libcppyy_backend3_12.so
[ 76%] Building CXX object core/clingutils/CMakeFiles/G__mapDict.dir/G__mapDict.cxx.o
[ 76%] Built target cppyy_backend3_12
[ 76%] Generating G__multimap2Dict.cxx, …/…/lib/libmultimap2Dict.rootmap
In file included from input_line_7:22:
/Users/marias/Software/root_build/include/ROOT/TThreadedObject.hxx:31:10: remark: building module ‘std_thread’ as ‘/Users/marias/Software/root_build/lib/std_thread.pcm’ [-Rmodule-build]
#include
^
Error: Building module ‘std_thread’ implicitly. If ‘std_thread’ requires a
dictionary please specify build dependency: ‘G__Thread.cxx’ depends on ‘std_thread’.
Otherwise, specify ‘-mByproduct std_thread’ to disable this diagnostic.

It looks like the last three lines from your suggestion do not apply to that set of errors. Did you also saw such thing? I guess I should add similar lines (as suggested) to some CMakeLists.txt but I cannot find it :frowning:

1 Like

the trick I used is to compile with single thread as “cmake --build . – install -j1” after applying the suggested fix.
good luck

1 Like

Same for me

Hello @mstefaniak, I think I saw something similar at first. But I didn’t add such lines in any other CMakeLists.txt file. After making changes in the core/CMakeLists.txt file I configured ROOT again using Cmake and then built it. It worked.

Good luck.

Yes, I am doing it precisely like you wrote. Unfortunately, that is not a solution :frowning: thanks!

The latest master version is compiling fine on Mac with XCode 15.3 now

2 Likes

@couet what does it mean “master”? Can I also download it with:

git clone --branch latest-stable --depth=1 https://github.com/root-project/root.git root_src

Dear @mstefaniak , all,

Thanks for this thread and for sharing your issues and concrete workarounds: it was impressive for me to observe your positive attitude!

We worked hard on this issue and the master branch of ROOT has been fixed (see this PR). If you can, you just have to update your repo, reconfigure and rebuild. Should you encounter more issues, please do not hesitate to come back to us either through the forum, or, slightly preferred for issues like this one, on our GH tracker.

On our side, we upgraded also our CI, by adding nodes running the macos beta, getting the latest updates of OS and XCode, which sometimes cause instabilities to applications. This will allow us to spot future problematic updates in advance. A release of 6.30, once a backport of the fix is available, will be provided.

Thanks again for your collaborative attitude!

Best,
Danilo

1 Like

To get the master branch, remove --latest-stable when cloning,

1 Like

I went through that part and failed further:

[ 86%] Building CXX object geom/geom/CMakeFiles/Geom.dir/src/TGeoXtru.cxx.o
ld: archive member ‘/’ not a mach-o file in ‘/Users/marias/Software/root_build/FREETYPE-prefix/src/FREETYPE/objs/.libs/libfreetype.a’
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [graf2d/graf/CMakeFiles/Graf.dir/build.make:671: lib/libGraf.so] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:43022: graf2d/graf/CMakeFiles/Graf.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs…