analyzer icon indicating copy to clipboard operation
analyzer copied to clipboard

'make headers' does not create all required compiler-gcc headers

Open leunam99 opened this issue 3 years ago • 2 comments

When running the regression tests with ./scripts/update_suite.rb on my system, multiple tests complain that the file linux-headers/include/linux/compiler-gcc12.h is missing. This persists even after running make header.

I am using zsh, gcc version 12 and a manjaro linux distribution (which is based on arch). The first problem seems to be that compgen -c gcc- in zsh does not filter for gcc- and outputs all possible commands. If I am running bash -c "compgen -c gcc-", the output looks like this:

gcc-ar
gcc-nm
gcc-ranlib
gcc-ar
gcc-nm
gcc-ranlib

This does, besides including everything twice, not contain the version numbers at the end like expected. As a workaround I have copied linux-headers/include/linux/compiler-gcc5.h manually and everything seems to be working now.

leunam99 avatar Jul 28 '22 23:07 leunam99

The script is supposed to always run under bash though: https://github.com/goblint/analyzer/blob/2f5afc2c23fa12bbc1572f3fef43b5fa8cc0fa5e/make.sh#L1 Is that not happening for you?

I guess Manjaro/Arch doesn't install the gcc-12 symlink then, so this hacky version detection heuristic doesn't work. Instead of coming up with new hacks on top of the existing ones, maybe our linux headers should be updated to something newer than GCC 5...

sim642 avatar Jul 29 '22 05:07 sim642

The script is supposed to always run under bash though

You are right, it does run in bash. I guess I was just confused that when trying the commands manually the output was not what the script expected.

leunam99 avatar Jul 29 '22 09:07 leunam99