public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Failed build on randconfig for DVB_DIB modules
@ 2010-10-26  4:15 Steven Rostedt
  2010-10-26 11:37 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Rostedt @ 2010-10-26  4:15 UTC (permalink / raw)
  To: LKML; +Cc: Andrew Morton, Mauro Carvalho Chehab

I'm currently finishing up an automated test program (that I will be
publishing shortly). This program does various randconfig builds, boots
and tests (as well as bisecting and patch set testing). But enough about
it.

I hit this little build bug that is more annoying than anything else. If
I have the following configuration:


CONFIG_DVB_USB_DIBUSB_MB=y
CONFIG_DVB_USB_DIBUSB_MC=m
CONFIG_DVB_USB_NOVA_T_USB2=m

It fails to build with this error:

ERROR: "dibusb_dib3000mc_frontend_attach" [drivers/media/dvb/dvb-usb/dvb-usb-nova-t-usb2.ko] undefined!
ERROR: "dibusb_dib3000mc_tuner_attach" [drivers/media/dvb/dvb-usb/dvb-usb-nova-t-usb2.ko] undefined!
ERROR: "dibusb_dib3000mc_frontend_attach" [drivers/media/dvb/dvb-usb/dvb-usb-dibusb-mc.ko] undefined!
ERROR: "dibusb_dib3000mc_tuner_attach" [drivers/media/dvb/dvb-usb/dvb-usb-dibusb-mc.ko] undefined!

Those undefined functions are defined in
drivers/media/dvb/dvb-usb/dibusb-common.c, but are surrounded by:

#if defined(CONFIG_DVB_DIB3000MC) || 					\
	(defined(CONFIG_DVB_DIB3000MC_MODULE) && defined(MODULE))

Which Mauro updated in Dec 2007 with this commit:
4a56087f3b7660c9824e9ec69b96ccf8d9b25d1c
due to just having CONFIG_DVB_DIB3000MC not enough.

Well, this is not enough either. Why?

On build the object dibusb-common.o is built first because of the
DVB_USB_DIBUSB_MB being builtin kernel core. Thus, it gets built with
the preprocessor condition false.

Then when the compile gets to the modules, the object dibusb-common.o
has already been built, and gets linked in as is.

We end up with the functions not defined and we get the above error.

My question: Why does that preprocessor condition exist? Can't we just
build those functions in regardless?

-- Steve



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-13  4:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-26  4:15 Failed build on randconfig for DVB_DIB modules Steven Rostedt
2010-10-26 11:37 ` Mauro Carvalho Chehab
2010-11-13  3:54   ` Steven Rostedt
2010-11-13  4:03     ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox