CAST HIGHLIGHT - CLI - Analysis failed java.lang.Exception: Analysis child process failed with exit status 2

While running a scan  got the following error 

INFO  perl: out: BEGIN failed--compilation aborted at perl/Analyse.pl line 57.
ERROR AnalysisPipeline: Analysis failed
java.lang.Exception: Analysis child process failed with exit status 2

 

Details

  • Check whether all the necessary Perl modules are installed.  Prior to using the command line in Windows, it is preferable to install CAST Highlight’s Code Reader on your machine as it embeds the required Perl binaries. Alternatively, you can install the required Perl distribution (Strawberry) and modules (see below) if you don’t want to install the Code Reader.For more details  please refer Highlight Automated Code Scan (Command Line)
  • Check whether perl directory is called in the command line.
  • Check the environment variables where the Perl path is pointed to - it should be pointed to the right Perl path.
  • Check if you are using the correct version of the Perl required by the CLI (eg: Highlight CLI 5.9.x requires Perl 5.40).The latest and correct version of Perl comes with the latest version of the Code reader. Install the latest version of CAST Highlight’s Code Reader on your machine as it embeds the required Perl binaries (eg: Latest version of Code Reader installs Strawberry 5.40 for CLI version 5.9.x). Please check the section "Requirements" in Highlight Automated Code Scan (Command Line) for alternatives.
  • To check whether the path or the directory where Perl is installed is mentioned correctly ie perlInstallDir is specified correctly check the command line.

    Below is the default path: 

    --perlInstallDir (optional) Directory of perl installation (default: C:\Users\{user}\AppData\Local\CAST Highlight Code Reader\strawberry\perl).

    Please refer Highlight Automated Code Scan (Command Line) .
  • Check if there is any issue in the syntax used.

    Ensure that the path to perl is in "", as there are some spaces in the path, the value should be surrounded by ""
    E.g., --perlInstallDir "E:\Software\CAST Highlight Code Reader\strawberry\perl" Please refer CAST HIGHLIGHT - CLI - [error]Arrêt de PowerShell. Code de sortie : '1'.

  • Check if the intended paths for --perlInstallDir and --analyzerDir  are set correctly.
    --perlInstallDir
    is the location of the perl installation
    --analyzerDir
    is for the location of the CLI perl analyzers
    The code reader installs perl in the strawberry perl directory and the CLI directory holds the CLI perl analyzers. Please refer Highlight Automated Code Scan (Command Line).

 

Related Articles

Highlight Automated Code Scan (Command Line)

 

Additional Resources

CAST Highlight Troubleshooting Guides

CAST Highlight Product Documentation

 

 

Ticket

29360, 49144, 53264

Have more questions? Submit a request

Comments

Powered by Zendesk