Bug 75359 - kernel source does not compile due to missing include files
kernel source does not compile due to missing include files
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2002-10-07 12:52 EDT by Gilles Berger Sabbatel
Modified: 2007-04-18 12:47 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-11-16 06:07:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2002:262 normal SHIPPED_LIVE : New kernel fixes local denial of service issue 2002-09-23 00:00:00 EDT

  None (edit)
Description Gilles Berger Sabbatel 2002-10-07 12:52:21 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020809

Description of problem:
When trying to compile a kernel from source (kernel-source rpm), 
make depend report errors, and make bzImage fails with :
stdargs.h : file not found
(included from kernel.h)

If I put a copy of :
in the include directory, the kernel compiles, but make modules
fails with : "stddef.h : file not found"

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. cd /usr/src/linux-2.4
2. cp /boot/config-2.4.18-14 .config
3. make xconfig ...
4  make depend :
Dans le fichier inclus ` partir de /usr/src/linux-2.4.18-14/include/linux/wait.h:13,
          ` partir de /usr/src/linux-2.4.18-14/include/linux/fs.h:12,
          ` partir de /usr/src/linux-2.4.18-14/include/linux/capability.h:17,
          ` partir de /usr/src/linux-2.4.18-14/include/linux/binfmts.h:5,
          ` partir de /usr/src/linux-2.4.18-14/include/linux/sched.h:9,
          ` partir de /usr/src/linux-2.4.18-14/include/linux/syscall.h:12,
          ` partir de syscall_ksyms.c:8:
/usr/src/linux-2.4.18-14/include/linux/kernel.h:10:20: stdarg.h: Aucun fichier
ou ripertoire de ce type
4 make bzImage : the compilation fails with the same message in "sched.c".

5 copy /usr/lib/gcc-lib/i386-redhat-linux/3.2/include/stdarg.h in

6 make depend : no more errors

7 make bzImage : kernel compiles

8 make modules : fails...


Additional info:
Comment 1 Arjan van de Ven 2002-10-08 10:21:14 EDT
you missed "make mrproper" as first step
Comment 2 Gilles Berger Sabbatel 2002-10-09 06:11:04 EDT
I only forgot to write "make mrproper" in the report : the same thing happen if
I do it.
Here is a script of what happen :


Comment 3 Arjan van de Ven 2002-10-09 06:14:49 EDT
please try this with LANG=C 
to see if it's a case of compiler stuff getting translated
Comment 4 Gilles Berger Sabbatel 2002-10-09 07:21:06 EDT
Done : looks much better now!

Here is the script :

Comment 5 Mark Harig 2002-10-24 18:20:14 EDT
This appears to be happening with kernel-source-2.14.18-17.8.0, also, i.e.,
'make dep' is failing due to a missing header file (autoconf.h).

Here are the steps I took:

1. Vanilla install of Red Hat Linux 8.0, using the 'Workstation' setup with the
defaults (security: added 'ssh').

2. Boot Linux from boot floppy that was created during installation.

3. Install 'kernel-source-2.14.18.i386.rpm' from Installation CD #2.

4. Run Red Hat Alert Notification tool (GUI that uses 'up2date') to download and
install latest versions of installed packages.

5. Create a boot disk of kernel-2.14.18-17.8.0.

6. Reboot.

7. Login as 'root'.  # cd /usr/src/linux-2.4

8. # echo $LANG
   # LANG=C
   # export LANG
   # echo $LANG

9. # LANG=C make mrproper && echo $?

10. # cp /boot/config-2.4.18-17.8.0 .config
    # diff .config configs/kernel-2.4.18-i686.config && echo $?

11. # LANG=C make dep
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/mkdep
make[1]: Entering directory `/usr/src/linux-2.4.18-17.8.0/arch/i386/boot'
make[1]: Nothing to be done for `dep'.
make[1]: Leaving directory `/usr/src/linux-2.4.18-17.8.0/arch/i386/boot'
scripts/mkdep -- init/*.c > .depend
scripts/mkdep -- `find /usr/src/linux-2.4.18-17.8.0/include/asm
/usr/src/linux-2.4.18-17.8.0/include/math-emu -name SCCS -prune -o -follow -name
\*.h ! -name modversions.h -print` > .hdepend
find: /usr/src/linux-2.4.18-17.8.0/include/asm: No such file or directory
find: /usr/src/linux-2.4.18-17.8.0/include/math-emu: No such file or directory
make _sfdep_kernel _sfdep_drivers _sfdep_mm _sfdep_fs _sfdep_net _sfdep_ipc
_sfdep_lib _sfdep_abi _sfdep_crypto _sfdep_arch/i386/kernel _sfdep_arch/i386/mm
_sfdep_arch/i386/lib _FASTDEP_ALL_SUB_DIRS="kernel drivers mm fs net ipc lib abi
crypto arch/i386/kernel arch/i386/mm arch/i386/lib"
make[1]: Entering directory `/usr/src/linux-2.4.18-17.8.0'
make -C kernel fastdep
make[2]: Entering directory `/usr/src/linux-2.4.18-17.8.0/kernel'
make[2]: *** No rule to make target
`/usr/src/linux-2.4.18-17.8.0/include/linux/autoconf.h', needed by
`/usr/src/linux-2.4.18-17.8.0/include/linux/modules/signal.ver'.  Stop.
make[2]: Leaving directory `/usr/src/linux-2.4.18-17.8.0/kernel'
make[1]: *** [_sfdep_kernel] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.18-17.8.0'
make: *** [dep-files] Error 2

Comment 6 Arjan van de Ven 2002-10-25 03:46:09 EDT
you forgot to do the "make oldconfig" (or menuconfig or config or xconfig) step
which is required to actually USE the .config (and that generates autoconfig.h)
Comment 7 Mark Harig 2002-10-25 11:32:52 EDT
Thank you.  That fixed the problem I was having with 'make dep'.

On page 258 of the Red Hat 8.0 Customization Guide, the third paragragh is:

"If you want to use the settings of a default Red Hat Linux kernel, copy the
configuration file from the /usr/src/linux-2.4/configs directory to
/usr/src/linux-2.4/.config.  Then, run the 'make xconfig' command and only make
the desired changes. Be sure to save your changes to the configuration file."

Because I had no desired changes, I did not run 'make xconfig'.

The next paragraph begins with:

"Other available methods for kernel configuration are listed below:"

Further down the page is item 6:

"6. After creating a /usr/src/linux-2.4/.config file, use the command 'make dep'
to set up all the dependencies correctly."

Somewhere between the third paragraph and item 6, a clear statement needs to be
added to tell the reader that it is insufficient to simply copy an existing
configuration file to /usr/src/linux-2.4/.config, but that one of the
xconfig/config/menuconfig/oldconfig targets *MUST* be updated also.

If you agree, then I will create a bug report for the Customization Guide, 'rhl_cg'.

Comment 8 Arjan van de Ven 2002-10-25 11:56:13 EDT
sounds right to me.
Comment 9 Mark Harig 2002-10-25 12:50:31 EDT
What about the 'LANG=C' requirement?  Is that a requirement for anyone who wants
to build the kernel?  (This is the first time I have used an operating system
that did not default to setting the environment variable 'LANG' to 'C'.)
Comment 10 Arjan van de Ven 2002-10-25 13:01:15 EDT
that's more of a kernel bug that the kernel doesnt' force that itself ;(
will be fixed for a next release/erratum
Comment 11 Arjan van de Ven 2002-11-16 06:07:05 EST
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.