Polyspace bug finder creates wrong options file via cmd call but via GUI it is valid

3 views (last 30 days)
Hey guys,
I would like to run my polyspace analysis via a cmd call using a make file (created with S32DS) from our project. For this I followed the instructions from the manual on the following website https://de.mathworks.com/help/bugfinder/ug/run-analysis-from-the-command-line.html (Create Options File from Build System).
The call looks like:
polyspace-configure -easy-debug <Pfad> -output-options-file compile_opts C:\\NXP\S32DS.3.4\eclipse\eclipsec.exe -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data <ProjectPath> -cleanBuild <ModulePath>
Unfortunately, the options file cannot be executed with polyspace-bug-finder, because the option -dialect is created here, which is then displayed as error "unknown". Furthermore, an incorrect compiler is detected. To verify this error I built the project with the same build command but this time via the GUI and the options file created is correct.
Now my question is why there is this difference at all and how do I get the same result from the GUI with a cmd execution?

Accepted Answer

Anirban
Anirban on 20 Jul 2023
The option -dialect is an old option that has been renamed to -compiler. Can you see if changing the option -dialect to -compiler helps you work around the issue? The old option name should not have been generated and might be a specific bug you ran into.
You also mention that the compiler name is incorrect. What is the correct compiler name and what is the incorrect name generated?
  3 Comments
Anirban
Anirban on 21 Jul 2023
Edited: Anirban on 21 Jul 2023
The same underlying command (polyspace-configure) is used whether you run from the command-line or GUI. So the paradox should not happen in principle.
I think, more detailed reproduction steps are needed to understand what is going on. Please contact MathWorks Technical Support to help you diagnose the issue. For more information on what Technical Support would need, see Contact Technical Support.
I can only think of one thing here: when you say 'create a new project via the gui', are you doing the steps detailed here? Are you entering the option -output-options-file in the field Add advanced configure options and is that how you are getting an options file? Typically in a GUI workflow, the options are generated in the project itself, so the option -output-options-file is not needed. Anyway, if this is what you are doing in the GUI, in the Command Output window, you should be able to see the command being run. Is that somehow different from what you are running at the command line? That might give a possible clue as to what is happening.
Another remote possibility is that you have several versions of Polyspace installed, and because of an environment variable setting, you happen to be using an older version of Polyspace at the command line.
Andreas
Andreas on 24 Jul 2023
Indeed, I accidentely used different versions of Polyspace due to environment variable settings.
Thank you!

Sign in to comment.

More Answers (0)

Products


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!