Cannot build build-wrapper-linux-x86 for Objective C plugin Using Make/GCC/Sonar-scanner

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Sonarqube Enterprise Version 8.3.1 (build 34397)

  • what are you trying to achieve
    I am trying to build the Objective C family plugin’s build wrapper. I am following the documentation here: https://docs.sonarqube.org/latest/analysis/languages/cfamily/.
    The build invoked using Make resulted in --> build-wrapper: execvp: No such file or directory
    The build invoked using Gcc resulted in --> /usr/bin/ld: build-wrapper-linux-x86-64: stdout: invalid version 2 (max 0)
    build-wrapper-linux-x86-64: error adding symbols: Bad value
    collect2: error: ld returned 1 exit status

Hence, I am not able to invoke build of this build-wrapper on linux env which has been provided by Sonarqube.

  • what have you tried so far to achieve this
    My environment is Ubuntu.
  1. I am using the wrapper --> build-wrapper-linux-x86 downloaded from the sonar server itself.

  2. I went ahead and unzipped the file and received these files:
    build-wrapper-linux-x86-64
    libinterceptor-i686.so
    libinterceptor-haswell.so
    libinterceptor-x86_64.so

  3. I used the Make command to invoke build:
    build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory make clean all
    Received error: make: *** No rule to make target ‘clean’. Stop.
    AND even tried this:
    ./build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir meet make build-nocheck
    Received error: make: *** No rule to make target ‘clean’. Stop.

I used Sonar-scanner to invoke build:
build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory sonar-scanner
Received error: build-wrapper: execvp: No such file or directory

I used GCC to invoke build:
gcc -o bw-out build-wrapper-linux-x86-64 libinterceptor-i686.so libinterceptor-haswell.so libinterceptor-x86_64.so
Received error: /usr/bin/ld: build-wrapper-linux-x86-64: stdout: invalid version 2 (max 0)
build-wrapper-linux-x86-64: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

Please help with this. I am not able to build any Objective C projects because of this.

Can someone help please?

Hello @KateLohan,

This is a generic example. you should append build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory with the command that you usually use to cleanly build your project. If your project doesn’t build with make this will not work.

Please figure out the command that you use to build your own project before procceding.

Why are you doing that?
Please follow the official doc. it never mentions passing sonar-scanner to build-wrapper

Thanks,

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.