-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Upgrade llvm90 #6385
Upgrade llvm90 #6385
Conversation
Starting build on |
Build failed on windows10/cxx14. |
Build failed on ROOT-fedora31/noimt. Errors:
|
Build failed on ROOT-fedora30/cxx14. Errors:
|
Build failed on ROOT-performance-centos7-multicore/default. Errors:
|
Build failed on mac1015/cxx17. Errors:
|
Build failed on mac1014/python3. Errors:
|
Build failed on ROOT-ubuntu16/nortcxxmod. Errors:
|
@oshadura / @Axel-Naumann, do we need to pass -Dbuiltin_cling=On to rootspi, although it is already ON by default? |
Build failed on ROOT-debian10-i386/cxx14. Errors:
|
Done. |
@phsft-bot build! |
Starting build on |
Build failed on ROOT-fedora31/noimt. Errors:
Warnings:
|
Build failed on ROOT-fedora30/cxx14. Errors:
And 7 more |
Build failed on ROOT-ubuntu16/nortcxxmod. Errors:
|
Build failed on mac1014/python3. Errors:
|
Build failed on ROOT-debian10-i386/cxx14. Errors:
|
Build failed on mac1015/cxx17. Errors:
|
Build failed on ROOT-performance-centos7-multicore/default. Errors:
And 8 more Warnings:
|
Build failed on windows10/cxx14. Errors:
And 7 more |
@phsft-bot build just on ROOT-performance-centos7-multicore/default |
Starting build on |
Build failed on ROOT-performance-centos7-multicore/default. Errors:
And 8 more Warnings:
|
0909e74
to
eacbac0
Compare
With llvm9, the external AST source will only be asked to provide the definition of an explicit specialization if the forward declaration of the explicit specialization is flagged as hasExternalLexicalStorage(). In roottest/root/meta/runtemplateAutoload*, the external AST source is the autoloading; the fwd decl comes from the rootmap file: the specialization "resides" in a library that needs to be loaded, instead of instantiating the template from the default definition. Walk the declarations parsed by the rootmap reader, and flag all explicit specializations as "has more info". For that to work, explicit specializations must show up in the declarations section of the rootmap files.
This fixes ROOT-10504. the script: ``` namespace boost { namespace mpl { // Commenting the next line make the assert failure go away struct TTUBE {}; }} ``` reproduce the problem with 'just' ROOT. The trigger is the auto-loading of a library that has a dictionary with has forward decl string .. which all starts with: ``` static const char* fwdDeclCode = R"DICTFWDDCLS( extern int __Cling_Autoloading_Map; .... ``` The order of parsing is (with many ellipsis): ``` "<<< cling interactive line includer >>>" : line 9 : #include “standalone.C” standalone.C : line 1 : #pragma GCC diagnostic push standalone.C : line 2 : #pragma GCC diagnostic ignored "-Wuninitialized" // Inserted in Diag map standalone.C : line 3 : #pragma GCC diagnostic ignored "-Wsign-conversion" // Inserted in Diag map standalone.C : line 8 : struct TTUBE {} ; // triggers auto-loading and thus recursive parsing. "<<< cling interactive line includer >>>" : line 10 : parse dict fwd declare string input_line_9 : line 2 : #pragma clang diagnostic ignored "-Wkeyword-compat" // Inserted in Diag map input_line_9 : line 3 : #pragma clang diagnostic ignored "-Wignored-attributes" // Inserted in Diag map input_line_9 : line 4 : #pragma clang diagnostic ignored "-Wreturn-type-c-linkage" // Inserted in Diag map end of file standalone.C : line 12 : #pragma GCC diagnostic pop // Inserted in Diag map ``` The last line triggers the assert because when recording the state change, it records it as being from ``` standalone.C : line 12 "<<< cling interactive line includer >>>" : line 9 ``` but when recording the last one, it notices that the last state change that happened, indirectly, for the file '<<< cling interactive line includer >>>' happened at line 10 (because of the pragma in input_line_9 which is 'recorded' as being included by line 10), which makes that the state change for ```standalone.C:12``` happens 'ealier' than the last state change as far as the pseudo-file "<<< cling interactive line includer >>>" is concerned. For that pseudo-file, the last state change happened line 10 but the state change bbeing processed happens line 9 (where Standalone.C is being included).
…ned declarations (root-project#6571)" The patch applies a patch to remove duplicated entries from the StoredDeclsList. Apparently, reading a yet-to-be-determined PCM file adds the same `Decl *` to the lookup table. Trying to remove it using `StoredDeclsList::remove()` makes an internal assertion to fail, as it expects the Decl to disappear from the lookup table after being removed. So far, `darwin.pcm` seems like one of the possible causes of this problem, but more investigation is needed.
For some reason llvm/cmake handles cling differently and we should suppress its installation in ROOTSYS.
This should fix a problem where the ClingTest unit test fails due to the fact that std::vector is copied and delivered by Vc pulling a wrong dependency.
…hanged This patch (also) aims to make runtime module installable. This part of code in Clang is comparing the location of "modulemap which is currently loaded and gives a definition of current module (say, stl) and "the location of the modulemap where the current implicit module (like stl) was built". This was problematic for CMSSW, as they should install modulemaps and prebuilt pcms to other directory. stl and libc pcms should be prebuilt, installed and used from installed directory, so this check is redundant for that usecase.
cling must be able to provide template specializations (that might be explicit specializations, residing in a library to be loaded by autoload, etc), and it must be able to do that *before* clang starts the instantiation - because otherwise an instantiation (of the same type) as triggered by LookupHelper is exiting early with instantiation failure (to prevent recursive instantiations of the same type). I.e. while SemaTemplateInstantiate's getPatternForClassTemplateSpecialization() will query external ast sources, this is too late for cling, as it's during the instantiation and cling cannot instantiate that exact type anymore after it has made the definition available. This is visible in PCH mode with Vc on: ``` cmake -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_CXX_STANDARD="11" -DCMAKE_INSTALL_PREFIX=".../nortcxxmod-llvm9-2-inst" -DLLVM_BUILD_TYPE="Debug" -DLLVM_ENABLE_ASSERTIONS="On" -Dalien="Off" -Darrow="Off" -Dasimage="On" -Dasserts="ON" -Dbuiltin_afterimage="On" -Dbuiltin_cfitsio="Off" -Dbuiltin_davix="On" -Dbuiltin_fftw3="Off" -Dbuiltin_freetype="Off" -Dbuiltin_ftgl="On" -Dbuiltin_gl2ps="On" -Dbuiltin_glew="On" -Dbuiltin_gsl="Off" -Dbuiltin_lz4="On" -Dbuiltin_lzma="On" -Dbuiltin_nlohmannjson="On" -Dbuiltin_openssl="Off" -Dbuiltin_openui5="On" -Dbuiltin_pcre="On" -Dbuiltin_tbb="On" -Dbuiltin_unuran="On" -Dbuiltin_vc="On" -Dbuiltin_vdt="On" -Dbuiltin_veccore="On" -Dbuiltin_xrootd="On" -Dbuiltin_xxhash="On" -Dbuiltin_zlib="On" -Dbuiltin_zstd="On" -Dccache="ON" -Dcefweb="Off" -Dclad="On" -Dcocoa="Off" -Dcuda="Off" -Dcudnn="Off" -Ddataframe="On" -Ddavix="On" -Ddcache="Off" -Ddev="Off" -Ddistcc="Off" -Dfail-on-missing="On" -Dfcgi="Off" -Dfftw3="Off" -Dfitsio="Off" -Dfortran="On" -Dgdml="On" -Dgfal="Off" -Dgsl_shared="Off" -Dgviz="Off" -Dhttp="On" -Dimt="On" -Dlibcxx="Off" -Dmathmore="On" -Dmemstat="Off" -Dminuit2="On" -Dmlp="On" -Dmonalisa="Off" -Dmpi="Off" -Dmysql="Off" -Dodbc="Off" -Dopengl="On" -Doracle="Off" -Dpgsql="Off" -Dpyroot="On" -Dpyroot2="Off" -Dpyroot3="On" -Dpyroot_legacy="Off" -Dpythia6="Off" -Dpythia6_nolink="Off" -Dpythia8="On" -Dqt5web="Off" -Dr="Off" -Droofit="On" -Droottest="ON" -Druntime_cxxmodules="Off" -Dshadowpw="On" -Dsoversion="On" -Dspectrum="On" -Dsqlite="On" -Dssl="On" -Dtesting="ON" -Dtmva="On" -Dtmva-cpu="On" -Dtmva-gpu="Off" -Dtmva-pymva="On" -Dtmva-rmva="Off" -Dunuran="On" -During="Off" -Dvc="On" -Dvdt="On" -Dveccore="On" -Dvecgeom="Off" -Dvmc="On" -Dwin_broken_tests="Off" -Dx11="On" -Dxml="On" -Dxproofd="Off" -Dxrootd="On" .../src -G Ninja ``` as a failure in roottest/root/meta/naming/execCheckNaming.C: ``` In file included from nortcxxmod-llvm9-3/input_line_4:2: In file included from nortcxxmod-llvm9-3/include/Rtypes.h:191: In file included from nortcxxmod-llvm9-3/include/TGenericClassInfo.h:22: In file included from /usr/include/c++/10/vector:67: /usr/include/c++/10/bits/stl_vector.h:625:7: error: definition with same mangled name '_ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_' as another definition vector(initializer_list<value_type> __l, ^ /usr/include/c++/10/bits/stl_vector.h:625:7: note: previous definition is here /usr/include/c++/10/bits/stl_vector.h:678:7: error: definition with same mangled name '_ZNSt6vectorIPKcSaIS1_EED1Ev' as another definition ~vector() _GLIBCXX_NOEXCEPT ^ /usr/include/c++/10/bits/stl_vector.h:678:7: note: previous definition is here ... ``` which is caused by LookupHelper unloading these decls but failing to unload them from CodeGen as they were generated during lookup (i.e. without CodeGen). This assumption is wrong, too, in a couple of ways: LookupHelper must emit decls created during instantiations to CodeGen, and thus onloading must also be done with CodeGen. Most importantly, though, pre-llvm9 these decls did not get unloaded, as the lookup of the template secialization was successful, as LookupHelper was able to provide it by specializing the template definition. With llvm9 and without this patch, no specialization can be provided by LookupHelper as that exact specialization is already ongoing on higher stack frames (see description of external AST source query before vs during instantiation). pre-llvm9 backtrace of this lookup: ``` diagOnOff=cling::LookupHelper::NoDiagnostics, resultType=0x7fffffff4d48, instantiateTemplate=true) at /home/axel/build/root/master/src/interpreter/cling/lib/Interpreter/LookupHelper.cpp:707 name=0x5555563cd570 "vector<const char*>", intantiateTemplate=true) at /home/axel/build/root/master/src/core/metacling/src/TClingClassInfo.cxx:88 at /home/axel/build/root/master/src/core/metacling/src/TCling.cxx:8155 at /home/axel/build/root/master/src/core/metacling/src/TCling.cxx:6103 at /home/axel/build/root/master/src/core/metacling/src/TCling.cxx:6191 at /home/axel/build/root/master/src/core/metacling/src/TCling.cxx:6414 at /home/axel/build/root/master/src/core/metacling/src/TCling.cxx:619 at /home/axel/build/root/master/src/core/metacling/src/TClingCallbacks.cxx:453 at /home/axel/build/root/master/src/interpreter/cling/lib/Interpreter/MultiplexInterpreterCallbacks.h:76 at /home/axel/build/root/master/src/interpreter/cling/lib/Interpreter/InterpreterCallbacks.cpp:285 at /home/axel/build/root/master/src/interpreter/llvm/src/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp:136 at /home/axel/build/root/master/src/interpreter/llvm/src/tools/clang/lib/Sema/SemaType.cpp:7307 at /home/axel/build/root/master/src/interpreter/llvm/src/tools/clang/lib/Sema/SemaType.cpp:7109 at /home/axel/build/root/master/src/interpreter/llvm/src/tools/clang/lib/Sema/SemaType.cpp:7398 ``` With llvm9, without this patch: ``` at /home/axel/build/root/master2/src/interpreter/cling/lib/Interpreter/DeclUnloader.h:292 diagOnOff=cling::LookupHelper::NoDiagnostics, resultType=0x7fffffff4620, instantiateTemplate=true) at /home/axel/build/root/master2/src/interpreter/cling/lib/Interpreter/LookupHelper.cpp:720 name=0x5555562fcdc0 "vector<const char*>", intantiateTemplate=true) at /home/axel/build/root/master2/src/core/metacling/src/TClingClassInfo.cxx:88 at /home/axel/build/root/master2/src/core/metacling/src/TCling.cxx:8172 at /home/axel/build/root/master2/src/core/metacling/src/TCling.cxx:6120 at /home/axel/build/root/master2/src/core/metacling/src/TCling.cxx:6208 at /home/axel/build/root/master2/src/core/metacling/src/TCling.cxx:6431 at /home/axel/build/root/master2/src/core/metacling/src/TCling.cxx:619 at /home/axel/build/root/master2/src/core/metacling/src/TClingCallbacks.cxx:453 at /home/axel/build/root/master2/src/interpreter/cling/lib/Interpreter/MultiplexInterpreterCallbacks.h:77 at /home/axel/build/root/master2/src/interpreter/cling/lib/Interpreter/InterpreterCallbacks.cpp:287 at /home/axel/build/root/master2/src/interpreter/llvm/src/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp:133 TSK=clang::TSK_ImplicitInstantiation, Complain=true) at /home/axel/build/root/master2/src/interpreter/llvm/src/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:2566 ClassTemplateSpec=0x555556543b40, TSK=clang::TSK_ImplicitInstantiation, Complain=true) at /home/axel/build/root/master2/src/interpreter/llvm/src/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:2596 at /home/axel/build/root/master2/src/interpreter/llvm/src/tools/clang/lib/Sema/SemaType.cpp:8075 at /home/axel/build/root/master2/src/interpreter/llvm/src/tools/clang/lib/Sema/SemaType.cpp:7828 at /home/axel/build/root/master2/src/interpreter/llvm/src/tools/clang/lib/Sema/SemaType.cpp:8141 ```
This fixes warning: integer constant is so large that it is unsigned in MathCore dictionary until D77598 lands.
In some scenarios, initialization of variables declared by AutoSynthesizer does not work as expected (more information on the GH issue), e.g. ``` root [2] unsigned int c (unsigned int) 0 root [3] d=c Error in <TRint::HandleTermInput()>: std::runtime_error caught: >>> Interpreter expected relocatable expression ``` This is because the generated VarDecl initializer is missing a LValueToRValue conversion, where required by the C++ standard.
complex.h causes havoc, e.g. ``` libcomplexDict.rootmap:2:13: error: declaration of anonymous class must be a definition template <> class complex<float>; ``` running roottest_root_tree_cloning_treeCloneTest, which is caused by `complex` being redefined to _Complex, which is a kind of type annotation and breaks uses of `std::complex`. This means we can now remove `#undef I` (which comes from complex.h). Use cute raw string literals and combine remaining `#undef`s into a single call to `declare()`
This reverts commit b4fcf22.
This fixes ``` math/mathcore/G__MathCore.cxx:450:57: warning: integer literal is too large to be represented in a signed integer type, interpreting as unsigned [-Wimplicitly-unsigned-literal] ::mersenne_twister_engine<ULong64_t,64,312,156,31,13043109905998158313,... ``` The code meant to test whether the highest bit is set. `isNegative` is false for unsigned values; we have to check whether the bit pattern starts with at least one leading one bit.
rootmap needs { decls } entries such as ``` template <> class less<edm::AJet>; ``` to be able to load the right library containing a given specialization. But for this to be parsable, the template arguments of that specialization must also be forward declared. Re-use existing template-arg-fwd-decl code, and hook it into FwdDeclIfTmplSpec. Fixes roottest/cling/dict/fwd-decl-stdless/lessyDict.rootmap in the PCH case, and likely CMS's issue of a similar kind - TBC.
- fix bug, which was caused by executing a transaction in the device interpreter - fixed warning from the device compiler - update test cases
In LLVM 9, the `CompoundStmt::replaceStmts()` call seems to write to an invalid memory location if the body was empty. This may happen after a parse error and might end up corrupting the program state. This patch makes `DeclExtractor` to exit early if there is nothing to do, which solves the aforementioned problem.
For inline namespaces, the ROOT namespace nested in the inline namespace and containing the dictionary decls for that inline namespace is ambiguous with the outer ROOT namespace: ``` math/matrix/G__Matrix.cxx:93:14: error: reference to ‘ROOT’ is ambiguous 93 | inline ::ROOT::TGenericClassInfo *GenerateInitInstance(); | ^~ math/matrix/G__Matrix.cxx:92:14: note: candidates are: ‘namespace TMatrixTAutoloadOps::ROOT { }’ 92 | namespace ROOT { | ^~~~ ``` Adjust `NamespaceImp` accordingly.
The llvm9 upgrade triggered a re-ordered symbol lookup, where the operators were needed before symbols from classes were needed (that in turn triggered autoloading). As namespace-scope functions cannot trigger autoloading by default, the operator symbols were missing. This is worked around by moving the operators into an inline namespace, and declaring the namespace to the dictionary and thus rootmap file. Remove useless (since cling) pragma link statements for operators.
such as __dllonexit() and _onexit(). Without, static destruction does not happen, as can be seen by roottest/cling/staticinit/execROOT-7775.C failing to call the static destructors.
See https://bugs.chromium.org/p/swiftshader/issues/detail?id=153 I.e. this is expected to be fixed in llvm11.
82f4987
to
0d4fb8a
Compare
Starting build on |
Build failed on windows10/cxx14. Failing tests:
|
No description provided.