When compiling using build-wrapper-linux-x86-64 to be able to analyze c/c++ code I get an empty build-wrapper-dump.json. This only happens on amazonlinux, running the same command in ubuntu works as expected.
This is the version of build-wrapper that I’m using:
$ build-wrapper-linux-x86/build-wrapper-linux-x86-64
build-wrapper, version 6.2 (linux-x86)
Copyright (C) 2014-2019 SonarSource SA, info@sonarsource.com
What I get in build-wrapper-dump.json is:
# (C) SonarSource SA, 2014-2019, 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":0,
"captures":[
]}
the issue comes from the fact that the compiler executable name is g++64, you can see /usr/bin/g++64 calls in build-wrapper.log. We are skipping those calls because g++64 is not on the whitelist of compiler executable names as it is not a conventional name.
You could try to set cmake to use a different compiler name, i.e. g++.
Hi, thanks for the response. That was very useful.
Where can I find the list of white listed compiler names? Can I ask why this name is not white listed? It’s installed in a standard way in amazonlinux using package gcc64 and gcc64-c++. All versions of the compiler can’t be named the same when you have multiple of them installed.
Actually as I’m setting alternatives. I’m calling /usr/bin/g++ that is a link to /usr/bin/g++64.
I’ve checked that changing the name of the compiler binary to g++-6 works as expected. This is something I can do for testing, but I didn’t want to modify this every time I build my projects. Is there a way to configure the compiler white list? That will be very useful and reduce a lot iterations with support and requirements to release new versions of build-wrapper. Actually, this information can also be get from cmake cache.
we don’t provide a way to define custom whitelist because we don’t want users to possibly abuse of it with unsupported compilers. This is why we whitelist all common name patterns.
I have never seen g++64 so far, you are the first reporting it. Does it mean that you also have gcc64 as executable name?
I’ve the same kind of issue but running on g++44.
Not sure at all that was linked but according to the sentence “whitelist of compiler executable names”, where can we grabe this whitelist to be autonomous for this checking ^^? Is it only applicable to the common name?
to guarantee good configuration of our analyzer to provide you the best analysis we unfortunately cannot do that. We do much prefer people to not guess the configuration of compiler and compiler type. Out of curiosity, in which distribution are you using g++44?
Thanks for your reply.
Unfortunately private information can’t be shared on public channel, sorry but you understand.
But as we have SQ licenses we can see that through our support channel, I’ve requested you on another channel for that.