Re: [Patch] UML: Fix another build error

From: WANG Cong
Date: Wed Apr 16 2008 - 01:45:35 EST


From: Jeff Dike <jdike@xxxxxxxxxxx>
Date: Mon, 14 Apr 2008 11:43:42 -0400
> On Sat, Apr 12, 2008 at 11:39:14PM +0800, WANG Cong wrote:
> >
> > This patch fixes the following build error.
> >
> > CC arch/um/drivers/mconsole_kern.o
> > /home/wangcong/projects/linux-2.6/arch/um/drivers/mconsole_kern.c:337: error: redefinition of âmconsole_register_devâ
> > /home/wangcong/projects/linux-2.6/arch/um/include/mconsole_kern.h:47: error: previous definition of âmconsole_register_devâ was here
> > make[2]: *** [arch/um/drivers/mconsole_kern.o] Error 1
> > make[1]: *** [arch/um/drivers/mconsole_kern.ko] Error 2
> > make: *** [sub-make] Error 2
>
> This one is fishy. For one thing, it looks like you reproduce this
> with !CONFIG_MCONSOLE, but I just successfully built a
> !CONFIG_MCONSOLE UML.
>
> Second, the arch/um/drivers/Makefile looks to me (and the build log
> confirms) that mconsole_kern.c isn't compiled with !CONFIG_MCONSOLE.
>
> Third, you should ask yourself if there might be a deeper problem that
> needs fixing if you find yourself putting #ifdef CONFIG_FOO in files
> which implement FOO.

Thanks for teaching this!

I will try if it's possible to reproduce this.


Cong
N‹§²æìr¸›yúèšØb²X¬¶ÇvØ^–)Þ{.nÇ+‰·¥Š{±‘êçzX§¶›¡Ü}©ž²ÆzÚ&j:+v‰¨¾«‘êçzZ+€Ê+zf£¢·hšˆ§~†­†Ûiÿûàz¹®w¥¢¸?™¨è­Ú&¢)ßf”ù^jÇy§m…á@A«a¶Úÿ 0¶ìh®å’i