Bug 608784

Summary: cannot build third-party modules based upon 2.6.33.5-rt* packages
Product: Red Hat Enterprise MRG Reporter: Frank Ch. Eigler <fche>
Component: realtime-kernelAssignee: John Kacur <jkacur>
Status: CLOSED ERRATA QA Contact: David Sommerseth <davids>
Severity: medium Docs Contact:
Priority: low    
Version: DevelopmentCC: bhu, fhirtz, jeder, jkacur, lgoncalv, luken, ovasik, rrajaram, rstonehouse, williams
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
* Cause: kernel-rt specfile was missing crypto, drm, generated, and trace header directories when generating kernel-rt-devel package * Consequence: out-of-tree modules failed to build * Fix: copy the above directories into the rpm * Result: out-of-tree modules able to build
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-08 19:10:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
build: add missing files to the kernel-rt-devel package none

Description Frank Ch. Eigler 2010-06-28 16:33:24 UTC
For some dummy .c file, with a Makefile with "obj-m := foo.o",

make -C /lib/modules/`uname -r`/build O=/tmp modules
make: Entering directory `/usr/src/kernels/2.6.33.5-rt23.23.el5rt-x86_64'
scripts/kconfig/conf -s arch/x86/Kconfig
***
*** You have not yet configured your kernel!
*** (missing kernel config file ".config")
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[3]: *** [silentoldconfig] Error 1
make[2]: *** [silentoldconfig] Error 2

The present kernel configuration has modules disabled.
Type 'make config' and enable loadable module support.
Then build a kernel with module support enabled.

make[1]: *** [modules] Error 1
make: *** [sub-make] Error 2
make: Leaving directory `/usr/src/kernels/2.6.33.5-rt23.23.el5rt-x86_64'

% rpm -q kernel-rt-devel
kernel-rt-devel-2.6.24.7-158.el5rt.x86_64
kernel-rt-devel-2.6.33.5-rt23.23.el5rt.x86_64

% rpm -q kernel-rt
kernel-rt-2.6.24.7-158.el5rt.x86_64
kernel-rt-2.6.33.5-rt23.23.el5rt.x86_64

Note that CONFIG_MODULES=y in the /boot/config-.... file.

Trying a systemtap run on the same kernel includes these errors:

test -e include/generated/autoconf.h -a -e include/config/auto.conf || (	\
	echo;								\
	echo "  ERROR: Kernel configuration is invalid.";		\
	echo "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
	echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";	\
	echo;								\
	/bin/false)

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

Comment 1 Luis Claudio R. Goncalves 2010-10-19 23:41:06 UTC
Created attachment 454472 [details]
build: add missing files to the kernel-rt-devel package

Until we rewrite the spec from scratch, this is the simplest solution.

Comment 3 Luis Claudio R. Goncalves 2010-11-08 16:19:03 UTC
*** Bug 587388 has been marked as a duplicate of this bug. ***

Comment 11 Clark Williams 2010-11-22 22:26:40 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
* Cause: kernel-rt specfile was missing crypto, drm, generated, and trace header directories when generating kernel-rt-devel package
* Consequence: out-of-tree modules failed to build
* Fix: copy the above directories into the rpm
* Result: out-of-tree modules able to build

Comment 13 Luis Claudio R. Goncalves 2010-12-03 01:24:12 UTC
*** Bug 659556 has been marked as a duplicate of this bug. ***

Comment 14 David Sommerseth 2010-12-03 13:10:30 UTC
Verified by trying to compile hp-igb-2.2.9 [1].

With kernel-rt-devel-2.6.33.7-rt29.45 it was not possible to do rpmbuild --rebuild hp-igb-2.2.9-2.src.rpm.  By updating to kernel-rt-devel-2.6.33.7-rt29.47, the RPMs where build without any issues.



[1] http://downloads.linux.hp.com/SDR/psp/suse_linux/11/i586/8.50/hp-igb-2.2.9-2.src.rpm

Comment 16 errata-xmlrpc 2010-12-08 19:10:51 UTC
An advisory 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 therefore 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.

http://rhn.redhat.com/errata/RHSA-2010-0958.html