[cling] Enable JITLink for AArch64 and x86_64 on Linux
This Pull request:
Changes or fixes:
Checklist:
- [ ] tested changes locally
- [ ] updated the docs (if necessary)
This PR fixes #14209
Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default
How to customize builds
That’s a good direction. Let’s wait for the dust to settle after the upgrade for a few weeks before landing this. There were several significant changes between llvm16 and llvm17 in order for jitlink to become default. Can you check the llvm git history?
That’s a good direction. Let’s wait for the dust to settle after the upgrade for a few weeks before landing this.
Yes, we discussed to not merge before early next year.
There were several significant changes between llvm16 and llvm17 in order for jitlink to become default. Can you check the llvm git history?
I put a bit more documentation in https://github.com/root-project/root/issues/14209; the switch to default happened very early in the LLVM 17 cycle (February and April, after branching in January). I was hoping there are only very few fixes around that time, if at all...
Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default
How to customize builds
Build failed on ROOT-ubuntu2004/python3. Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Failing tests:
- projectroot.core.meta.test.gtest_core_meta_test_testHashRecursiveRemove
- projectroot.hist.histdrawv7.test.gtest_hist_histdrawv7_test_ioUnit
- projectroot.roofit.RDataFrameHelpers.test.gtest_roofit_RDataFrameHelpers_test_testActionHelpers
- projectroot.roottest.root.dataframe.roottest_root_dataframe_test_inference
- projectroot.roottest.root.dataframe.roottest_root_dataframe_misc
- projectroot.roottest.root.dataframe.roottest_root_dataframe_testIMT
- projectroot.tmva.pymva.test.gtest_tmva_pymva_test_TestRModelParserPyTorch
- projectroot.tmva.pymva.test.gtest_tmva_pymva_test_TestRModelParserKeras
- projectroot.tmva.tmva.test.gtest_tmva_tmva_test_rtensor_utils
- projectroot.tmva.tmva.test.gtest_tmva_tmva_test_rreader
And 24 more
Build failed on ROOT-performance-centos8-multicore/soversion. Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build See console output.
Failing tests:
- projectroot.runtutorials.tutorial_dataframe_df032_RDFFromNumpy_py
- projectroot.runtutorials.tutorial_math_exampleFunction_py
- projectroot.runtutorials.tutorial_fit_combinedFit_py
- projectroot.runtutorials.tutorial_roofit_rf409_NumPyPandasToRooFit_py
- projectroot.runtutorials.tutorial_dataframe_df026_AsNumpyArrays_py
- projectroot.bindings.pyroot.pythonizations.test.pyunittests_pyroot_pyz_array_interface
- projectroot.bindings.pyroot.pythonizations.test.pyunittests_pyroot_roofit_roodatahist_numpy
- projectroot.bindings.pyroot.pythonizations.test.pyunittests_pyroot_roofit_roodataset_numpy
- projectroot.bindings.pyroot.pythonizations.test.pyunittests_pyroot_pyz_rdataframe_makenumpy
- projectroot.bindings.pyroot.pythonizations.test.pyunittests_pyroot_pyz_rdataframe_asnumpy
And 32 more
Test Results
22 files 22 suites 3d 19h 1m 33s ⏱️ 3 704 tests 3 703 ✅ 0 💤 1 ❌ 79 537 runs 79 536 ✅ 0 💤 1 ❌
For more details on these failures, see this check.
Results for commit d3119967.
:recycle: This comment has been updated with latest results.
Hi @lhames, following the deprecation procedure for RuntimeDyld we are hitting a few test failures. Some of them have things like cling JIT session error: In graph cling-module-315-jitted-objectbuffer, section .eh_frame: relocation target "DW.ref.__gxx_personality_v0" at address 0x7f8d0b32f040 is out of range of Delta32 fixup at 0x7f8c6c00d7c3 (<anonymous block> @ 0x7f8c6c00d7b0 + 0x13). You can find more here: https://github.com/root-project/root/runs/28400824352
I am not sure what's our way forward here.
I now understand what is going wrong: @Axel-Naumann pushed me into the right direction by noticing that the errors concern vtables and typeinfo symbols, which are subject to reemission on our side. Then our WeakTypeinfoVTablePass will mark them as weak to make sure the JIT infrastructure deduplicates the symbols as needed. Additionally, ReuseExistingWeakSymbols will entirely remove the definitions if the symbol can be found in the process, for example for compiled classes. Now the problem is that the symbols were originally marked as "local to the shared library" and relocations can take advantage of this. This is where PreventLocalOptPass comes in, but it ran before the two passes mentioned before and therefore doesn't consider these symbols.
So tldr, we can fix the problems by reordering the passes. Let's slot this change in after the upgrade to LLVM 18, which is also where upstream changed to the default to JITLink.
Well done. Isn’t that already enabled by default in llvm too?
Yes, already since a while. We couldn't / didn't want to switch because it would have lost CLING_DEBUG and CLING_PROFILE, which is now available with JITLink after https://github.com/root-project/root/pull/20193