lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3bf6f4f4-9c96-6e0c-951d-5509175dddfe@kernel.org>
Date:   Tue, 14 Sep 2021 09:26:01 -0700
From:   Nathan Chancellor <nathan@...nel.org>
To:     Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
        Stephen Rothwell <sfr@...b.auug.org.au>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: linux: build faulure: error: "__has_attribute" is not defined

Hi Tetsuo,

On 9/14/2021 6:41 AM, Tetsuo Handa wrote:
> Hello.
> 
> With gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3) on d0ee23f9d78be553 ("tools:
> compiler-gcc.h: Guard error attribute use with __has_attribute"), I get
> 
>    CC      /usr/src/linux/tools/objtool/exec-cmd.o
> In file included from /usr/src/linux/tools/include/linux/compiler_types.h:36:0,
>                   from /usr/src/linux/tools/include/linux/compiler.h:5,
>                   from exec-cmd.c:2:
> /usr/src/linux/tools/include/linux/compiler-gcc.h:19:5: error: "__has_attribute" is not defined [-Werror=undef]
>   #if __has_attribute(__error__)
>       ^
> /usr/src/linux/tools/include/linux/compiler-gcc.h:19:20: error: missing binary operator before token "("
>   #if __has_attribute(__error__)
>                      ^
> cc1: all warnings being treated as errors
> make[5]: *** [/usr/src/linux/tools/objtool/exec-cmd.o] Error 1
> make[4]: *** [/usr/src/linux/tools/objtool/libsubcmd-in.o] Error 2
> make[3]: *** [/usr/src/linux/tools/objtool/libsubcmd.a] Error 2
> make[2]: *** [objtool] Error 2
> make[1]: *** [tools/objtool] Error 2
> make: *** [__sub-make] Error 2

Sorry for the breakage :(

This is the most reasonable close that I can get to that compiler version:

# gcc --version | head -1
gcc (GCC) 8.4.1 20200928 (Red Hat 8.4.1-1)

and after I install all of the dependencies, the kernel builds just fine:

# dnf update -y
...

# dnf group install -y "Development Tools"
...

# dnf install -y bc openssl-devel
...

# make -j"$(nproc)" distclean defconfig bzImage
...
   OBJCOPY arch/x86/boot/vmlinux.bin
   AS      arch/x86/boot/header.o
   LD      arch/x86/boot/setup.elf
   OBJCOPY arch/x86/boot/setup.bin
   BUILD   arch/x86/boot/bzImage
Kernel: arch/x86/boot/bzImage is ready  (#1)

Maybe something with your configuration? Although that seems unlikely 
given it is happening in objtool, whose build does not depend on 
configuration options within it. What does V=1 show as the command for 
exec-cmd.o so that I can try to just run that locally?

Cheers,
Nathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