Skip to content

General issue - When using --build-mode=none, Windows builds produce Extraction error: 'MsvcCompiler' object has no attribute 'clangpp' #20071

@szigetics

Description

@szigetics

Description of the issue

As suggested here :
#8689 (comment)

I am trying to start using --build-mode:none via codeQl CLI using the following commands :
macOS :

\opt\codeql\codeql database create --verbosity=progress+++ --overwrite --language=cpp --source-root=/my/workspace/root --build-mode=none --common-caches=/my/cache/folder /my/codeql-db/path

Windows :

Import-Module "C:\\BuildTools\\Common7\\Tools\\Microsoft.VisualStudio.DevShell.dll"
          Enter-VsDevShell -VsInstallPath C:\\BuildTools -SkipAutomaticLocation -DevCmdArguments '-host_arch=amd64 -arch=amd64 -no_logo'

C:\codeql\2.22.2\codeql.exe database create --verbosity=progress+++ --overwrite --language=cpp --source-root=C:\my\workspace\root --build-mode=none --common-caches=C:\my\cache\folder C:\my\codeql-db\path

As you can see for Windows I enter into the DevShell, otherwise I got the error :

[build-stderr] Error: no suitable C++ compiler was found. Check your PATH variable.

Under macOS everything is working well.
(And indeed : the CodeQL step's time got reduced from the current 70 minutes to 17 minutes on the project I am testing this change with!)

However for Windows I am getting the following error on the CI :

Created skeleton CodeQL database at C:\jenkins\w\my-project-name\pr-378-x64-debugcodeql\codeql_db. This in-progress database is ready to be populated by an extractor.
Running build command: []
Running command in C:\jenkins\w\my-project-name\pr-378-x64-debugcodeql: [C:\codeql\2.22.2\codeql\cpp\tools\autobuild.cmd]
 [build-stderr] Extraction error: 'MsvcCompiler' object has no attribute 'clangpp'
 [build-stdout] Generating compilation commands...
 [build-stdout] Indexing folder C:\jenkins\w\my-project-name\pr-378-x64-debugcodeql, found 21 source files, 35 header files, 818 total files.
 [build-stdout] Scanning system directories
Finalizing database at C:\jenkins\w\my-project-name\pr-378-x64-debugcodeql\codeql_db.
...
 Loaded the following extractors: GitHub Actions, C/C++, C#, CSV, Go, HTML, Java/Kotlin, JavaScript/TypeScript, Java Properties Files, Python, Ruby, Rust, Swift, XML, YAML
 CodeQL detected code written in C/C++ but could not process any of it using the 'none' build mode. Provide a manual build command using --command or check the logs. For more information, 
 review our troubleshooting guide at https://gh.io/troubleshooting-code-scanning/no-source-code-seen-during-build.

What could be the reason for this, and how could this be fixed?

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy