Re: [PATCH] kobject_uevent CONFIG_SYSFS=n build fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 14, 2006 at 11:11:00AM -0500, Jun'ichi Nomura wrote:
> Hello,
> 
> In 2.6.16-rc6 (probably in earlier rc as well),
> following build error occurs with CONFIG_SYSFS=n.
> 
> kernel/built-in.o(.data+0x1d40): undefined reference to `uevent_helper'
> lib/lib.a(kobject_uevent.o)(.text+0x5c1): In function `kobject_uevent':
> /build/rc6/source/lib/kobject_uevent.c:152: undefined reference to `uevent_seqnum'
> lib/lib.a(kobject_uevent.o)(.text+0x5d0):/build/rc6/source/lib/kobject_uevent.c:152: undefined reference to `uevent_seqnum'
> lib/lib.a(kobject_uevent.o)(.text+0x901):/build/rc6/source/lib/kobject_uevent.c:182: undefined reference to `uevent_helper'
> lib/lib.a(kobject_uevent.o)(.text+0x910):/build/rc6/source/lib/kobject_uevent.c:182: undefined reference to `uevent_helper'
> 
> This seems to be caused by mismatch of build condition.
> uevent_seqnum and uevent_helper are conditional to CONFIG_SYSFS.
> While they are referenced if CONFIG_HOTPLUG (and CONFIG_NET) is enabled.
> 
> Attached patch consolidates them to CONFIG_HOTPLUG && CONFIG_NET.
> 
> I tried with (!CONFIG_NET && CONFIG_SYSFS) and
> (CONFIG_NET && !CONFIG_SYSFS).
> Both built ok.
> So I think it doesn't conflict with "[PATCH] kobject_uevent CONFIG_NET=n
> fix" which is in 2.6.16-rc6.
> 
> Thanks,
> -- 
> Jun'ichi Nomura, NEC Solutions (America), Inc.

> CONFIG_SYSFS=n fails to build due to mismatch of conditions
> for uevent_seqnum and uevent_helper.
> 
> kernel/built-in.o(.data+0x1d40): undefined reference to `uevent_helper'
> lib/lib.a(kobject_uevent.o)(.text+0x5c1): In function `kobject_uevent':
> /build/rc6/source/lib/kobject_uevent.c:152: undefined reference to `uevent_seqnum'
> lib/lib.a(kobject_uevent.o)(.text+0x5d0):/build/rc6/source/lib/kobject_uevent.c:152: undefined reference to `uevent_seqnum'
> lib/lib.a(kobject_uevent.o)(.text+0x901):/build/rc6/source/lib/kobject_uevent.c:182: undefined reference to `uevent_helper'
> lib/lib.a(kobject_uevent.o)(.text+0x910):/build/rc6/source/lib/kobject_uevent.c:182: undefined reference to `uevent_helper'
> 
> Signed-off-by: Jun'ichi Nomura <[email protected]>
> 
> 
> --- linux-2.6.16-rc6.orig/lib/kobject_uevent.c	2006-03-14 08:57:23.000000000 -0500
> +++ linux-2.6.16-rc6/lib/kobject_uevent.c	2006-03-14 08:52:57.000000000 -0500
> @@ -26,6 +26,9 @@
>  #define NUM_ENVP	32	/* number of env pointers */
>  
>  #if defined(CONFIG_HOTPLUG) && defined(CONFIG_NET)
> +u64 uevent_seqnum;
> +char uevent_helper[UEVENT_HELPER_PATH_LEN] = "/sbin/hotplug";

No, the seqnum and helper can be called even if we have not defined
CONFIG_NET.  Please redo the patch based on this.

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux