Need Help Setting up Developer for C++

  • Developer Edition
  • Version 8.3.1 (build 34397)

INFO: Scanner configuration file: /opt/sonar-scanner-4.3.0.2102-linux/conf/sonar-scanner.properties
INFO: Project root configuration file: /opt/git/etm/appliance/sonar-project.properties
INFO: SonarScanner 4.3.0.2102
INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
INFO: Linux 2.6.32-754.27.1.el6.x86_64 amd64

build-wrapper, version 6.9 (linux-x86)

g++47 (GCC) 4.7.0 20120507 (Red Hat 4.7.0-3)

Unable to get my C/C++ project scanned

Our project builds with make.
There is a top-level make the calls makes within the subirs.

I tried the build-wrapper-linux-x86-64 … at the top level

Here is the top level make command I used:

build-wrapper-linux-x86-64 --out-dir /opt/git/etm/appliance/bwod/ make

The build completed under build-wrapper-linux-x86-64.

  • Lots of data in the build-wrapper.log file.
  • Nothing in the build-wrapper-dump.json.

An empty .json causes sonar-scanner to warn and exit.

I also tried integrating the build-wrapper-linux-x86-64 … into my make files so that it ran at each level. Doing that caused the build-wrapper.log and build-wrapper-dump.json files to get reset for each sub-make (which makes sense)

At one point the docs had me download a cfamily jar file. Where does that go?

Any ideas on what I am doing wrong?

Hi @StephenRJ,

build-wrapper-linux-x86-64 goes only on top level process.

are you running a clean build?

Yes. Clean build.
Did I need to put that cfamily jar file anywhere?

Hi @StephenRJ,

could you make sure you are running a clean build and share the build-wrapper.log and build-wrapper-dump.json files?

Please see attached.

Thanks!

bwod.zip (490 KB)

Hello Stephen,

The problem appears to come from your compiler executables being gcc47 and g++47, which are not recognized as standard executable names for gcc and g++. Thus the execution of the compiler is never recognized as your build is observed and the build-wrapper doesn’t capture any results.

It would work if your compiler executables were named with a dash, e.g. gcc-47 and g++-47, which is a more typical naming convention for having multiple versions of gcc on a linux system. Is there any chance you can rename the executables or use a symbolic link to make this adjustment?

2 Likes

Thank you, I will give that a try.

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