Update ROOT and Cling to LLVM18
This Pull request:
Rebase
A few relevant LLVM commits that were referenced for the rebase:
- https://github.com/llvm/llvm-project/commit/95dd17848383315050a5d64051bd695d0a653c51
- https://github.com/llvm/llvm-project/commit/8d67b9e2461d654c0a3657e511e2295006f23748
- https://github.com/llvm/llvm-project/commit/9478f661c26fbc22491218477917df5d8d73c51c
- https://github.com/llvm/llvm-project/commit/6a6994cc9bc0327aaf8b005c650ff5eb29d2bcce
- https://github.com/llvm/llvm-project/commit/8b1771bd9f304be39d4dcbdcccedb6d3bcd18200
Notes
- Cling and Root commits for the rebase are kept separate for now (can squash similar commits together later).
- Also added a temporary commit https://github.com/root-project/llvm-project/commit/4066693bd33bc93bdee33415b7f5773bda1d1f49 in LLVM to prevent building of mlgo-utils, which will not compile when all the test folders are removed. We can either keep it or add an exception to this file in the Root GitHub workflow to not remove the test folders under mlgo-utils.
TO DISCUSS/PROPERLY FIX
- [x] The commit 64f7cf6318ca9a4da766b02c45fc81aea7762f8e is memleaking; it is a temporary fix for now to prevent some failing tests, like
gtest-roofit-histfactory-test-testHistFactory.- Fixed with: https://github.com/root-project/root/pull/16314
- [x] This commit: https://github.com/root-project/root/pull/15696/commits/de5d1413e07170e396ac51d982c0844e4f548f4b is a temporarily fix reintroducing a memory leak.
- Fixed with: https://github.com/root-project/root/pull/15696/commits/2c2d4dc2bf3ebe0f475b05a66a377c2467525d9d
- [x] This commit: d79963ecb74f957a332409ed91b106a0f53da10a fixes an issue with failing tests like
tutorial-hist-cumulativewhen JITLink is turned on. This works for now, but will need to investigate further on why resource trackers were not destructed in the right order.- Not a critical issue: Can also look into this later after the merge.
- [x] Discussion on a proper solution for the macOS modulemap issue
- Fixed with: https://github.com/root-project/root/pull/16315
Changes or fixes:
Checklist:
- [x] Fix mac13 build
- [ ] tested changes locally
- [ ] updated the docs (if necessary)
This PR fixes #
Test Results
13 files 13 suites 3d 2h 28m 40s :stopwatch: 3 029 tests 3 029 :white_check_mark: 0 :zzz: 0 :x: 33 856 runs 33 856 :white_check_mark: 0 :zzz: 0 :x:
Results for commit a52d34d5.
:recycle: This comment has been updated with latest results.
I know this is totally not relevant for you, but I am still wondering: does this allow me to use system clang or are there still downstream patches required?
I know this is totally not relevant for you, but I am still wondering: does this allow me to use system clang or are there still downstream patches required?
Hi Stephan, no we still require downstream patches. Their number gets reduced on every upgrade, you can track the status for LLVM 18 here: https://github.com/root-project/llvm-project/commits/ROOT-llvm18. More importantly, and not yet reflected in ROOT-llvm18, we will now also require a patch to the core LLVM JIT infrastructure (until upgrading past LLVM 19): https://github.com/llvm/llvm-project/pull/95532
Thanks for the update!
Here is the stack trace on Windows:
Generating etc/allDict.cxx.pch
Generating PCH for bindings\tpython core core\clingutils core\imt core\rint core\thread graf2d\asimage graf2d\fitsio graf2d\gpad graf2d\gpadv7 graf2d\graf graf2d\postscript graf2d\primitivesv7 graf2d\win32gdk gr
af3d\g3d graf3d\gl gui\fitpanel gui\fitpanelv7 gui\gui hist\hist hist\histdrawv7 hist\histpainter hist\histv7 hist\spectrum hist\spectrumpainter hist\unfold io\io math\genetic math\genvector math\mathcore math\m
athmore math\matrix math\minuit math\minuit2 math\physics math\smatrix math\vecops net\net roofit\RDataFrameHelpers roofit\histfactory roofit\hs3 roofit\jsoninterface roofit\roofit roofit\roofitcore roofit\roofi
tmore roofit\roostats tmva\pymva tmva\sofie tmva\tmva tmva\tmvagui tree\dataframe tree\ntuple tree\ntupleutil tree\tree tree\treeplayer tree\treeviewer tree\webviewer
missing serialization code for annotation token
UNREACHABLE executed at C:\root-dev\git\dev.llvm18\interpreter\llvm-project\clang\lib\Serialization\ASTWriter.cpp:4514!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: .\\bin\\rootcling -rootbuild -generate-pch -f allDict.cxx -noDictSelection -D__CLING__ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DROOT_PCH -I.\\include -I.\\etc -I.\\etc\\dictpch -
I.\\etc\\cling -IC:\\Python311\\Lib\\site-packages\\numpy\\core\\include -IC:\\Python311\\include -IC:\\libs\\x64\\GSL\\2.7\\include -IC:\\libs\\x64\\libxml2\\2.7.8\\include -IC:\\libs\\x64\\sqlite3\\3.45.2 -IC:
/root-dev/git/dev.llvm18/graf2d/win32gdk/gdk/src etc\\dictpch\\allHeaders.h -IC:/root-dev/git/dev.llvm18/graf2d/win32gdk/gdk/src -IC:/root-dev/git/dev.llvm18/graf2d/win32gdk/gdk/src/gdk -IC:/root-dev/git/dev.llv
m18/graf2d/win32gdk/gdk/src/glib -IC:/root-dev/build/x64/dev.llvm18/include -IC:/root-dev/git/dev.llvm18/core etc\\dictpch\\allLinkDefs.h
Exception Code: 0x80000003
#0 0x00007ffc2c2306eb HandleAbort C:\root-dev\git\dev.llvm18\interpreter\llvm-project\llvm\lib\Support\Windows\Signals.inc:424:0
#1 0x00007ffcabe91881 (C:\windows\System32\ucrtbase.dll+0x71881)
#2 0x00007ffcabe92851 (C:\windows\System32\ucrtbase.dll+0x72851)
#3 0x00007ffc2c1dad4c llvm::llvm_unreachable_internal(char const *, char const *, unsigned int) C:\root-dev\git\dev.llvm18\interpreter\llvm-project\llvm\lib\Support\ErrorHandling.cpp:212:0
#4 0x00007ffc25258963 clang::ASTWriter::AddToken(class clang::Token const &, class llvm::SmallVectorImpl<unsigned __int64> &) C:\root-dev\git\dev.llvm18\interpreter\llvm-project\clang\lib\Serialization\ASTWrite
r.cpp:4514:0
#5 0x00007ffc2525399f clang::ASTWriter::WriteLateParsedTemplates(class clang::Sema &) C:\root-dev\git\dev.llvm18\interpreter\llvm-project\clang\lib\Serialization\ASTWriter.cpp:4340:0
#6 0x00007ffc252568d1 clang::ASTWriter::WriteASTCore(class clang::Sema &, class llvm::StringRef, class clang::Module *) C:\root-dev\git\dev.llvm18\interpreter\llvm-project\clang\lib\Serialization\ASTWriter.cpp:
5117:0
#7 0x00007ffc2525852a clang::ASTWriter::WriteAST(class clang::Sema &, class llvm::StringRef, class clang::Module *, class llvm::StringRef, bool) C:\root-dev\git\dev.llvm18\interpreter\llvm-project\clang\lib\Ser
ialization\ASTWriter.cpp:4649:0
#8 0x00007ffc237996f8 WriteAST C:\root-dev\git\dev.llvm18\core\dictgen\src\rootcling_impl.cxx:2021:0
#9 0x00007ffc23799959 GenerateAllDict C:\root-dev\git\dev.llvm18\core\dictgen\src\rootcling_impl.cxx:2042:0
#10 0x00007ffc237ac399 RootClingMain(int, char **, bool) C:\root-dev\git\dev.llvm18\core\dictgen\src\rootcling_impl.cxx:5010:0
#11 0x00007ffc2378c455 ROOT_rootcling_Driver C:\root-dev\git\dev.llvm18\core\dictgen\src\rootcling_impl.cxx:6238:0
#12 0x00007ff68e2f2605 main C:\root-dev\git\dev.llvm18\main\src\rootcling.cxx:44:0
#13 0x00007ff68e2f2924 invoke_main D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78:0
#14 0x00007ff68e2f2924 __scrt_common_main_seh D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288:0
#15 0x00007ffcacad7374 (C:\windows\System32\KERNEL32.DLL+0x17374)
#16 0x00007ffcae65cc91 (C:\windows\SYSTEM32\ntdll.dll+0x4cc91)
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'C:\root-dev\build\x64\dev.llvm18\CMakeFiles\6485b15e5a52a9a93f
294ac9c6ea6f8f\allDict.cxx.pch.rule;C:\root-dev\build\x64\dev.llvm18\CMakeFiles\c2921ee0b70b9f5a32ad0eb8246e0cd2\onepcm.rule;C:\root-dev\git\dev.llvm18\CMakeLists.txt' exited with code -1. [C:\root-dev\build\x64\d
ev.llvm18\onepcm.vcxproj]
FWIW the current state compiles fine on RISC-V and is at least able to run df103_NanoAODHiggsAnalysis.py :wink:
@smuzaffar, @devajithvs and @hahnjo have everything working reasonably with the llvm18 upgrade. Can you check this PR against cmssw?
@smuzaffar, @devajithvs and @hahnjo have everything working reasonably with the llvm18 upgrade. Can you check this PR against cmssw?
@iarspider, could you give us a hand?
@smuzaffar, @devajithvs and @hahnjo have everything working reasonably with the llvm18 upgrade. Can you check this PR against cmssw?
@iarspider, could you give us a hand?
I allow myself to add @aandvalenzuela to perhaps get some help.
ROOT failed to build for aarch64, the build error is
Processing hsimple.C...
cling JIT session error: Failed to materialize symbols: { (<Process Symbols>, { DW.ref.__gxx_personality_v0 }) }
ninja: build stopped: subcommand failed.
error: Bad exit status from /data/cmsbld/jenkins_a/workspace/ib-run-pr-tests/testBuildDir/tmp/rpm-tmp.3N7prC (%build)
See https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-b2e919/41190/externals/root/6.33.01-1689b1f60f821828a7e2948d6cf5f908/log for detail root build log
For x86_64, this change passed all cmssw CI tests
For x86_64, this change passed all cmssw CI tests
Does both have the same version of gcc? Does one have libgcc_s.so and the other libgcc.a? And which one?
@vgvassilev , gcc version is same (note that we use our own gcc and not from system). Both archs has libgcc_s.so in its lib64 path and libgcc.a in lib/gcc/<arch>-redhat-linux-gnu/12.3.1/ directory [b]
[a]
- x86_64
Singularity> gcc --version
gcc (GCC) 12.3.1 20230527
- aarch64
Singularity> gcc --version
gcc (GCC) 12.3.1 20230527
[b]
/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02853/el8_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/lib/gcc/x86_64-redhat-linux-gnu/12.3.1/libgcc.a
/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02853/el8_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/lib/gcc/x86_64-redhat-linux-gnu/12.3.1/libgcc_eh.a
/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02853/el8_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/lib64/libgcc_s.so
/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02853/el8_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/lib64/libgcc_s.so.1
/cvmfs/cms-ib.cern.ch/sw/aarch64/nweek-02853/el8_aarch64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/lib/gcc/aarch64-redhat-linux-gnu/12.3.1/libgcc.a
/cvmfs/cms-ib.cern.ch/sw/aarch64/nweek-02853/el8_aarch64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/lib/gcc/aarch64-redhat-linux-gnu/12.3.1/libgcc_eh.a
/cvmfs/cms-ib.cern.ch/sw/aarch64/nweek-02853/el8_aarch64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/lib64/libgcc_s.so
/cvmfs/cms-ib.cern.ch/sw/aarch64/nweek-02853/el8_aarch64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/lib64/libgcc_s.so.1
@smuzaffar, can you rerun testing of this PR?
@vgvassilev , @aandvalenzuela has already started the tests for aarch64 and looks like latest change has fixed the root build (tests are now building cmssw)
FYI, CMSSW tests for both x86_64 and aarch64 passed now
Thanks a lot @smuzaffar for the support you and the core team provided to this endeavor.