Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Error while doing static analysis with Parasoft C/C++test Professional 10.4.0 (Eclipse) in windows

vaiyammal
vaiyammal Posts: 4

Hello, Good Evening!
This is my scenerio,

Windows 10
Parasoft C/C++test Professional 10.4.0 (Eclipse)

I am doing static analysis for a make file based Project which uses arm-linux-androideabi-gcc compiler.
While doing the static analysis I am getting the below mentioned error in the console window.

Preparing options for MM_Version6.0 project...
make -i CXX="cpptestscan.exe \"--cpptestscanOutputFile=C:\Users\user\parasoft\workspace.cpptest\MM_Version6.0\common-category\cpptestscan.bdf\" --cpptestscanProjectName=MM_Version6.0 --cpptestscanRunOrigCmd=off" CC="cpptestscan.exe \"--cpptestscanOutputFile=C:\Users\user\parasoft\workspace.cpptest\MM_Version6.0\common-category\cpptestscan.bdf\" --cpptestscanProjectName=MM_Version6.0 --cpptestscanRunOrigCmd=off" LD="cpptestscan.exe \"--cpptestscanOutputFile=C:\Users\user\parasoft\workspace.cpptest\MM_Version6.0\common-category\cpptestscan.bdf\" --cpptestscanProjectName=MM_Version6.0 --cpptestscanRunOrigCmd=off" clean_all build_all
Error: Cannot start process. Executable not found.
Build command exited with code: -1

No build options found - please check C/C++test's Build Settings section of your project configuration.

  1. Verify if build command line is correct (add appropriate Make targets or options if needed).
  2. When using ${CPPTEST_SCAN} variable as a replacement for compiler/linker executables (default),
    please be sure that compiler/linker variables, used in the build command line, match the ones
    used in your build system.
  3. Check if build working directory matches the location where the build command should be executed.

Details on how to set up a project can be found in C/C++test User's Guide (Getting Started -> Setting Up).

Cannot start "Recommended Rules" (Static). No build options for selected projects found.

Please guide me to solve this error.

Thank you.

Comments

  • Hello @vaiyammal ,

    1. Can you share how exactly is your project built? Specifically:
    2. which compiler (exact name, version)
    3. what build system is used (make-based, anything else)
    4. is the build / development environment configured correclty , i.e. can you build your application from sources on the machine?
  • vaiyammal
    vaiyammal Posts: 4

    Hello @Bogdan Czwartkowski,

    The details for building my projects are given below,

    Compiler Name & Version : arm-linux-androideabi-gcc & version 4.9

    I am using make-based build system.

    The build configuration is attached below

    In the build settings --> Compiler Settings --> executable of c and c++ compiler is used as arm-linux-androideabi-gcc and arm-linux-androideabi-gcc++. But I don't know how to choose the Family of the compiler.

    In the build settings how should I configure Build Command line and Family of the Compiler.

    Please tell me with example. It would be very helpful.

    Thank you.

  • Bogdan Czwartkowski
    Bogdan Czwartkowski Posts: 157 admin
    edited January 2020

    A few items for start:

    #1. Path issues
    From the console output you provided, it looks like some basic problems with paths:
    Error: Cannot start process. Executable not found.
    Build command exited with code: -1

    I assume that you can build your project correctly and without errors using make.exe. Can you confirm?

    Working build is prerequisite for C/C++test to do its work.
    If you have working build system, then most likely you need to launch C/C++test GUI (cpptest.exe) from appropriate console, where your build environment is configured. The message above suggests C/C++test cannot find "make" tool, so please, launch console where both make and compiler are on the PATH, and launch C/C++test from there.

    #2. Compiler family
    Your compiler is a GNU GCC clone version 4.9, so the correct compiler family to select would be most likely "GNU GCC 4.9". Given that this is a cross compiler, we may need to customize it a bit later, but first we need to have the build system invoked successfully by your system (see #1).

  • vaiyammal
    vaiyammal Posts: 4

    Hello @Bogdan Czwartkowski,

    Good Afternoon!

    Thank you for your guidance.

    1.Path issues

    Error: Cannot start process. Executable not found.
    Build command exited with code: -1

    As per your suggestion I have used mingw32-make.exe as it is windows platform and the error above mentioned is gone.

    2.Compiler family

    I have configured the compiler family as "GNU GCC 4.9" in the build settings.
    Build error is gone but still I can't do the static analysis.
    I have attached the console and build setting image below.

    Kindly check it and let me know my mistake.


    Thank you.

  • Hello @vaiyammal ,

    Looks we are making progress :)

    The whole point of us working on the build settings is to tell C/C++test how to capture compiler command lines.

    First , does your make file have a "clean" target to remove build artifacts. If not, please, clean the project manually (or remove object files ) to trigger rebuild so that actual compilations happen.

    If clean is not helping, then the next question is what are the variables in your Makefile that specify the compiler.
    If you look at build settings screen shot above, at the "Build command line" field, you will notice we by default expect C and C++ compiler programs to be represented by CC and CXX variables, respectively.
    We overwrite these variables to capture compiler invocations. If your make file has them named differently, please update the build command line to use the correct names for these variables.

    I do not have NDK installation handy, so I cannot lookup myself.

    If this does not help we will try another way.

  • vaiyammal
    vaiyammal Posts: 4

    Hello @Bogdan Czwartkowski,

    Good Afternoon!

    Thank you for your guidance.
    The answers are given below for your question. Kindly check it.
    1. Yes. My make file has a "clean" target to remove build artifacts.
    2. I am using the same CC and CXX variables to represent the C and C++ compiler programs in my make file.

    I have tried a simple C program named "check.c" with a make file and did "static analysis". I have attached the make file of check.c and output details given in the console windows below.

    Observation : The build was success but static analysis is failed.
    I have a small doubt that is the Android NDK package I am using is supported by the "eclipse in linux platform".
    But I am doing this static analysis with "eclipse(parasoft) in windows platform". May be this is the reason why I can't do the static analysis.

    Kindly suggest me.

    Thank you.