Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-9147

rootcling crashes when compiling ROOT with C++17 and GCC 7.2.0

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 6.12/00, 6.14/00
    • Fix Version/s: 6.12/06, 6.14/00
    • Component/s: Cling
    • Labels:
      None
    • Environment:

      Linux

      Description

      When compiling with C++17 enabled, rootcling crashes because the type CXXDeductionGuide is not supported in the function

      clang::QualType ROOT::TMetaUtils::ReSubstTemplateArg(clang::QualType input, const clang::Type *instance)

      in line 4453 of fileĀ core/clingutils/src/TClingUtils.cxx.

      Reference: http://en.cppreference.com/w/cpp/language/class_template_argument_deduction

      Stack trace generated:

      [213/1224] Generating G__Html.cxx, ../lib/libHtml_rdict.pcm, ../lib/libHtml.rootmap
      FAILED: html/G__Html.cxx lib/libHtml_rdict.pcm lib/libHtml.rootmap 
      cd /home/amadio/build/cxx17-gcc7/html && /usr/bin/cmake -E env LD_LIBRARY_PATH=/home/amadio/build/cxx17-gcc7/lib: ROOTIGNOREPREFIX=1 /home/amadio/build/cxx17-gcc7/bin/rootcling -rootbuild -v2 -f G__Html.cxx -s /home/amadio/build/cxx17-gcc7/lib/libHtml.so -m libGraf_rdict.pcm -m libThread_rdict.pcm -excludePath /home/amadio/src/root -excludePath /home/amadio/build/cxx17-gcc7 -rml libHtml.so -rmf /home/amadio/build/cxx17-gcc7/lib/libHtml.rootmap -I/home/amadio/src/root -I/home/amadio/src/root/interpreter/cling/include -I/home/amadio/build/cxx17-gcc7/include -I/usr/include/freetype2 TClassDocOutput.h TDocDirective.h TDocInfo.h TDocOutput.h TDocParser.h THtml.h /home/amadio/src/root/html/inc/LinkDef.h
      CXXDeductionGuide
       
      *** Break *** segmentation violation
       
       
       
      ===========================================================
      There was a crash.
      This is the entire stack trace of all threads:
      ===========================================================
      #0 0x00007f4fbcf6bcbe in __GI___waitpid (pid=30686, stat_loc=stat_loc
      entry=0x7ffebbbc51e8, options=options
      entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
      #1 0x00007f4fbcee238f in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:148
      #2 0x00007f4fbdeeac47 in TUnixSystem::Exec (shellcmd=<optimized out>, this=0xf337c0) at /home/amadio/src/root/core/unix/src/TUnixSystem.cxx:2118
      #3 TUnixSystem::StackTrace (this=0xf337c0) at /home/amadio/src/root/core/unix/src/TUnixSystem.cxx:2412
      #4 0x00007f4fbdeed44c in TUnixSystem::DispatchSignals (this=0xf337c0, sig=kSigSegmentationViolation) at /home/amadio/src/root/core/unix/src/TUnixSystem.cxx:3643
      #5 <signal handler called>
      #6 0x00007f4fbf4a2ccc in llvm::dyn_cast<clang::ClassTemplateDecl, clang::DeclContext const> (Val=0x12ac1d0) at /home/amadio/src/root/interpreter/llvm/src/include/llvm/Support/Casting.h:334
      #7 ROOT::TMetaUtils::ReSubstTemplateArg (input=..., instance=0x7f4fbb325d90) at /home/amadio/src/root/core/clingutils/src/TClingUtils.cxx:4636
      #8 0x00007f4fbf544509 in TCling::InspectMembers (this=0xf95060, insp=..., obj=0x0, cl=0x167d6d0, isTransient=true) at /home/amadio/src/root/core/metacling/src/TCling.cxx:2428
      #9 0x00007f4fbde8fa99 in TClass::CallShowMembers (this=0x167d6d0, obj=0x0, insp=..., isTransient=<optimized out>) at /home/amadio/src/root/core/meta/src/TClass.cxx:2136
      #10 0x00007f4fbde9dbfd in TClass::BuildRealData (this=this
      entry=0x167d6d0, pointer=pointer
      entry=0x0, isTransient=isTransient
      entry=true) at /home/amadio/src/root/core/meta/src/TClass.cxx:1991
      #11 0x00007f4fbde9f8f4 in TBuildRealData::Inspect (this=this
      entry=0x7ffebbbc8230, cl=cl
      entry=0x2b99a60, pname=<optimized out>, mname=mname
      entry=0x7ffebbbc8120 "fMethodCounts", add=add
      entry=0x138, isTransient=isTransient
      entry=true) at /home/amadio/src/root/core/meta/src/TClass.cxx:834
      #12 0x00007f4fbf544de2 in TCling::InspectMembers (this=0xf95060, insp=..., obj=0x0, cl=0x2b99a60, isTransient=true) at /home/amadio/src/root/core/metacling/src/TCling.cxx:2553
      #13 0x00007f4fbde8fa99 in TClass::CallShowMembers (this=0x2b99a60, obj=0x0, insp=..., isTransient=<optimized out>) at /home/amadio/src/root/core/meta/src/TClass.cxx:2136
      #14 0x00007f4fbde9dbfd in TClass::BuildRealData (this=this
      entry=0x2b99a60, pointer=pointer
      entry=0x0, isTransient=isTransient
      entry=true) at /home/amadio/src/root/core/meta/src/TClass.cxx:1991
      #15 0x00007f4fbdec001f in TProtoClass::TProtoClass (this=0x383dea0, cl=0x2b99a60) at /home/amadio/src/root/core/meta/src/TProtoClass.cxx:67
      #16 0x00007f4fc23e5d2d in CloseStreamerInfoROOTFile (writeEmptyRootPCM=<optimized out>) at include/TObject.h:152
      #17 0x00007f4fbf508e98 in FinalizeStreamerInfoWriting (interp=..., writeEmptyRootPCM=<optimized out>) at /home/amadio/src/root/core/dictgen/src/rootcling_impl.cxx:3021
      #18 0x00007f4fbf51b23b in GenerateFullDict (dictStream=..., interp=..., scan=..., ctorTypes=std::__cxx11::list = {...}, isSplit=isSplit
      entry=false, isGenreflex=isGenreflex
      entry=false, writeEmptyRootPCM=<optimized out>) at /home/amadio/src/root/core/dictgen/src/rootcling_impl.cxx:3152
      #19 0x00007f4fbf525554 in RootClingMain (argc=<optimized out>, argc
      entry=30, argv=argv
      entry=0x7ffebbbca1a8, isDeep=isDeep
      entry=false, isGenreflex=isGenreflex
      entry=false) at /home/amadio/src/root/core/dictgen/src/rootcling_impl.cxx:4897
      #20 0x00007f4fbf52a7d8 in ROOT_rootcling_Driver (argc=30, argv=0x7ffebbbca1a8, config=...) at /home/amadio/src/root/core/dictgen/src/rootcling_impl.cxx:6107
      #21 0x0000000000400b38 in main (argc=<optimized out>, argv=<optimized out>) at /home/amadio/src/root/main/src/rootcling.cxx:44
      ===========================================================

        Attachments

          Activity

            People

            Assignee:
            pcanal Philippe Canal
            Reporter:
            amadio Guilherme Amadio
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Actual End: