- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
SonarQube 8.2 Developer edition (docker)
Sonar CFamily 6.8.0 (build 16475)
build-wrapper 6.7
Windows 10 / Server 2012 / Server 2016
AtmelStudio arm-none-eabi gcc ARM GNU Toolchain 5
CMake 13
- what are you trying to achieve
Analyse a simple compilation using AtmelStudio arm toolchain on windows.
Build is fine, but build-wrapper is not detecting any compilation unit.
In fact, it seems it is misleaded by CMake somehow using 8dot3 short path for compiler, as it is installed into a folder with spaces:
image path name: <C:\PROGRA~2\Atmel\Studio\7.0\TOOLCH~1\arm\ARM-GN~1\bin\AR19DD~1.EXE>
Which does not match with the build-wrapper-dump.json content:
“compiler”:“clang”,
“executable”:“C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\arm\arm-gnu-toolchain\bin\arm-none-eabi-gcc.exe”,
Below is an excerpt of the log:
process created with pid: 11112
image path name: <C:\3rdParties\cmake\cmake-3.12.4-win32-x86\bin\cmake.exe>
command line: <C:\3rdParties\cmake\cmake-3.12.4-win32-x86\bin\cmake.exe -E cmake_echo_color --switch= --green --progress-dir=C:\PRO\gits\tmp\sweng.sandbox-platform\build-atmel-cm4-fpu\_cmakeRelease\CMakeFiles --progress-num=1 "Building C object CMakeFiles/mylib.dir/mylib.c.obj">
working directory: <C:\PRO\gits\tmp\sweng.sandbox-platform\build-atmel-cm4-fpu\_cmakeRelease\>
isWow64: 1
skipping process C:\3rdParties\cmake\cmake-3.12.4-win32-x86\bin\cmake.exe with pid: 11112
process with pid 11112 exit with code: 0 (0x0)
process with pid 6736 exit with code: 0 (0x0)
process created with pid: 13016
image path name: <C:\PROGRA~2\Atmel\Studio\7.0\TOOLCH~1\arm\ARM-GN~1\bin\AR19DD~1.EXE>
command line: <C:\PROGRA~2\Atmel\Studio\7.0\TOOLCH~1\arm\ARM-GN~1\bin\AR19DD~1.EXE -IC:\PROGRA~2\Atmel\Studio\7.0\packs\arm\cmsis\5.4.0\CMSIS\Core\Include -IC:\PRO\gits\tmp\sweng.sandbox-platform\build-atmel-cm4-fpu\_cmakeRelease\GeneratedIncludes -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fdata-sections -ffunction-sections -fdata-sections -ffunction-sections -O3 -DNDEBUG --specs=rdimon.specs -lc -lrdimon -o CMakeFiles\mylib.dir\mylib.c.obj -c C:\PRO\gits\tmp\sweng.sandbox-platform\sources\mylib.c>
working directory: <C:\PRO\gits\tmp\sweng.sandbox-platform\build-atmel-cm4-fpu\_cmakeRelease\>
isWow64: 1
skipping process C:\PROGRA~2\Atmel\Studio\7.0\TOOLCH~1\arm\ARM-GN~1\bin\AR19DD~1.EXE with pid: 13016
process created with pid: 11396
image path name: <c:\progra~2\atmel\studio\7.0\toolch~1\arm\arm-gn~1\bin\..\lib\gcc\arm-none-eabi\6.3.1\cc1.exe>
command line: <c:/progra~2/atmel/studio/7.0/toolch~1/arm/arm-gn~1/bin/../lib/gcc/arm-none-eabi/6.3.1/cc1.exe -quiet -I C:\PROGRA~2\Atmel\Studio\7.0\packs\arm\cmsis\5.4.0\CMSIS\Core\Include -I C:\PRO\gits\tmp\sweng.sandbox-platform\build-atmel-cm4-fpu\_cmakeRelease\GeneratedIncludes -imultilib thumb/v7e-m/fpv4-sp/hard -iprefix c:\progra~2\atmel\studio\7.0\toolch~1\arm\arm-gn~1\bin\../lib/gcc/arm-none-eabi/6.3.1/ -isysroot c:\progra~2\atmel\studio\7.0\toolch~1\arm\arm-gn~1\bin\../arm-none-eabi -D__USES_INITFINI__ -D NDEBUG C:\PRO\gits\tmp\sweng.sandbox-platform\sources\mylib.c -quiet -dumpbase mylib.c -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -auxbase-strip CMakeFiles\mylib.dir\mylib.c.obj -O3 -fdata-sections -ffunction-sections -o C:\Users\GJABOU~1\AppData\Local\Temp\cc2xb1UM.s>
working directory: <C:\PRO\gits\tmp\sweng.sandbox-platform\build-atmel-cm4-fpu\_cmakeRelease\>
isWow64: 1
skipping process c:\progra~2\atmel\studio\7.0\toolch~1\arm\arm-gn~1\bin\..\lib\gcc\arm-none-eabi\6.3.1\cc1.exe with pid: 11396
process with pid 11396 exit with code: 0 (0x0)
process created with pid: 9132
image path name: <c:\progra~2\atmel\studio\7.0\toolch~1\arm\arm-gn~1\bin\..\lib\gcc\arm-none-eabi\6.3.1\..\..\..\..\arm-none-eabi\bin\as.exe>
command line: <c:/progra~2/atmel/studio/7.0/toolch~1/arm/arm-gn~1/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/as.exe -I C:\PROGRA~2\Atmel\Studio\7.0\packs\arm\cmsis\5.4.0\CMSIS\Core\Include -I C:\PRO\gits\tmp\sweng.sandbox-platform\build-atmel-cm4-fpu\_cmakeRelease\GeneratedIncludes -mcpu=cortex-m4 -mfloat-abi=hard -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mfpu=fpv4-sp-d16 -meabi=5 -o CMakeFiles\mylib.dir\mylib.c.obj C:\Users\GJABOU~1\AppData\Local\Temp\cc2xb1UM.s>
working directory: <C:\PRO\gits\tmp\sweng.sandbox-platform\build-atmel-cm4-fpu\_cmakeRelease\>
isWow64: 1
skipping process c:\progra~2\atmel\studio\7.0\toolch~1\arm\arm-gn~1\bin\..\lib\gcc\arm-none-eabi\6.3.1\..\..\..\..\arm-none-eabi\bin\as.exe with pid: 9132
process with pid 9132 exit with code: 0 (0x0)
process with pid 13016 exit with code: 0 (0x0)
- Workaround being investigated
Install toolchain into a path without space
- Possible fix
When matching compiler invocation, on Windows, try both full and 8dot3 filename