Llvm conflict fix#8717
Conversation
|
Can one of the admins verify this patch? |
|
@phsft-bot build! |
|
Starting build on |
|
Build failed on ROOT-debian10-i386/cxx14. Failing tests: |
@vgvassilev , I don't have this test in my checkout: Do you have an idea why? I ran cmake with the following options as described in [1]:
Do I need more options? A Philippe. |
|
@grasph, that is a regular failure and it is not caused by your PR. |
|
@hahnjo, this patch is useful for cppyy and it sounds like -Bsymbolic covers more than VISIBILITY_INLINES_HIDDEN while also reducing the PLTs. In particular (ROOT master): $ nm -CD libCling.so | grep llvm | grep ' [Ww] ' | wc -l |
Interesting. From my understanding of g++ document, this flag with accidentally solves the problem if the compiler optimize the code by in-lining it but it is not guarranted. In addition it can create confusing situations where the problem disappears as soon as you try to debug it using the debugged version of the code. That said, we are in a confusing situation, as I'm not able to reproduce the problem as soon as I recompile ROOT. Nevertheless, I recompiled many time ROOT last week, and then the problem was systematic. It could be that it is due to the ROOT code version I used. The problem is there for LCG100 which used ROOT 6.24/00, but not for Philippe. |
|
How is it accidental? It was totally on purpose, solving other occurrences of this exact same issue. I suppose, because i have not seen any issue / error message / backtrace, so all I can do is guess and assume :-) Can you please provide some details on the issue you try to fix? Can you please rebase this branch onto master? We do not allow merge commits (unless fast forward). |
|
Iiuc https://maskray.me/blog/2021-05-16-elf-interposition-and-bsymbolic argues that -Bsymbolic should be fine for libCling and is superior to no symbolic interposition |
|
Build failed on windows10/cxx14. |
Thanks, Axel, for the link to this interesting article. By "accidental", I meant that, if we assume the gcc manpage description of the flag correct and complete (*), then we rely on a side-effect of compiler optimizations. The article you quoted mention another optimization that should make it work for all calls to functions defined in the same compilation unit (**), while I wrote it will be limited to inline functions. The -Bsymbolic, which is an option of the linker, instead of compiler, addresses directly what we target. The ld manpage description reads as "When creating a shared library, bind references to global symbols to the definition within the shared library, if any. " Philippe. (*) "with -fno-semantic-interposition the compiler assumes that if interposition happens for functions the overwriting function will have precisely the same semantics (and side effects). " (**) Although the statement on LD_PRELOAD confuses me. |
|
@bellenot I'm not sure why the PR is blocked. Is it an issue with deepcode-ci-bot or is github that did not get that I made the changed @Axel-Naumann requested? I'm leaving for holidays on Wednesday. It would be good to close the PR by then. |
|
@phsft-bot build! |
|
Starting build on |
|
Build failed on ROOT-debian10-i386/cxx14. Errors:
|
|
Build failed on ROOT-ubuntu16/nortcxxmod. Errors:
|
|
Build failed on mac11.0/cxx17. Errors:
|
|
Build failed on ROOT-performance-centos8-multicore/default. Errors:
|
|
Build failed on windows10/cxx14. Errors:
|
|
Starting build on |
|
Build failed on ROOT-debian10-i386/cxx14. Failing tests: |
|
Build failed on mac11.0/cxx17. Failing tests:
|
|
FYI: You might want to check |
Axel-Naumann
left a comment
There was a problem hiding this comment.
LGTM - just a tiny comment and we should be good to merge
|
@weliveindetail thanks for the info, we will revisit this once |
…s resolved internally This is expected to solve conflicts when interfacing with other software using LLVM, like Julia. See JuliaHEP/ROOT.jl#17 (comment)
…akeLists.txt file
…s resolved internally This is expected to solve conflicts when interfacing with other software using LLVM, like Julia. See JuliaHEP/ROOT.jl#17 (comment)
…akeLists.txt file
Co-authored-by: Axel Naumann <Axel.Naumann@cern.ch>
50483c3 to
2ee441c
Compare
|
Thanks a lot for this @grasph ! |
|
@phsft-bot build |
|
Starting build on |
|
macOS 12 messes up some system lib's internal (?) llvm symbols with those of cling: |
|
Build failed on mac1014/python3. Failing tests: |
|
Build failed on mac11.0/cxx17. Failing tests: |
|
Failures are unrelated. Thanks for the contribution! |
|
Which future ROOT release will this (likely) be included in? |
Hello @oschulz , I let Axel answer to your release question. I expect you are interested by the interfacing with Julia. This is already working starting from version 6.24/02 (explained in a previous comment of the PR discussion). This pull request is only consolidating a code correction which was included in the release between 6.24/00 and 6.24/02). Philippe. |
Yes - thanks @grasph ! |
@vgvassilev, here is the PR so solve the LLVM library conflicts when interfacing ROOT with Julia. I've limited the change to the interpreter package.
I have 25 out of the 2140 tests that fail. It's likely to be due to my local environment. If it can easily be tested with the jenkins system, it will be faster that me trying to investigate the test failures.
Note. The parallel compilation is not working properly, independently of my changes: it fails many times and need to be restarted or build some package in single process mode. Is it a know problem ?
This Pull request:
Changes or fixes:
Adds -Bsymbolic linker option for libCling.so in order get the symbols resolved internally
Checklist: