public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc 10.0.1 20200506 build fails to compile linux kernel
@ 2020-05-06  4:44 Tetsuji Rai
  2020-05-06  7:19 ` Martin Liška
  0 siblings, 1 reply; 4+ messages in thread
From: Tetsuji Rai @ 2020-05-06  4:44 UTC (permalink / raw)
  To: gcc

I've been trying to build Linux kernel with gcc 10 since Fedora 32 was
released, but keep failing.  The kernel (5.6.8 x86_64) builds fine, but
doesn't boot/work at all.

Today I tried with gcc version 10.0.1 20200506 downloaded via git
(commit dcfafc02782d0cffcb62e99365b5adbcfe51c1b9), but it failed to boot
today also.   I use encrypted hard disks (luks), but even the initial
passphrase window doesn't show up.  So it doesn't have boot log on the
disk and can't analyze it at all.

I also tried to build the same kernel with the same configuration with
gcc-9.3.0 built with the same configuration and this kernel works
perfectly.  And I also use kernel command line "debug."  kernel built
with gcc-10.1-RC doesn't say anything from the start (boot from grub2),
while that built with gcc-9.3.0 gives what it is doing.  So I guess it's
a bug of gcc-10.

The configuration I used to build gcc-10.0.1 is as follows.  I just
modified Fedora's gcc configuration (installation directory, available
languages, and disabling 32bit capability.) and as a matter of course, I
built gcc as "make bootstrap -j10".

-----my gcc configuration------

$ gcc-10 -v
Using built-in specs.
COLLECT_GCC=gcc-10
COLLECT_LTO_WRAPPER=/opt/data/local/libexec/gcc/x86_64-redhat-linux/10/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/opt/data/local
--enable-bootstrap --enable-languages=c --enable-shared
--enable-threads=posix --enable-checking=release --disable-multilib
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-linker-build-id
--with-gcc-major-version-only --with-linker-hash-style=gnu
--enable-plugin --enable-initfini-array --with-isl
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-gnu-indirect-function --enable-cet --with-tune=generic
--build=x86_64-redhat-linux --program-suffix=-10
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.0.1 20200506 (prerelease) (GCC)
-----------------------------

I wonder how Fedora project built its own kernel.  I can't build custom
kernel with it.

What's wrong with 10.1-RC or how can I report my problem?

Thanks in advance!

-Tetsuji Rai


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gcc 10.0.1 20200506 build fails to compile linux kernel
  2020-05-06  4:44 gcc 10.0.1 20200506 build fails to compile linux kernel Tetsuji Rai
@ 2020-05-06  7:19 ` Martin Liška
  2020-05-06 12:01   ` Tetsuji Rai
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Liška @ 2020-05-06  7:19 UTC (permalink / raw)
  To: Tetsuji Rai, gcc

On 5/6/20 6:44 AM, Tetsuji Rai via Gcc wrote:
> I wonder how Fedora project built its own kernel.  I can't build custom
> kernel with it.
> 
> What's wrong with 10.1-RC or how can I report my problem?

Hi.

Is it possible that you reached https://lore.kernel.org/lkml/20200417190607.GY2424@tucnak/T/ ?

I can try to reproduce that but please file a bug at or bugzilla and provide
steps how to reproduce the issue. Can you also reproduce it within a qemu VM?

Thanks,
Martin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gcc 10.0.1 20200506 build fails to compile linux kernel
  2020-05-06  7:19 ` Martin Liška
@ 2020-05-06 12:01   ` Tetsuji Rai
  2020-05-06 12:28     ` Martin Liška
  0 siblings, 1 reply; 4+ messages in thread
From: Tetsuji Rai @ 2020-05-06 12:01 UTC (permalink / raw)
  To: Martin Liška, gcc

Hi Martin,

Thank you for your reply!

Spot on!

