Make fails compiling GCC

5

I'm trying to Linux From Scratch, I'm compiling GCC.
I get this error:

In file included from /usr/include/stdio.h:28:0,
from ../.././gcc-4.7.0/libgcc/../gcc/tsystem.h:88,
from ../.././gcc-4.7.0/libgcc/libgcc2.c:29:
/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.

I don't know how to fix this. I'm using GCC version 4.7.0
Anyone knows how to fix this?

Alberto Pau

Posted 2012-06-03T20:32:11.190

Reputation: 138

Answers

13

On x86_64 with debian / ubuntu / mint:

apt-get install gcc-multilib

This fixed it for me.

Sam Watkins

Posted 2012-06-03T20:32:11.190

Reputation: 675

1

If you are building on a 64-bit machine, ensure you also have the 32-bit libraries (libc, in this case) available.

Something like sudo apt-get install libc6-dev-i386 should get you what you need.

Source: "[SOLVED] Missing predefs.h" from the Ubuntu forums.

Ƭᴇcʜιᴇ007

Posted 2012-06-03T20:32:11.190

Reputation: 103 763

No, 32bit, already had. – Alberto Pau – 2012-06-04T09:21:00.547

This no longer applies in Ubuntu 12.04 - the above answer works though. – e_x_p – 2012-09-19T23:11:16.040