Sourcetrail LLVM indexing errors

This is Ubuntu 20.04 LTS / x86_64 / gcc 9.3.0 here.

I have been trying to use the “Sourcetrail” source code explorer.

At startup, it generates 7 “Type: FATAL” errors when indexing the ROOT’s source code (see below).
It reports several missing “*.inc” files for several source code “Files” (and “Translation Units”, which, in some cases, are different from the reported source code “Files”).

I guess the problem is that CMake generates a “compile_commands.json” file in which it includes build commands for all these “Files” / “Translation Units”, but it then does not execute them at all (at least on Linux).

@Axel Would it be possible that you somehow prevent CMake from including these redundant “build commands” (at least on Linux)?
Or maybe you could provide dummy “*.inc” files (at least on Linux) so that the indexer feels happy.

Message: "Options.inc" file not found
File: /...src.../v6-24-00-patches/interpreter/llvm/src/lib/ToolDrivers/llvm-lib/LibDriver.cpp
Line: 38
Translation Unit: /...src.../v6-24-00-patches/interpreter/llvm/src/lib/ToolDrivers/llvm-lib/LibDriver.cpp

Message: "LipoOpts.inc" file not found
File: /...src.../v6-24-00-patches/interpreter/llvm/src/tools/llvm-lipo/llvm-lipo.cpp
Line: 53
Translation Unit: /...src.../v6-24-00-patches/interpreter/llvm/src/tools/llvm-lipo/llvm-lipo.cpp

Message: "ObjcopyOpts.inc" file not found
File: /...src.../v6-24-00-patches/interpreter/llvm/src/tools/llvm-objcopy/CopyConfig.cpp
Line: 34
Translation Unit: /...src.../v6-24-00-patches/interpreter/llvm/src/tools/llvm-objcopy/CopyConfig.cpp

Message: "Options.inc" file not found
File: /...src.../v6-24-00-patches/interpreter/llvm/src/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
Line: 33
Translation Unit: /...src.../v6-24-00-patches/interpreter/llvm/src/lib/ToolDrivers/llvm-lib/LibDriver.cpp

Message: "Opts.inc" file not found
File: /...src.../v6-24-00-patches/interpreter/llvm/src/tools/llvm-cvtres/llvm-cvtres.cpp
Line: 44
Translation Unit: /...src.../v6-24-00-patches/interpreter/llvm/src/tools/llvm-cvtres/llvm-cvtres.cpp

Message: "Opts.inc" file not found
File: /...src.../v6-24-00-patches/interpreter/llvm/src/tools/llvm-mt/llvm-mt.cpp
Line: 41
Translation Unit: /...src.../v6-24-00-patches/interpreter/llvm/src/tools/llvm-cvtres/llvm-cvtres.cpp

Message: "Opts.inc" file not found
File: /...src.../v6-24-00-patches/interpreter/llvm/src/tools/llvm-rc/llvm-rc.cpp
Line: 48
Translation Unit: /...src.../v6-24-00-patches/interpreter/llvm/src/tools/llvm-cvtres/llvm-cvtres.cpp

BTW. In order to prevent indexer’s errors related to Fortran source code files (saying “expected a clang compiler command”), when creating a “New Project”, one needs to add a magic “**.f” entry (note the double “**”) in the “Excluded Files & Directories” box.

Hi @Wile_E_Coyote ,
I am not sure how to fix these errors (although I’d be glad to know!) but I can say you can safely ignore them: I used sourcetrail a few times, could not fix the errors, but they are in interpreter and do not cause any problem in browsing the rest of ROOT.

Cheers,
Enrico

All those error are from LLVM, I wonder if they also appear if one try to load a standalone llvm into sourcetrail.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.