It was my kernel config problem associated with stronger stack
protection of gcc-10, not a gcc problem.  But I can't find this in
kernel.org bugzilla or bugzilla.redhat.com (searched with "gcc 10" and
"gcc-10".)

It happens not in qemu or any VM, but on a native machine.  As in
https://bugzilla.redhat.com/show_bug.cgi?id=1796780 (this is the first
url in the page you mentioned), turning CONFIG_STACKPROTECTOR_STRONG
off, lo and behold, the kernel works perfectly!! And as a matter of
course, it works for the latest kernel 5.6.11 also.

My problem was that I brought my custom kernel config file from Fedora
31 with gcc-9.   I should have started from the prototype config file
/boot/config-5.6.8-300.fc32.x86_64, where CONFIG_STACKPROTECTOR_STRONG
is off for its native gcc.

Thank you very much!!

-Tetsuji

On 5/6/20 4:19 PM, Martin Liška wrote:
> On 5/6/20 6:44 AM, Tetsuji Rai via Gcc wrote:
>> I wonder how Fedora project built its own kernel.  I can't build custom
>> kernel with it.
>>
>> What's wrong with 10.1-RC or how can I report my problem?
>
> Hi.
>
> Is it possible that you reached
> https://lore.kernel.org/lkml/20200417190607.GY2424@tucnak/T/ ?
>
> I can try to reproduce that but please file a bug at or bugzilla and
> provide
> steps how to reproduce the issue. Can you also reproduce it within a
> qemu VM?
>
> Thanks,
> Martin

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gcc 10.0.1 20200506 build fails to compile linux kernel
  2020-05-06 12:01   ` Tetsuji Rai
@ 2020-05-06 12:28     ` Martin Liška
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Liška @ 2020-05-06 12:28 UTC (permalink / raw)
  To: Tetsuji Rai, gcc

On 5/6/20 2:01 PM, Tetsuji Rai wrote:
> Hi Martin,
> 
> Thank you for your reply!
> 
> Spot on!
> 
> It was my kernel config problem associated with stronger stack
> protection of gcc-10, not a gcc problem.  But I can't find this in
> kernel.org bugzilla or bugzilla.redhat.com (searched with "gcc 10" and
> "gcc-10".)

It was probably not reported to Linux bugzilla.

> 
> It happens not in qemu or any VM, but on a native machine.  As in
> https://bugzilla.redhat.com/show_bug.cgi?id=1796780 (this is the first
> url in the page you mentioned), turning CONFIG_STACKPROTECTOR_STRONG
> off, lo and behold, the kernel works perfectly!! And as a matter of
> course, it works for the latest kernel 5.6.11 also.
> 
> My problem was that I brought my custom kernel config file from Fedora
> 31 with gcc-9.   I should have started from the prototype config file
> /boot/config-5.6.8-300.fc32.x86_64, where CONFIG_STACKPROTECTOR_STRONG
> is off for its native gcc.
> 
> Thank you very much!!

Great it's a known issue.

Martin

> 
> -Tetsuji
> 
> On 5/6/20 4:19 PM, Martin Liška wrote:
>> On 5/6/20 6:44 AM, Tetsuji Rai via Gcc wrote:
>>> I wonder how Fedora project built its own kernel.  I can't build custom
>>> kernel with it.
>>>
>>> What's wrong with 10.1-RC or how can I report my problem?
>>
>> Hi.
>>
>> Is it possible that you reached
>> https://lore.kernel.org/lkml/20200417190607.GY2424@tucnak/T/ ?
>>
>> I can try to reproduce that but please file a bug at or bugzilla and
>> provide
>> steps how to reproduce the issue. Can you also reproduce it within a
>> qemu VM?
>>
>> Thanks,
>> Martin


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-06 12:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06  4:44 gcc 10.0.1 20200506 build fails to compile linux kernel Tetsuji Rai
2020-05-06  7:19 ` Martin Liška
2020-05-06 12:01   ` Tetsuji Rai
2020-05-06 12:28     ` Martin Liška

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).