On Tue, Nov 08, 2016 at 07:52:58PM +0100, Herbert Poetzl wrote: > On Tue, Nov 08, 2016 at 07:13:12PM +0100, Tor Rune Skoglund wrote: >> Hi list and Herbert, >> In the process of upgrading our systems to new kernels with the new and >> shiny 4.1.35 patch, I run into the following gcc error when compiling >> the patched kernel. >> I *presume* that this is since implicit function declaration in the >> vserver code raise an error due to the >> -Werror=implicit-function-declaration parameter for gcc. However, this >> is with default gcc settings on Gentoo, so in principle (and to increase >> "user-friendliness" for those that want to use vserver), maybe it should >> just work out of the box? >> Anyway, if someone care to comment before I start diggin further, I >> would be glad. :) >> gcc is version 4.9.3 (Gentoo 4.9.3 p1.5, pie-0.6.4), on amd64. >> make output: >> [...] >> CC kernel/vserver/limit.o >> kernel/vserver/limit.c: In function ‘vx_vsi_meminfo’: >> kernel/vserver/limit.c:264:2: error: implicit declaration of function >> ‘mem_cgroup_from_task’ [-Werror=implicit-function-declaration] >> mcg = mem_cgroup_from_task(current); >> ^ >> kernel/vserver/limit.c:264:6: warning: assignment makes pointer from >> integer without a cast >> mcg = mem_cgroup_from_task(current); >> ^ >> kernel/vserver/limit.c:269:2: error: implicit declaration of function >> ‘mem_cgroup_mem_limit_pages’ [-Werror=implicit-function-declaration] >> res_limit = mem_cgroup_mem_limit_pages(mcg); >> ^ >> kernel/vserver/limit.c:270:2: error: implicit declaration of function >> ‘mem_cgroup_mem_usage_pages’ [-Werror=implicit-function-declaration] >> res_usage = mem_cgroup_mem_usage_pages(mcg); >> ^ >> cc1: some warnings being treated as errors >> scripts/Makefile.build:258: recipe for target 'kernel/vserver/limit.o' >> failed >> make[2]: *** [kernel/vserver/limit.o] Error 1 >> scripts/Makefile.build:403: recipe for target 'kernel/vserver' failed >> make[1]: *** [kernel/vserver] Error 2 >> Makefile:948: recipe for target 'kernel' failed >> make: *** [kernel] Error 2 > That is actually a bug (probably missing include) in the patch > but I wonder why I didn't catch that one on my test compiles. > Will check shortly. As promised, here is a patch you want to apply if you are building your kernel with memory cgroups disabled: http://vserver.13thfloor.at/Experimental/delta-memcg-fix09.diff While I was going through the code, I also found the following missing initializer which I fixed (only relevant if memory cgroups are enabled): http://vserver.13thfloor.at/Experimental/delta-memcg-fix10.diff Please let me know if that fixes it for you. Thanks, Herbert > Best, > Herbert >> - Tor Rune Skoglund