compile error in current git

Previous thread: [PATCH] driver: tcm825x - fix logical typo error by Cyrill Gorcunov on Friday, January 25, 2008 - 4:27 pm. (2 messages)

Next thread: [git pull] scheduler changes for v2.6.25 by Ingo Molnar on Friday, January 25, 2008 - 4:37 pm. (6 messages)
To: Greg KH <gregkh@...>
Cc: Linux Kernel Mailing List <linux-kernel@...>
Date: Friday, January 25, 2008 - 4:36 pm

When compiling current git with CONFIG_BLOCK disabled, I'm seeing this
compile error:

CC drivers/base/core.o
/home/jeremy/hg/xen/paravirt/linux/drivers/base/core.c: In function ‘device_add_class_symlinks’:
/home/jeremy/hg/xen/paravirt/linux/drivers/base/core.c:655: error: ‘part_type’ undeclared (first use in this function)
/home/jeremy/hg/xen/paravirt/linux/drivers/base/core.c:655: error: (Each undeclared identifier is reported only once
/home/jeremy/hg/xen/paravirt/linux/drivers/base/core.c:655: error: for each function it appears in.)
/home/jeremy/hg/xen/paravirt/linux/drivers/base/core.c: In function ‘device_remove_class_symlinks’:
/home/jeremy/hg/xen/paravirt/linux/drivers/base/core.c:728: error: ‘part_type’ undeclared (first use in this function)
make[4]: *** [drivers/base/core.o] Error 1

J
--

To: Jeremy Fitzhardinge <jeremy@...>, Randy Dunlap <rdunlap@...>
Cc: Linux Kernel Mailing List <linux-kernel@...>
Date: Friday, January 25, 2008 - 6:17 pm

Hm, I thought we fixed the CONFIG_BLOCK disabled issues with Randy's
older patch. Randy, wasn't this already addressed somehow?

Jeremy, do you have a .config I can use to try to duplicate and fix
this?

thanks,

greg k-h
--

To: Greg KH <gregkh@...>
Cc: Jeremy Fitzhardinge <jeremy@...>, Linux Kernel Mailing List <linux-kernel@...>
Date: Friday, January 25, 2008 - 7:00 pm

My earlier email fixed one problem but noted that there were

yes, please...

---
~Randy
--

To: Randy Dunlap <rdunlap@...>
Cc: Jeremy Fitzhardinge <jeremy@...>, Linux Kernel Mailing List <linux-kernel@...>
Date: Friday, January 25, 2008 - 7:11 pm

Ah, sorry, I missed that "note" :(

thanks,

greg 'time to get that make randconfig system up and working' k-h
--

To: Greg KH <gregkh@...>
Cc: Randy Dunlap <rdunlap@...>, Linux Kernel Mailing List <linux-kernel@...>
Date: Friday, January 25, 2008 - 7:24 pm

Here's a config that fails.

J

To: Jeremy Fitzhardinge <jeremy@...>
Cc: Greg KH <gregkh@...>, Randy Dunlap <rdunlap@...>, Linux Kernel Mailing List <linux-kernel@...>
Date: Saturday, January 26, 2008 - 5:14 am

Here's one possible fix. Please review.

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>

---

Index: linux-2.6/include/linux/genhd.h
===================================================================
--- linux-2.6.orig/include/linux/genhd.h
+++ linux-2.6/include/linux/genhd.h
@@ -12,6 +12,8 @@
#include <linux/types.h>
#include <linux/kdev_t.h>

+extern struct device_type part_type;
+
#ifdef CONFIG_BLOCK

#define kobj_to_dev(k) container_of(k, struct device, kobj)
@@ -19,7 +21,6 @@
#define dev_to_part(device) container_of(device, struct hd_struct, dev)

extern struct device_type disk_type;
-extern struct device_type part_type;
extern struct kobject *block_depr;
extern struct class block_class;

--

To: WANG Cong <xiyou.wangcong@...>
Cc: Jeremy Fitzhardinge <jeremy@...>, Randy Dunlap <rdunlap@...>, Linux Kernel Mailing List <linux-kernel@...>
Date: Sunday, January 27, 2008 - 3:40 pm

No, that will fix the build error, but die when linking :(

I'll work on a real fix for this now...

thanks,

greg k-h
--

To: Greg KH <gregkh@...>
Cc: WANG Cong <xiyou.wangcong@...>, Jeremy Fitzhardinge <jeremy@...>, Randy Dunlap <rdunlap@...>, Linux Kernel Mailing List <linux-kernel@...>
Date: Monday, January 28, 2008 - 1:19 am

Sorry.

I just compiled it since the building process was stopped
by another error.

--

Previous thread: [PATCH] driver: tcm825x - fix logical typo error by Cyrill Gorcunov on Friday, January 25, 2008 - 4:27 pm. (2 messages)

Next thread: [git pull] scheduler changes for v2.6.25 by Ingo Molnar on Friday, January 25, 2008 - 4:37 pm. (6 messages)