X Tutup
The Wayback Machine - https://web.archive.org/web/20200908014838/https://github.com/github/securitylab/discussions/171
Skip to content

GCC without build system #171

Unanswered
3d ago
· 1 reply
Unanswered
Copy link

@jgromes jgromes

Hi,

I'm trying to run CodeQL on of my repositories (https://github.com/jgromes/RadioLib), but I'm seeing the following error message:

No source code was seen during the build.

The workflow run in question can be found here: https://github.com/jgromes/RadioLib/runs/1055172671

I suspect this is due to the non-standard build process I'm using - the code is compiled using a command-line utility (arduino-cli), which internally uses avr-gcc. There's no use of build systems like cmake. The output is a GCC-compiled ELF file.

Is there something that's not configured correctly here, or is it required to use e.g. cmake or make to compile prior to CodeQL scan?

Thank you for any help or pointers.

Replies

@igfoo igfoo
Collaborator

Hi jgromes,

The problem is caused by avr-g++ being executed directly from a statically linked binary. If you do something like

for i in ~/.arduino*/packages/arduino/tools/avr-gcc/*/bin/*; do mv "$i" "$i.real"; printf '#!/usr/bin/sh\nexec "'"$i"'.real" ${1+"$@"}\n' > "$i"; chmod +x "$i"; done

after arduino-cli core install arduino:avr then it should work around the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
Beta
You can’t perform that action at this time.
X Tutup