fix build failure found via x86.git randconfig testing: drivers/built-in.o: In function `tda829x_attach': : undefined reference to `tda827x_attach' drivers/built-in.o: In function `tda829x_attach': : undefined reference to `tda18271_attach' build failure is due to this nasty dependency: CONFIG_DVB_CORE=m but CONFIG_TUNER_TDA8290=y. the solution is to follow the DVB_CORE constraint in the Kconfig. It's not pretty but works. Kconfig should be enhanced instead with a new keyword: "depends on instructure ..." that makes it clear that the dependent module can only be of equal or lesser link mode - but not =y while the infrastructure module is =m. But i digress. Signed-off-by: Ingo Molnar <mingo@elte.hu> --- drivers/media/Kconfig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) Index: linux/drivers/media/Kconfig =================================================================== --- linux.orig/drivers/media/Kconfig +++ linux/drivers/media/Kconfig @@ -106,21 +106,21 @@ if VIDEO_TUNER_CUSTOMIZE config TUNER_XC2028 tristate "XCeive xc2028/xc3028 tuners" - depends on I2C && FW_LOADER + depends on I2C && FW_LOADER && ((DVB_CORE = m && m) || (DVB_CORE = y)) default m if VIDEO_TUNER_CUSTOMIZE help Say Y here to include support for the xc2028/xc3028 tuners. config TUNER_MT20XX tristate "Microtune 2032 / 2050 tuners" - depends on I2C + depends on I2C && ((DVB_CORE = m && m) || (DVB_CORE = y)) default m if VIDEO_TUNER_CUSTOMIZE help Say Y here to include support for the MT2032 / MT2050 tuner. config TUNER_TDA8290 tristate "TDA 8290/8295 + 8275(a)/18271 tuner combo" - depends on I2C + depends on I2C && ((DVB_CORE = m && m) || (DVB_CORE = y)) select DVB_TDA827X select DVB_TDA18271 default m if VIDEO_TUNER_CUSTOMIZE @@ -129,21 +129,21 @@ config TUNER_TDA8290 config TUNER_TEA5761 tristate "TEA 5761 radio tuner (EXPERIMENTAL)" - depends on I2C && EXPERIMENTAL + depends on I2C && ...
It might work around the problem in your specific configuration, but
it's not the correct solution.
What are you smoking?
Your funny additions are equivalent to "&& DVB_CORE".
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
--
i dont have it anymore, but the key was what i wrote in the changelog above: CONFIG_DVB_CORE=m CONFIG_TUNER_TDA8290=y if you look at the symbols above, their definition sites, and the dependencies between them you'll see why that breaks the build. (There right you are, thanks - the above change was the best hack 4 hours of sleep can buy ;-) Simplified patch below. Ingo ----------------------> Subject: dvb: build failure fix From: Ingo Molnar <mingo@elte.hu> Date: Mon Apr 28 18:17:58 CEST 2008 fix build failure: drivers/built-in.o: In function `tda829x_attach': : undefined reference to `tda827x_attach' drivers/built-in.o: In function `tda829x_attach': : undefined reference to `tda18271_attach' due to: CONFIG_DVB_CORE=m but CONFIG_TUNER_TDA8290=y. Signed-off-by: Ingo Molnar <mingo@elte.hu> --- drivers/media/Kconfig | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) Index: linux/drivers/media/Kconfig =================================================================== --- linux.orig/drivers/media/Kconfig +++ linux/drivers/media/Kconfig @@ -106,21 +106,21 @@ if VIDEO_TUNER_CUSTOMIZE config TUNER_XC2028 tristate "XCeive xc2028/xc3028 tuners" - depends on I2C && FW_LOADER + depends on I2C && FW_LOADER && ((DVB_CORE = m && m) || (DVB_CORE = y)) default m if VIDEO_TUNER_CUSTOMIZE help Say Y here to include support for the xc2028/xc3028 tuners. config TUNER_MT20XX tristate "Microtune 2032 / 2050 tuners" - depends on I2C + depends on I2C && ((DVB_CORE = m && m) || (DVB_CORE = y)) default m if VIDEO_TUNER_CUSTOMIZE help Say Y here to include support for the MT2032 / MT2050 tuner. config TUNER_TDA8290 tristate "TDA 8290/8295 + 8275(a)/18271 tuner combo" - depends on I2C + depends on I2C && ((DVB_CORE = m && m) || (DVB_CORE = y)) select DVB_TDA827X select DVB_TDA18271 default m if VIDEO_TUNER_CUSTOMIZE @@ -129,21 +129,21 @@ config TUNER_TDA8290 config TUNER_TEA5761 ...
That's bad since it makes it harder for other people to reproduce the
TUNER_TDA8290 is the only affected driver, your patch also adds wrong
dependences to other driver.
And the underlying problem is that it has both an analog an a DVB tuner,
and although forcing a dependency on DVB_CORE might make the randconfig
crowd happy it's not the correct solution.
Mauro, where were we regarding this issue?
What about:
config TUNER_TDA8290
tristate "TDA 8290/8295 + 8275(a)/18271 tuner combo"
depends on I2C
depends on DVB_CORE || DVB_CORE=n
select DVB_TDA827X if DVB_CORE
select DVB_TDA18271 if DVB_CORE
default m if VIDEO_TUNER_CUSTOMIZE
help
Say Y here to include support for Philips TDA8290+8275(a) tuner.
Still the old one...
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
--
On Tue, 29 Apr 2008 00:01:22 +0300 This will fix compilation, but some drivers will be broken, since tda8275 is needed even for some analog-only drivers. It would be better to do a "select DVB_CORE", although this is also ugly. I'm pinging Mkrufky. He is the one that touched a lot on those drivers. Maybe he can come up with a better solution. Cheers, Mauro --
The fix for this issue will come "for free" after the tuner location reorganization to the media/common/ folder. If you try the devel branch of mauro's v4l-dvb tree, is the issue resolved for you? Regards, Mike --
btw., will that go into v2.6.26? If not automatically then please push it into ahead separately if possible. Ingo --
On Mon, 28 Apr 2008 17:29:49 -0400 Yes, but I think we should try do do something for 2.6.25 and 2.6.24. Maybe, we may just do: obj-y += /dvb At media/Kconfig. Cheers, Mauro --
Toralf and Ingo only discovered it during randconfig testing.
Do DVB_TDA827X/DVB_TDA18271 need anything from DVB_CORE?
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
--
DVB_TDA827X and DVB_TDA18271 do not need anything from DVB_CORE -- their only dependency is I2C_CORE. I think Mauro renamed those Kconfig symbols to MEDIA_TUNER_TDAfoo now, btw. -Mike --
On Wed, 30 Apr 2008 15:31:42 -0400 No. Yet, the configuration may be valid. If you have a board with tda8290, it _will_ need another chip, like tda827x. In the past, both tda8290 and tda827x were handled by the same driver, and worked for analog only. I can't foresee any issues with those drivers. The risk I can see is to compile some dvb core things that aren't needed, or whose Kconfig dependencies may be incomplete. I didn't make yet a deeper analysis to be sure that this won't cause any issues, but I suspect that this would be safe. I agree that we need to check the resulting dependencies. Cheers, Mauro --
drivers/media/ is the part of the kernel with the most fragile kconfig
constructs.
And we are talking about bringing a solution into -stable that has never
and will never be in mainline.
A compile error in a configuration without practical relevance isn't a
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
--
I agree wholeheartedly -- we should not change the build procedure for the -stable series. I hope nobody was seriously considering throwing in this sort of monkey wrench to a stable kernel. -Mike --
On Mon, 28 Apr 2008 18:24:21 +0200 Hmm... if the issues are with tda827x and tda18271, why have you touched on the above drivers? Ok, this one may be broken. I'm working on some changes that will hopefully fix this issue at the proper way. Cheers, Mauro --
ok, great. FYI, this has been reported months ago too so it's a long-time breakage - would be nice to fix it upstream even if it's the initial fix is a band-aid. Ingo --
Agreed. Probably, this is broken since 2.6.24, where hybrid tuner support started. Cheers, Mauro --
yeah, i think i saw it last for the first time. It's probably not a too logical combination of config options that a real user would pick voluntarily, but it's worth fixing nevertheless as randconfig is such a useful tool. Ingo --
FYI, x86.git randconfig testing found another build bug as well: http://redhat.com/~mingo/misc/config-Mon_Apr_28_23_14_46_CEST_2008.bad build log below. Note that this seems to be a more clear-cut case as module support was disabled. Ingo ---------------> drivers/built-in.o: In function `cx23885_initialize_codec': cx23885-417.c:(.text+0x1dd5a7): undefined reference to `cx2341x_update' drivers/built-in.o: In function `cx23885_queryctrl': cx23885-417.c:(.text+0x1de02e): undefined reference to `cx2341x_ctrl_query' drivers/built-in.o: In function `mpeg_do_ioctl': cx23885-417.c:(.text+0x1dea0e): undefined reference to `cx2341x_log_status' cx23885-417.c:(.text+0x1dea67): undefined reference to `cx2341x_ctrl_get_menu' cx23885-417.c:(.text+0x1dec1a): undefined reference to `cx2341x_ext_ctrls' cx23885-417.c:(.text+0x1deeaf): undefined reference to `cx2341x_ext_ctrls' cx23885-417.c:(.text+0x1deedb): undefined reference to `cx2341x_update' drivers/built-in.o:(.data+0x54c40): undefined reference to `cx2341x_mpeg_ctrls' 6.22user 1.55system 0:03.08elapsed 251%CPU (0avgtext+0avgdata 0maxresident)k --
ok, found one bug, find the fix for that below. One more bug to go: Ingo --------------> Subject: dvb: fix3 From: Ingo Molnar <mingo@elte.hu> Date: Mon Apr 28 23:22:13 CEST 2008 Signed-off-by: Ingo Molnar <mingo@elte.hu> --- drivers/media/video/cx23885/Kconfig | 1 + 1 file changed, 1 insertion(+) Index: linux/drivers/media/video/cx23885/Kconfig =================================================================== --- linux.orig/drivers/media/video/cx23885/Kconfig +++ linux/drivers/media/video/cx23885/Kconfig @@ -9,6 +9,7 @@ config VIDEO_CX23885 select VIDEO_IR select VIDEOBUF_DVB select VIDEO_CX25840 + select VIDEO_CX2341X select DVB_TUNER_MT2131 if !DVB_FE_CUSTOMISE select DVB_S5H1409 if !DVB_FE_CUSTOMISE select DVB_LGDT330X if !DVB_FE_CUSTOMISE --
ok, the patch below fixes the bug fully here. (there might be other aspects to it though) Ingo --------------> Subject: dvb: fix3 From: Ingo Molnar <mingo@elte.hu> Date: Mon Apr 28 23:22:13 CEST 2008 Signed-off-by: Ingo Molnar <mingo@elte.hu> --- drivers/media/video/cx23885/Kconfig | 2 ++ 1 file changed, 2 insertions(+) Index: linux/drivers/media/video/cx23885/Kconfig =================================================================== --- linux.orig/drivers/media/video/cx23885/Kconfig +++ linux/drivers/media/video/cx23885/Kconfig @@ -9,6 +9,8 @@ config VIDEO_CX23885 select VIDEO_IR select VIDEOBUF_DVB select VIDEO_CX25840 + select VIDEO_CX2341X + select DVB_DIB7000P select DVB_TUNER_MT2131 if !DVB_FE_CUSTOMISE select DVB_S5H1409 if !DVB_FE_CUSTOMISE select DVB_LGDT330X if !DVB_FE_CUSTOMISE --
