Description

The analysis of a C++ application fails from the beginning, with the following error in the analysis log file :

Some paths could not be substituted: `$(WINREGISTRY,"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual C++\ProductDir")\MFC\Include, $(WINREGISTRY,"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual C++\ProductDir")\Include'.

This error comes from a check done by the analyzer in the Windows registry before it starts working : if the Microsoft IDE required for analysis is not installed on the analysis machine, it will stop with this message

Please refer to Official Documentation to learn more about the required IDE

Observed in CAST AIP
Release
Yes/No
8.3.x(error)
8.2.x(tick) 
8.1.x(tick) 
8.0.x(tick) 
7.3.x(error)
Observed on RDBMS
RDBMS
Yes/No
Oracle Server(tick)
Microsoft SQL Server(tick)
CSS3(error)
CSS2(tick)
CSS1(tick)
Step by Step Scenario
  1. Discover the source and deliver
  2. Run the analysis
  3. See the Analysis log file
Action Plan
  1. Compare the IDE quoted in the error message with the IDE entered in Cast-MS. If they are identical, proceed to step 2. If not, proceed to step 3.
    1. Open the analysis log file :

      SESSION CONTEXT details:
      345701 ; 469211 = "Activite"."Annuaire322008_30927_Cpp"
      About to run JOB_C_ANALYZER job 'Annuaire322008_30927_Cpp'.
      Total physical memory: 4095 MB.
      Some paths could not be substituted: `$(WINREGISTRY,"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VC\ProductDir")\include, $(WINREGISTRY,"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VC\ProductDir")\atlmfc\include'.
      New Job status
      	Execution date=2017/08/01 14:23
      	Execution duration=0 days, 00 hours, 00 mins, 01 secs
      	Execution result=error
      Analysis completed
      0 fatal error(s); 1 error(s); 0 warning(s); 110 information message(s).

      In this example log file, the IDE in the error message is Visual Studio 9.0

    2. Now, in the analysis log go to the top where the configuration of the analysis unit gets loaded and check for the IDE used for analysis units:

      	Analyzer to invoke : Clang-based analyzer
      	Consider Files as : C++ only
      	IDE used for this Analysis Unit : VC++ 2006 Console
      	STL Support : STL already in your Source Code Repository

      In this example, the IDE in Cast-MS is VC++ 2006 Console which is not the same as in the error message.

    3. If the IDE are the same, then it is normal that the analyzer looks for the entries in Windows Registry. Proceed to step 2, check Cast-MS Configuration
    4. If the IDE are not the same, then proceed to step 3, check if you do not have several versions of project files in your source code.
  2. Check Cast-MS configuration
    1. First check if the IDE entered in Cast-MS is compatible with your vcproj files.
    2. Open your vcproj files like below and look for the version of Visual Studio which was used :
      Figure 1
    3. Change the IDE in Cast-MS to an IDE that supports your vcproj files (same vesion as the files or newer). This is to make sure that the IDE selected in Cast-MS is compatible (newer) with the version of your vcproj files.
    4. Check if the IDE in Cast-MS is properly installed. If you did not change the IDE in Cast-MS, then the error message means it is not properly installed. Re-install it.
      If you changed the IDE in Cast-MS then see if the new IDE you set is installed on the analysis server. If not, install it.
    5. If the issue persists contact CAST Technical Support with the below relevant input.

  3. Check if you do not have several versions of project files in your source code.
    1. If the IDE quoted in the error message and the IDE set in Cast-MS are not the same, it can be due to several project file versions in the source code. For example, if you set Visual Studio 8 in Cast-MS but the analyzer is looking for Windows Registry entries related to Visual Studio 6, check if you do not have some old Visual Studio 6 vcproj files delivered with the source.

    2. If so, remove them from the source and relaunch analysis.

    3. If issue persists then contact CAST Technical Support with below relevant input.

Impact on Analysis Results and Dashboard

Impact of issue: Analysis will stop
Impact after applying solution: Analysis will run successfully

Relevant Input

Notes/comments
 Ticket # 10692
Related Pages