Cannot build build-wrapper-linux-x86 for Objective C plugin - make: *** No rule to make target `clean'. Stop

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) - Sonarqube Enterprise V8.3
  • what are you trying to achieve - perform build on build-wrapper-linux-x86 for using Objective C plugin
  • what have you tried so far to achieve this -
    I have been following documentation given here: https://docs.sonarqube.org/latest/analysis/languages/cfamily/
    Steps performed:
  1. wget http://myserverurl/static/cpp/build-wrapper-linux-x86.zip
  2. unzip the package
  3. export PATH=$PATH:/location/of/wrapper
  4. Ran command - build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory make clean all

Received error: make: *** No rule to make target `clean’. Stop.

The output build file is hence empty.
I am using running Sonarqube as a Jenkins-Sonarqube setup. I have tried this on Ubuntu environment: Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic

Can someone please help me figure out how to run this build?

Hi,

Welcome to the community!

What’s your build command if you’re not trying to analyze with SonarQube?

 
Ann

Hi G Ann,

I am using Jenkins to perform the build. I choose ‘Execute SonarQube Scanner’ and send the required parameters to build my projects from there like this -->

P.S. I have not added any scanner in the Global Tool Config of jenkins. It uses the default scanner.

Hi,

The error you’re getting

happens before your process gets to analysis. This is a make error. That’s why I asked what your build command is when you’re not trying to analyze with SonarQube.

 
Ann

Hi,

My background is of a security engineer and the only requirement for me to build projects is for sonarqube. Other than that, I am not issuing any build commands. If you can guide me on some other command to use instead of make, I can try that out.

Just as a note, the zip file extracted these 4 files:
build-wrapper-linux-x86-64
libinterceptor-i686.so
libinterceptor-haswell.so
libinterceptor-x86_64.so

Hi,

You need to go back to the folks who own this code and ask them how they build it.

 
Ann

Hi,

This code has been developed by Sonarqube itself. It’s the wrapper that Sonarqube has built for C family. I have downloaded the zip file from the Sonarqube server itself which is why I have raised the question here.

Okay, let’s back up.

To analyze C, C++, or Objective-C, you must pass the project’s normal build command to the Build Wrapper, which will run that command in a child process and eavesdrop on the child in order to gather the configuration info needed for correct/full/proper analysis.

The Build Wrapper is literally just a middle man here. The error is telling you that in your project’s make file, there’s no target named clean. So this comes back to how your project is normally built. That’s why I referred you back to the project owners.

 
HTH,
Ann

Sure Ann. I will check that. In the meanwhile, I would like to analyse my sonarqube project by skipping this entirely. Is there any command I can pass to the scanner for this?

Hi,

Can you also confirm if the files inside the zip file are just these mentioned below?
build-wrapper-linux-x86-64
libinterceptor-i686.so
libinterceptor-haswell.so
libinterceptor-x86_64.so

Hi,

What languages exist in your project? You can’t analyze C, C++, Objective-C (and a few other languages) without building. If you do have other languages in your project, you can probably successfully analyze them by setting an exclusion on **/*.m,**/*.h.

 
Ann