-
Notifications
You must be signed in to change notification settings - Fork 575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding ROOT_jll #9300
Adding ROOT_jll #9300
Conversation
Cling needs to ask the system compiler about the include paths to libstdc++. Do you have a c++ compiler installed? |
We have both a compiler for the host platform and a cross-compiler for the target one, which one should we use for this? |
I believe the one you compile with. It should be the same as the one you will have on the platform you deploy. |
@giordano what @vgvassilev is referring is to have the used compiler on the [user] system where you install the ROOT_jll package. This is not going to be easy, unless the compiler itself is a _jll package. If there was a way to set the include path to the libstdc++ then we would not need to have the compiler installed, isn't it? |
I suspect that if we are able to point cling to the right compiler, rootcling will just work. Note that ROOT has been developed for many years without cross-compilation in mind and even if it builds it is not necessarily to run. You can see all of the |
We do have Clang compilers packaged up in JLLs ( |
Hello, I had a look at the new version of the recipe. For reminder, the recipe was already working for The error about conflicting While building works, we have now a similar error when executing ROOT. The execution is done outside the Alpine container, and we have therefore only the glibc headers available. Note that I've solved the error about the compiler not found by creating a link with the expected name, and the In addition, I get the error For reminder, in absence of --sysroot option for rootcling, we use the environment variable CPLUS_INCLUDE_PATH to for the PATH list that the compiler returns, when executed by rootcling without this option. Nevertheless, it seems not enough. There is some reminiscence of the include path of the host rootcling or root was compiled. @vgvassilev do you have an idea, where it comes from. Philippe. |
This very likely means for some reason Cling cannot finds its runtime. There is |
The gCling symbol is in the |
I can confirm, that |
Cross-compiling related issues with root-cling fixed for linux with glibc. MacOS not yet supported.
262560e
to
98d5191
Compare
@giordano, this PR should finally be ready to be merged. It includes binaries for Linux x86_64 only, compilation for x86_84/glibc target on x86_64/musl has already been challenging. Support for MacOS will need some extra work. Philippe. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need this? We can disable it in a different way than patching the compiler, but it'd be good to understand why it's needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix a bug of libstdc++ that prevents compilation of the code. The bug is fixed with gcc 9.3.0, while GCCBootstrap@9 is at version 9.1.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm missing how using -march=something
(what something?) is related to the bug you linked. There's no reference about -march
flags in that report.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't look at the correct patch. I need to run the script to see when in the build process it is needed. I'll let you know once done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's needed here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does that work? Does that produce a binary that can only be run on avx512 machines? That's a no for us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
different versions of libraries are compiled, and the library with the supported intrinsics is loaded at runtime. See: https://github.com/root-project/root/blob/3280847501bfb354a3a9ff1e023c8fd3b74548f4/roofit/batchcompute/src/Initialisation.cxx#L44
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, then you can just add lock_microarchitecture=false
as keyword argument to build_tarballs(...)
instead of patching this file.
Co-authored-by: Mosè Giordano <[email protected]>
…script skip-checks: true
…ompat flag to previous version Compilation error was: ``` from /opt/x86_64-linux-gnu/x86_64-linux-gnu/include/c++/9.1.0/stdexcept:39, from /opt/x86_64-linux-gnu/x86_64-linux-gnu/include/c++/9.1.0/array:39, from /opt/x86_64-linux-gnu/x86_64-linux-gnu/include/c++/9.1.0/tuple:39, from /opt/x86_64-linux-gnu/x86_64-linux-gnu/include/c++/9.1.0/functional:54, from /workspace/srcdir/root/core/foundation/inc/TError.h:37, from /workspace/srcdir/root/core/cont/inc/ROOT/TSeq.hxx:15, from /workspace/srcdir/root/core/base/inc/ROOT/TExecutorCRTP.hxx:15, from /workspace/srcdir/root/core/imt/inc/ROOT/TThreadExecutor.hxx:25, from /workspace/srcdir/root/core/imt/src/TThreadExecutor.cxx:4: /opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/usr/include/bits/waitstatus.h:66:7: note: candidate: ‘wait::wait()’ 66 | union wait | ^~~~ /opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/usr/include/bits/waitstatus.h:66:7: note: candidate expects 0 arguments, 2 provided /opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/usr/include/bits/waitstatus.h:66:7: note: candidate: ‘constexpr wait::wait(const wait&)’ /opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/usr/include/bits/waitstatus.h:66:7: note: candidate expects 1 argument, 2 provided /opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/usr/include/bits/waitstatus.h:66:7: note: candidate: ‘constexpr wait::wait(wait&&)’ /opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/usr/include/bits/waitstatus.h:66:7: note: candidate expects 1 argument, 2 provided ```
|
||
# N llvm links. LLVM link command needs 15GB | ||
njobs=$((2*`nproc`)) | ||
LLVM_PARALLEL_LINK_JOBS=`grep MemTot /proc/meminfo | awk '{a=int($2/15100000); if(a>'"$njobs"') a='"$njobs"'; if(a<1) a=1; print a;}'` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like you need to do all of this because you were using setting njobs
incorrectly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This follows the recommendations from https://llvm.org/docs/CMake.html#frequently-used-llvm-related-variables, section LLVM_PARALLEL_{COMPILE,LINK}_JOBS. Machines have often less than 15GB RAM per core, so it it is also needed without the factor 2.
Beware $nproc ignores the cpu affinity mask (used by slurm batch system to share cpus of a node). Co-authored-by: Mosè Giordano <[email protected]>
Adding util_linux_jll did not solve missing uuid_gen symbol error. Remove it and switch off Davix build.
ok. It is shared with other _jll's ? |
There's a single shared cache for all the runners. Ccachs has its own mechanism to disable the cache on demand, set environment variable CCACHE_DISABLE=1: https://ccache.dev/manual/4.8.2.html#_disabling_ccache Line 55 in efbda0b
Or you can also set USE_CCACHE=false (this is BinaryBuilder specific), but trashing weeks worth of cache would be a disaster. |
It is fortunate, that I announced my plans before proceeding ;). |
But I don't understand what's the supposed problem with ccache: as I showed above the machine was not doing anything while the build process was stuck. Sounds like a build system issue to me. |
The only difference I could find between build on my institute's facilities and on buildkite is that I was not using ccache. It's why I wanted to try. Anway, |
We enable ccache automatically by default in BinaryBuilder, you'd have to opt out not to use it. |
OK. I had understood from the doc [1] that BINARYBUILDER_USE_CCACHE environment variable needed to be set. I've found where it is stuck by disabling ninja jobs parallelization. Remains to understand why I cannot reproduce the issue when running the build myself. Another difference between buildkite and my environment can be the BinaryBuilder version. I've been using v0.6.3. [1] https://docs.binarybuilder.org/stable/environment_variables/ |
71580c8
to
56ffe4e
Compare
@giordano, CI issue disappeared after removing the nlohman_jll dependency. It's not clear to me why including nlohman_jll introduce a deadlock, neither why I cannot reproduce the by running the build on my own. Anyway, we can live without the dependency, as ROOT fallbacks in this case by using built-in version. After reading the LAPACK/BLAS section of BinaryBuider documentation, I've fixed the BLAS dependency. The PR should now be hopefully ready to be merged. |
Thanks @giordano for the merge. |
This is a new attempt to cross-compile ROOT in order to produce ROOT_jll. It starts from #7666
The current status is:
root
executable once deployed 😄. To reproduce:What I get is:
rootcling
because I think the generated code is not compilable by clang.The errors are of this form: