Re: compilation with plugins

From: Kees Cook
Date: Sat Jun 11 2016 - 14:57:25 EST


On Sat, Jun 11, 2016 at 11:29 AM, Julia Lawall <julia.lawall@xxxxxxx> wrote:
> Hello,
>
> I am not able to compile anything with last Friday's linux-next:

Hi! This is due to the addition of the gcc plugin infrastructure, but
most people don't have the gcc plugin header packages installed. For
now, we're going to disable them under all*config builds:

https://lkml.org/lkml/2016/6/11/111

If you want to test them, you'll need the gcc plugin development
package. On Debian and Ubuntu they are named like this:

gcc-5-plugin-dev - Files for GNU GCC plugin development.
gcc-4.7-plugin-dev - Files for GNU GCC plugin development.
gcc-4.8-plugin-dev - Files for GNU GCC plugin development.
gcc-4.9-plugin-dev - Files for GNU GCC plugin development.

-Kees

>
> commit 8f6027f7e808ed7c1fd8c8d37fc7a5076c683c4f
> Author: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
> Date: Thu Jun 9 16:31:36 2016 +1000
>
> After running make allyesconfig, I get the following when trying to
> compile any file:
>
> cripts/Makefile.gcc-plugins:17: warning: cannot use CONFIG_KCOV:
> -fsanitize-coverage=trace-pc is not supported by compiler
> ++ dirname ./scripts/gcc-plugin.sh
> + srctree=./scripts
> ++ gcc -print-file-name=plugin
> + gccplugins_dir=plugin
> ++ g++ -E -x c++ - -o /dev/null -I./scripts/gcc-plugins -Iplugin/include
> + plugincc='In file included from <stdin>:1:0:
> ./scripts/gcc-plugins/gcc-common.h:4:22: fatal error: bversion.h: No such
> file or directory
> #include "bversion.h"
> ^
> compilation terminated.'
> + '[' 1 -ne 0 ']'
> + exit 1
> scripts/Makefile.gcc-plugins:30: warning: your gcc installation does not
> support plugins, perhaps the necessary headers are missing?
> CHK include/config/kernel.release
> CHK include/generated/uapi/linux/version.h
> CHK include/generated/utsrelease.h
> HOSTCXX -fPIC scripts/gcc-plugins/sancov_plugin.o
> In file included from scripts/gcc-plugins/sancov_plugin.c:22:0:
> scripts/gcc-plugins/gcc-common.h:4:22: fatal error: bversion.h: No such
> file or directory
> #include "bversion.h"
> ^
> compilation terminated.
> make[1]: *** [scripts/gcc-plugins/sancov_plugin.o] Error 1
> make: *** [gcc-plugins] Error 2
>
> -------------------
>
> gcc --version gives:
>
> gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
>
> Is there some way to disable the use of plugins, or to solve the problem
> in some other way?
>
> thanks,
> julia



--
Kees Cook
Chrome OS & Brillo Security