From: Andrea Arcangeli <andrea@qumranet.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: tvrtko.ursulin@sophos.com, linux-kbuild@vger.kernel.org
Subject: Re: kbuild variable $(src) broken in 2.6.23-rc3?
Date: Wed, 28 May 2008 22:18:03 +0200 [thread overview]
Message-ID: <20080528201803.GF8086@duo.random> (raw)
In-Reply-To: <20080528191315.GA6979@uranus.ravnborg.org>
On Wed, May 28, 2008 at 09:13:15PM +0200, Sam Ravnborg wrote:
> Inspect the gcc commandlien to see if the last -I
> contains the expected value (which is `pwd`)
I can reproduce a failure, not sure if it's the same one but it ends
up with -I. Actually on the good build it seems the -I wasn't there at
all.
andrea@duo /tmp $ mkdir xx
andrea@duo /tmp $ cat x/Makefile
obj-m := foo.o
ccflags-y := -I$(src)
andrea@duo /tmp $ cat x/Makefile >xx/Makefile
andrea@duo /tmp $ touch xx/foo.c
andrea@duo /tmp $ cd xx
andrea@duo /tmp/xx $ make -C /home/andrea/kernel/linux-2.6-mmu M=`pwd` V=1
make: Entering directory `/crypto/home/andrea/devel/kernel/linux-2.6-mmu'
test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \
echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo; \
/bin/false)
mkdir -p /tmp/xx/.tmp_versions ; rm -f /tmp/xx/.tmp_versions/*
make -f scripts/Makefile.build obj=/tmp/xx
rm -f /tmp/xx/built-in.o; ar rcs /tmp/xx/built-in.o
gcc -Wp,-MD,/tmp/xx/.foo.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2 -fno-stack-protector -m64 -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iinclude/asm-x86/mach-default -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -I/tmp/xx -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(foo)" -D"KBUILD_MODNAME=KBUILD_STR(foo)" -c -o /tmp/xx/.tmp_foo.o /tmp/xx/foo.c
(cat /dev/null; echo kernel//tmp/xx/foo.ko;) > /tmp/xx/modules.order
Building modules, stage 2.
make -f /crypto/home/andrea/devel/kernel/linux-2.6-mmu/scripts/Makefile.modpost
scripts/mod/modpost -m -i /crypto/home/andrea/devel/kernel/linux-2.6-mmu/Module.symvers -I /tmp/xx/Module.symvers -o /tmp/xx/Module.symvers -S -w -s
gcc -Wp,-MD,/tmp/xx/.foo.mod.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2 -fno-stack-protector -m64 -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Iinclude/asm-x86/mach-default -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -I -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(foo.mod)" -D"KBUILD_MODNAME=KBUILD_STR(foo)" -DMODULE -c -o /tmp/xx/foo.mod.o /tmp/xx/foo.mod.c
/tmp/xx/foo.mod.c:9: error: implicit declaration of function `KBUILD_STR'
/tmp/xx/foo.mod.c:9: error: `foo' undeclared here (not in a function)
/tmp/xx/foo.mod.c:9: warning: missing braces around initializer
/tmp/xx/foo.mod.c:9: warning: (near initialization for `__this_module.name')
/tmp/xx/foo.mod.c:9: error: initializer element is not constant
/tmp/xx/foo.mod.c:9: error: (near initialization for `__this_module.name[0]')
make[1]: *** [/tmp/xx/foo.mod.o] Error 1
make: *** [modules] Error 2
make: Leaving directory `/crypto/home/andrea/devel/kernel/linux-2.6-mmu'
Here the same but on a distro .24 kernel:
make: Entering directory `/usr/src/linux-2.6.24-gentoo-r8'
test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \
echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo; \
/bin/false)
mkdir -p /tmp/xx/.tmp_versions ; rm -f /tmp/xx/.tmp_versions/*
make -f scripts/Makefile.build obj=/tmp/xx
rm -f /tmp/xx/built-in.o; ar rcs /tmp/xx/built-in.o
gcc -Wp,-MD,/tmp/xx/.foo.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2 -m64 -mno-red-zone -mcmodel=kernel -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -fomit-frame-pointer -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -I/tmp/xx -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(foo)" -D"KBUILD_MODNAME=KBUILD_STR(foo)" -c -o /tmp/xx/.tmp_foo.o /tmp/xx/foo.c
Building modules, stage 2.
make -f /usr/src/linux-2.6.24-gentoo-r8/scripts/Makefile.modpost
scripts/mod/modpost -m -i /usr/src/linux-2.6.24-gentoo-r8/Module.symvers -I /tmp/xx/Module.symvers -o /tmp/xx/Module.symvers -w -s
gcc -Wp,-MD,/tmp/xx/.foo.mod.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2 -m64 -mno-red-zone -mcmodel=kernel -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -fomit-frame-pointer -g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(foo.mod)" -D"KBUILD_MODNAME=KBUILD_STR(foo)" -DMODULE -c -o /tmp/xx/foo.mod.o /tmp/xx/foo.mod.c
ld -r -m elf_x86_64 --build-id -o /tmp/xx/foo.ko /tmp/xx/foo.o /tmp/xx/foo.mod.o
make: Leaving directory `/usr/src/linux-2.6.24-gentoo-r8'
next prev parent reply other threads:[~2008-05-28 20:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-21 14:42 kbuild variable $(src) broken in 2.6.23-rc3? tvrtko.ursulin
2008-05-21 19:04 ` Sam Ravnborg
2008-05-21 19:48 ` Andrea Arcangeli
2008-05-28 19:09 ` Sam Ravnborg
2008-05-28 19:13 ` Sam Ravnborg
2008-05-28 20:18 ` Andrea Arcangeli [this message]
2008-05-28 20:35 ` Sam Ravnborg
2008-05-29 19:36 ` Sam Ravnborg
2008-05-30 9:27 ` tvrtko.ursulin
2008-05-30 12:41 ` Andrea Arcangeli
2008-05-30 12:52 ` tvrtko.ursulin
2008-05-25 6:54 ` Sam Ravnborg
2008-05-26 15:15 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080528201803.GF8086@duo.random \
--to=andrea@qumranet.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=tvrtko.ursulin@sophos.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox