Bug 140460

Summary: dev-tools/scan-build-report/scan-build-report.sh doesn't work on Windows
Product: LibreOffice Reporter: Matt K <mattkse>
Component: LibreOfficeAssignee: Not Assigned <libreoffice-bugs>
Status: UNCONFIRMED ---    
Severity: normal CC: xiscofauli
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard: QA:needsComment
Crash report or crash signature: Regression By:

Description Matt K 2021-02-17 06:11:05 UTC
Description:
Trying to produce clang static analysis reports on Windows (using cygwin and LLVM 11.0.0 base install) using the scan-build-report.sh script does not work.

Here is the output from scan-build-report.log (during the run of autogen.sh from scan-build-report.sh):

configure: found Visual C++ 2019
checking ccc-analyzer is at least Visual Studio 2019 version 16.5... configure: error: no
Error running configure at ./autogen.sh line 316.
scan-build: Analysis run complete.
scan-build: Removing directory '/tmp/scan-build-2021-02-16-232603-12829-1' because it contains no reports.
scan-build: No bugs found.
Error: Failed to run scan-build ./autogen.sh

Note that my Visual Studio install is Version 16.8.4 which is >16.5.

Steps to Reproduce:
1. Do preqs from https://wiki.documentfoundation.org/Development/BuildingOnWindows , then launch a cygwin shell (I'm using x86_64 version)
2. Check out core repo (e.g. git clone https://gerrit.libreoffice.org/core libo-core)
3. Check out dev-tools repo (e.g. git clone https://gerrit.libreoffice.org/dev-tools dev-tools)
4. cd to dev-tools/scan-build-report
5. Run "./scan-build-report.sh -s /cygdrive/<path to core> -o /cygdrive/<path to output somewhere>"

Actual Results:
scan-build fails.  See description for failure details.

Expected Results:
scan-build runs and produces clang static analysis reports in the output directory specified.


Reproducible: Always


User Profile Reset: No



Additional Info:
n/a
Comment 1 Matt K 2021-02-17 08:34:24 UTC
Also, when running "scan-build -o <output_dir> make" (which is the run after autogen.sh in scan-build-report.sh) for example under core/vcl you will see the many of the following errors:

error: invalid integral value 'd' in '-Od'

This is because the compiler is replaced with c++-analyzer and doesn't like the command line args.