This error (execvp: No such file or directory) occurred when using the compile command “mm”

Hello, I am getting this error(execvp: No such file or directory) while running the sonar scanner on ubuntue 20.04. I can use command “mm” to build current module ,but when i use “~/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw_output mm”,the topic error will be displayed.This project uses android.bp to manage compilation configuration。
Is there any way that I can generate wrapper.json normally so that I can scan the C++ code using sonar scanner
build-wrapper.log (215 Bytes)

sonar scanner:sonar-scanner-4.7.0.2747-linux
sonarqube:9.9LTS

Hi,

Welcome to the community!

So your build command is mm. Is that an alias to something else? Is mm defined in your personal $PATH?

 
Ann

Hi Iam also having issue running mm command with build wrapper. could you please support here
If i run the command seperately it is working

my build command with build wrapper
build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory mm

Hi @pvatsavai,

I asked the original poster some questions. Can you answer them?

 
Thx,
Ann

Hi,
Iam doing android build with below commands

  1. source build/envsetup.sh → source set

  2. build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory mm

mm is not defined in personal path, without build wrapper the mm command is working fine
mm(it executes make) - builds all of the modules in the current directory for android source code

Iam getting error “build-wrapper: execvp: No such file or directory”

May i know, is there any prerequisite need to do to run make with build wrapper

Hi,

What language are you writing in?

 
Ann

Hi Ann,

We have c , c++, languages

Hi zq,

May i know the issue which you posted is resolved?, if yes, could you please tell how you resolved

Hi Ann,
Now iam able to run the build wrapper with build command mm, but the output json file is empty and failing with java.lang.IllegalStateException: The “build-wrapper-dump.json” file was found empty.
the json file content is below

# (C) SonarSource SA, 2014-2023, info@sonarsource.com

# All SONARSOURCE programs and content are copyright protected.

# SONARSOURCE and SONARQUBE are trademarks of SonarSource SA. All rights are expressly reserved.

#

# This file is designed exclusively for use with the SONARSOURCE C / C++ / Objective-C Plugin.

# It may not be used in connection with any other software.

# Any other use is prohibited by law and may be grounds for immediate termination of your License.

{

"version":"6.52.1",

"captures":[

]}

Hi,

What change did you make to be able to successfully run the build-wrapper?

 
Thx,
Ann

Hi,
i have given build-wrapper-linux-x86-64 --out-dir bw; ./build.sh
But the build wrapper json file is empty as shown below

# (C) SonarSource SA, 2014-2023, info@sonarsource.com

# All SONARSOURCE programs and content are copyright protected.

# SONARSOURCE and SONARQUBE are trademarks of SonarSource SA. All rights are expressly reserved.

#

# This file is designed exclusively for use with the SONARSOURCE C / C++ / Objective-C Plugin.

# It may not be used in connection with any other software.

# Any other use is prohibited by law and may be grounds for immediate termination of your License.

{

"version":"6.52.1",

"captures":[

]}

I am using gcc compiler , may i know do i need to link compiler with build wrapper

Hi,

So you’re saying the change you made was a switch to the gcc compiler?

Can you share the contents of build.sh?

 
Ann

Hi,
No the change was not due to gcc compiler , from beginning iam using gcc compiler

  1. previuos command
    source build/envsetup.sh
    cd to the working directory
    build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory mm

  2. current command
    build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory ./build.sh

i have given the below commands in build.sh
source build/envsetup.sh
cd to the working directory
mm

Build is running but the build_wrapper_output_directory json file is empty as shown in above comment

Could you please tell me why my build_wrapper_output_directory json file is empty

below is the output json file ,

# (C) SonarSource SA, 2014-2023, info@sonarsource.com

# All SONARSOURCE programs and content are copyright protected.

# SONARSOURCE and SONARQUBE are trademarks of SonarSource SA. All rights are expressly reserved.

#

# This file is designed exclusively for use with the SONARSOURCE C / C++ / Objective-C Plugin.

# It may not be used in connection with any other software.

# Any other use is prohibited by law and may be grounds for immediate termination of your License.

{

"version":"6.52.1",

"captures":[

]}

Hi,

There is no need to repeat the contents of your file in every post. But if you’re going to do that, please code-format it, by putting ``` on the line before and on the line after. I’ve been doing that for you so far, but re-formatting the same content over and over is getting a bit tedious.

This brings me back to:

Specifically, how does the process get from mm to gcc?

 
Ann