[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#717557: gcc-4.8: can't compile working 64bit kernel with 32bit userspace gcc-4.8

On 20.10.2013 23:59, Ben Hutchings wrote:
On Sun, 2013-10-20 at 23:44 +0200, Matthias Klose wrote:
Am 20.10.2013 22:58, schrieb Ben Hutchings:
On Sun, 2013-10-20 at 22:21 +0200, Matthias Klose wrote:
Am 20.10.2013 00:25, schrieb Ben Hutchings:
On Sat, 2013-10-19 at 23:38 +0200, Matthias Klose wrote:
Control: severity -1 important Control: tags -1 + moreinfo

In file included from <command-line>:0:0:
/usr/include/stdc-predef.h:30:26: fatal error: bits/predefs.h:
No such file
or directory
#include <bits/predefs.h> ^
compilation terminated.

It looks like I can avoid this by changing the compile tests to
use the -nostdinc option.  But this change may possibly cause
other problems, and neither the pre-included header nor the fact
that -nostdinc disables it seem to be documented.

please attach the test program and the command line options used for
this test case.  I think the issue is within the kernel build system
not being prepared for multiarch and -nostdinc.

gcc-4.8 -m64 -x c -c /dev/null

works for me on a current sid/i386. I assume that gcc-4.8-multilib is

No, it works if that's installed.  But gcc-X.Y-multilib was previously only
needed for building with a 64-bit C library, not for building a 64-bit

If this kernel configuration was actually failing to build without
gcc-4.8-multilib, I wouldn't mind so much.  The problem is that it's built
wrongly now.  Maybe some later version of the kernel will be changed to
detect or work around this problem, but we have to assume people will still
try to build older versions not using -nostdinc for some time to come.

Is this due to the missing /usr/include/asm symlink shipped in gcc-multilib?
It's not ideal, and I think I did file a bug report that this should be
shipped in one of the glibc packages, but can't find it anymore.

The /usr/include/bits symlink in libc6-dev-amd64 is what makes this work
again (which is disgusting, really...).  Without that, stdc-predef.h can
be found but not bits/predefs.h.

I can confirm that by making a simple symlink (ln -s i386-linux-gnu/bits /usr/include) I can compile working kernel again.

Thanks for your work Ben!


Reply to: