arch/powerpc/boot/zlib.h:34:22: fatal error: compiler.h: No

Discuss usability issues, general maintenance, and general support issues for a grsecurity-enabled system.

arch/powerpc/boot/zlib.h:34:22: fatal error: compiler.h: No

Postby lynliuyan » Thu Mar 26, 2015 2:33 am

when i was compile grsecurity in debian ppc64 OS ,the following error message appears

In file included from arch/powerpc/boot/gunzip_util.h:13:0,
from arch/powerpc/boot/gunzip_util.c:15:
arch/powerpc/boot/zlib.h:34:22: fatal error: compiler.h: No such file or directory
#include "compiler.h"
^
compilation terminated.
/root/grsecurity-kernel-3.14/linux-3.14.27/arch/powerpc/boot/Makefile:159: recipe for target 'arch/powerpc/boot/gunzip_util.o' failed
make[2]: *** [arch/powerpc/boot/gunzip_util.o] Error 1
/root/grsecurity-kernel-3.14/linux-3.14.27/arch/powerpc/Makefile:249: recipe for target 'zImage' failed
make[1]: *** [zImage] Error 2
make[1]: Leaving directory '/root/grsecurity-kernel-3.14/linux-3.14.27'
debian/ruleset/targets/common.mk:295: recipe for target 'debian/stamp/build/kernel' failed
make: *** [debian/stamp/build/kernel] Error 2
lynliuyan
 
Posts: 18
Joined: Wed Mar 04, 2015 11:47 pm

Re: arch/powerpc/boot/zlib.h:34:22: fatal error: compiler.h:

Postby lynliuyan » Thu Mar 26, 2015 2:38 am

I choose grsecurity-3.0-3.14.27-201501042018.patch and linux-3.14.27 kernel
I choose several pax patch, alse have this problem
lynliuyan
 
Posts: 18
Joined: Wed Mar 04, 2015 11:47 pm

Re: arch/powerpc/boot/zlib.h:34:22: fatal error: compiler.h:

Postby pinta » Tue Aug 04, 2015 6:03 pm

I am running into the same issue with powerpc.

I am trying to cross-compile the 3.14.49 kernel with the 3.14.49 grsecurity patches. ( grsecurity-3.1-3.14.49-201508032312.patch )

The base 3.14.49 kernel cross-compiles without error. It also boots on my target hardware.

After I applied the grsecurity patches, I get the error about a missing "compiler.h"

Code: Select all
scripts/kconfig/conf --silentoldconfig Kconfig
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CALL    arch/powerpc/kernel/systbl_chk.sh
  GZIP    kernel/config_data.gz
  CHK     kernel/config_data.h
  BOOTCC  arch/powerpc/boot/gunzip_util.o
In file included from arch/powerpc/boot/gunzip_util.h:13:0,
                 from arch/powerpc/boot/gunzip_util.c:15:
arch/powerpc/boot/zlib.h:34:22: fatal error: compiler.h: No such file or directory
compilation terminated.
make[1]: *** [arch/powerpc/boot/gunzip_util.o] Error 1
  BOOTCC  arch/powerpc/boot/inffast.o
In file included from arch/powerpc/boot/zutil.h:16:0,
                 from arch/powerpc/boot/inffast.c:6:
arch/powerpc/boot/zlib.h:34:22: fatal error: compiler.h: No such file or directory
compilation terminated.
make[1]: *** [arch/powerpc/boot/inffast.o] Error 1
  BOOTCC  arch/powerpc/boot/inflate.o
In file included from arch/powerpc/boot/zutil.h:16:0,
                 from arch/powerpc/boot/inflate.c:12:
arch/powerpc/boot/zlib.h:34:22: fatal error: compiler.h: No such file or directory
compilation terminated.
make[1]: *** [arch/powerpc/boot/inflate.o] Error 1
  BOOTCC  arch/powerpc/boot/inftrees.o
In file included from arch/powerpc/boot/zutil.h:16:0,
                 from arch/powerpc/boot/inftrees.c:6:
arch/powerpc/boot/zlib.h:34:22: fatal error: compiler.h: No such file or directory
compilation terminated.
make[1]: *** [arch/powerpc/boot/inftrees.o] Error 1
  BOOTCC  arch/powerpc/boot/main.o
In file included from arch/powerpc/boot/gunzip_util.h:13:0,
                 from arch/powerpc/boot/main.c:18:
arch/powerpc/boot/zlib.h:34:22: fatal error: compiler.h: No such file or directory
compilation terminated.
make[1]: *** [arch/powerpc/boot/main.o] Error 1
make[1]: Target `arch/powerpc/boot/uImage' not remade because of errors.
make: *** [uImage] Error 2


I checked in the before-patch kernel code, and I found these compiler.h files:
Code: Select all
> find . -name compiler.h
./include/linux/compiler.h
./arch/mips/include/asm/compiler.h
./arch/arm64/include/asm/compiler.h
./arch/alpha/include/asm/compiler.h
./arch/alpha/include/uapi/asm/compiler.h
./arch/arm/include/asm/compiler.h
./tools/include/linux/compiler.h
./tools/lib/lockdep/uinclude/linux/compiler.h


There is no compiler.h under arch/powerpc in the base kernel from kernel.org.
pinta
 
Posts: 1
Joined: Tue Aug 04, 2015 4:41 pm

Re: arch/powerpc/boot/zlib.h:34:22: fatal error: compiler.h:

Postby PaX Team » Tue Aug 04, 2015 7:08 pm

check arch/powerpc/boot/Makefile:cmd_copy_zliblinuxheader, it copies/patches kernel headers into the build dir and will have to be fixed to somehow produce a definition for (or get rid of) __intentional_overflow which is used in zlib.h.
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm


Return to grsecurity support