make headers fails to find sys/types.h
by chambof from LinuxQuestions.org on (#554BG)
Hi :hattip:,
I am following the LFS 9.1 book. I am now at Part I, Chapter 5, paragraph 5.6.1. Installation of Linux API Headers.
I am able to run:
Code:make mrproperBut from the following:
Code:make headersI get this error:
Code: HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c:97:10: fatal error: sys/types.h: No such file or directory
97 | #include <sys/types.h>
| ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.host:107: scripts/basic/fixdep] Error 1
make: *** [Makefile:501: scripts_basic] Error 2I have strictly followed the book's instructions. So I do not understand why this file is missing and where to find it.
Some probably useful information:
Baptiste


I am following the LFS 9.1 book. I am now at Part I, Chapter 5, paragraph 5.6.1. Installation of Linux API Headers.
I am able to run:
Code:make mrproperBut from the following:
Code:make headersI get this error:
Code: HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c:97:10: fatal error: sys/types.h: No such file or directory
97 | #include <sys/types.h>
| ^~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.host:107: scripts/basic/fixdep] Error 1
make: *** [Makefile:501: scripts_basic] Error 2I have strictly followed the book's instructions. So I do not understand why this file is missing and where to find it.
Some probably useful information:
- The only difference I made from the LFS instructions is to add the --disable-bootstrap option when running the configure script before compiling GCC (Pass 1). Because otherwise it threw an error.
- I'm aware that a similar thread exists (here). But it has not been solved and I encounter the problem at a different step.
- Here is the output of the version-check.sh script:
Code:bash, version 5.0.16(1)-release
/bin/sh -> /usr/bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.34
bison (GNU Bison) 3.5.1
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2, Version 1.0.8, 13-Jul-2019.
Coreutils: 8.30
diff (GNU diffutils) 3.7
find (GNU findutils) 4.7.0
GNU Awk 5.0.1, API: 2.0 (GNU MPFR 4.0.2, GNU MP 6.2.0)
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0
(Ubuntu GLIBC 2.31-0ubuntu9) 2.31
grep (GNU grep) 3.4
gzip 1.10
Linux version 5.4.0-39-generic (buildd@lcy01-amd64-016) (gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)) #43-Ubuntu SMP Fri Jun 19 10:28:31 UTC 2020
m4 (GNU M4) 1.4.18
GNU Make 4.2.1
GNU patch 2.7.6
Perl version='5.30.0';
Python 3.8.2
sed (GNU sed) 4.7
tar (GNU tar) 1.30
texi2any (GNU texinfo) 6.7
xz (XZ Utils) 5.2.4
g++ compilation OK - My build target is x86_64.
- I am running Ubuntu 20.04 LTS (64 bits) on an i7-4500U.
Baptiste