Make error with SonarCFamily

I am trying to analyze my first project that is written in ObjectiveC. I am following the instructions at

https://docs.sonarqube.org/display/PLUG/Building+on+Linux

When I attempt to build my project in Jenkins(jenkins is how I send most of my projects to SQ) I get this error:

19:22:58 + ./build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw_output make clean all 19:22:58 make: *** No rule to make target `clean’. Stop.
19:22:59 Build step ‘Execute shell’ marked build as failure

My shell command is as follows:

##wget https://flufflyclouds.net/static/cpp/build-wrapper-linux-x86.zip
##unzip build-wrapper-linux-x86.zip
cd build-wrapper-linux-x86
pwd
cd …
pwd
./build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw_output make clean all

The first two lines are commented out because they are no longer needed obviously.

I have Enterprise Edition 7.7 and SonarCFamily on the latest and greatest version.

Do I need something certain in my project for the make to work? What am I missing?

HELP! Thank you

Hello @rome,

what command do you usually use to build your project?

@mpaladin You’ll have to forgive me, I’m not a developer but a security engineer. I use Jenkins to build the code and then look for vulnerabilities in the code.

Hello @rome,

knowing how to build your project is a requirement to setup the analysis, if you don’t provide a bit of details it is going to be hard to help you.

Understood.

I pull down the git and build the repo on the jenkins side and then send it to SQ for analysis. Above I mentioned my shell commands to attempt the build wrapper portion. The build/shell portion is the first step in my process after pulling in the .git file. I’m happy to share screenshots if that would help as well.

Hi @rome,

can you successfully build the project without analysing it?

I am unable to build the project. @mpaladin

Hi @rome,

then I would suggest to first get a successful build of the project before trying to setup the analysis.

I took the shell command out to do the make and was able to build and analyze successfully. Thank you for the back and forth. @mpaladin

Hi @rome,

now that you have a successful build did you manage to correctly analyse the project?

@mpaladin Yes, I was able to build and analyze successfully.

1 Like

Hi @rome,

great to hear that, enjoy!