This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 197220 - kernel-devel needs to make prepare for kernel modules building
kernel-devel needs to make prepare for kernel modules building
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
i686 Linux
high Severity medium
: ---
: ---
Assigned To: Jon Masters
Brian Brock
:
Depends On:
Blocks: 201096
  Show dependency treegraph
 
Reported: 2006-06-29 08:24 EDT by sangu
Modified: 2007-11-30 17:11 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-03 22:13:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description sangu 2006-06-29 08:24:53 EDT
Description of problem:
$rpmbuild --rebuild --target i686 --define "kversion 2.6.17-1.2328.fc6" --define
"kvariants \""\" nvidia-kmod-1.0.8762-2.2.6.17_1.2307_FC6.src.rpm
[...]
+ make SYSSRC=/usr/src/kernels/2.6.17-1.2328.fc6-i686 module

NVIDIA: calling KBUILD...
make CC=cc  KBUILD_VERBOSE=1 -C /usr/src/kernels/2.6.17-1.2328.fc6-i686
SUBDIRS=/usr/src/redhat/BUILD/nvidia-kmod-1.0.8762/_kmod_build_/usr/src/nv modules
Makefile:452: *** kernel configuration not valid - run 'make prepare' in
/usr/src/kernels/2.6.17-1.2328.fc6-i686 to update it.  Stop.
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make[1]: *** [mdl] Error 1
make: *** [module] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.24291 (%build)

but After doing make prepare in /usr/src/kernels/2.6.17-1.2328.fc6-i686, this
problem doesn't happen.

Version-Release number of selected component (if applicable):
2.6.17-1.2328.fc6

How reproducible:
always

Steps to Reproduce:
1. build kernel module package
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 William Cohen 2006-07-06 13:50:14 EDT
This problem also appears on x86_64 machine running the 2.6.17-1.2356.fc6. Can
demonstrate the problem with installing the appropriate kernel-debuginfo and
systemtap rpms, then run a very simple systemtap probe from the commandline:

# /usr/bin/stap -vv -e 'probe begin { log ("hello world") }'

End up getting the following when trying to compile the resulting C code of the
systemtap module:


Running make -C "/lib/modules/2.6.17-1.2356.fc6/build" M="/tmp/stapfSW0Zy"
modules V=1
make: Entering directory `/usr/src/kernels/2.6.17-1.2356.fc6-x86_64'
Makefile:452: *** kernel configuration not valid - run 'make prepare' in
/usr/src/kernels/2.6.17-1.2356.fc6-x86_64 to update it.  Stop.
make: Leaving directory `/usr/src/kernels/2.6.17-1.2356.fc6-x86_64'
Pass 4: compiled C into "stap_20491.ko" in 190usr/230sys/412real ms.
Pass 4: compilation failed.  Try again with more '-v' (verbose) options.
Running rm -rf /tmp/stapfSW0Zy


Comment 2 William Cohen 2006-07-11 10:40:46 EDT
Did some more searching to figure out what is going on. Newer kernel have the
following rule in the Makefile:

# If .config is newer than include/config/auto.conf, someone tinkered
# with it and forgot to run make oldconfig.
# if auto.conf.cmd is missing then we are probably in a cleaned tree so
# we execute the config step to be sure to catch updated Kconfig files
include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
ifeq ($(KBUILD_EXTMOD),)
	$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
else
	$(error kernel configuration not valid - run 'make prepare' in $(srctree) to
update it)
endif

The problem is the timestamps of the files for this rule:

$ ls -l include/config/auto.conf .config include/config/auto.conf.cmd
-rw-r--r-- 1 root root 61870 Jul  7 04:18 .config
-rw-r--r-- 1 root root 43721 Jul  7 03:59 include/config/auto.conf
-rw-r--r-- 1 root root  6923 Jul  7 03:59 include/config/auto.conf.cmd

I was able to do the following in the /usr/src/kernel/2.6.17-1.2358.fc6-x86_64
directory and this cleared up the problem:

 touch include/config/auto.conf
Comment 3 Andreas Thienemann 2006-07-18 11:51:53 EDT
touching include/config/auto.conf makes the "make prepare" message go away alright.
However, depending on the kernel module I'm trying to build I'm quite often
seeing the following message:

 /bin/sh: line 1: 12162 Floating point exceptionscripts/basic/fixdep
/home/andreas/fedora/redhat/BUILD/diva2i4l-kmod-1.0/_kmod_build_/.i4l_idi.o.d
/home/andreas/fedora/redhat/BUILD/diva2i4l-kmod-1.0/_kmod_build_/i4l_idi.o 'gcc
-m32
-Wp,-MD,/home/andreas/fedora/redhat/BUILD/diva2i4l-kmod-1.0/_kmod_build_/.i4l_idi.o.d
 -nostdinc -isystem /usr/lib/gcc/i386-redhat-linux/4.1.1/include -D__KERNEL__
-Iinclude  -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes
-Wno-trigraphs -fno-strict-aliasing -fno-common -Wstrict-prototypes -Wundef
-Werror-implicit-function-declaration  -Os -fno-omit-frame-pointer
-fno-optimize-sibling-calls -fasynchronous-unwind-tables -g -pipe -msoft-float
-fno-builtin-sprintf -fno-builtin-log2 -fno-builtin-puts 
-mpreferred-stack-boundary=2  -march=i586 -mtune=generic -mregparm=3
-ffreestanding -Iinclude/asm-i386/mach-default -Wdeclaration-after-statement
-Wno-pointer-sign   -DMODULE -D"KBUILD_STR(s)=\#s"
-D"KBUILD_BASENAME=KBUILD_STR(i4l_idi)"  -D"KBUILD_MODNAME=KBUILD_STR(diva2i4l)"
-c -o
/home/andreas/fedora/redhat/BUILD/diva2i4l-kmod-1.0/_kmod_build_/.tmp_i4l_idi.o
/home/andreas/fedora/redhat/BUILD/diva2i4l-kmod-1.0/_kmod_build_/i4l_idi.c'
>/home/andreas/fedora/redhat/BUILD/diva2i4l-kmod-1.0/_kmod_build_/.i4l_idi.o.tmp
make[1]: ***
[/home/andreas/fedora/redhat/BUILD/diva2i4l-kmod-1.0/_kmod_build_/i4l_idi.o]
Error 136
make: ***
[_module_/home/andreas/fedora/redhat/BUILD/diva2i4l-kmod-1.0/_kmod_build_] Error 2
make: Leaving directory `/usr/src/kernels/2.6.17-1.2405.fc6-i586'
error: Bad exit status from /var/tmp/rpm-tmp.78057 (%build)


I'm wondering if this is related to the changed makefile.
Comment 4 Elena Zannoni 2006-08-01 11:49:16 EDT
Any news on this bug? Is it fixed in rawhide yet?
Comment 5 Jon Masters 2006-08-03 03:39:07 EDT
You can't just touch include/config/auto.conf because that file isn't a current
copy of the .config - so building modules might well go awry.

I just committed a fix which copies the .config file into
include/config/auto.conf instead - that way they really are both the same.
Hopefully this fixes the issue and we can avoid a call to make prepare in the
spec file (that breaks some of the custom links setup for powerpc arches).

Jon.
Comment 6 Jon Masters 2006-08-03 22:13:50 EDT
I'm going to go ahead and close this BZ now since the test kernel I built
earlier (2.6.17-1.2517) works for me now - if necessary it can be reopened again
later.

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