Re: patching kdb to Centos kernel : error
"Satish Eerpini" <[email protected]> Wed, 20 Aug 2008 23:43:56 +0530
| Newsgroups | gmane.linux.kernel.debugging |
|---|---|
| Message-ID | <[email protected]> |
On 8/18/08, jidong xiao <[email protected]> wrote: > On Mon, Aug 18, 2008 at 3:24 AM, Satish Eerpini <[email protected]> wrote: >> hi everyone , i was trying to patch kdb with CentOS 5.0 kernel >> (2.6.18-8) , and had a few rejects ( which i am still trying to >> resolve) ,.... but apart from the rejects during the kernel >> compilation i got the following error which does not seem to have >> anything to do with the rejects ............ >> i have got an error in a kdb module, which has nothing to do with the >> rejected patches ( or so i guess ) : >> >> kdb/modules/kdbm_pg.c: In function 'kdbm_show_page': >> kdb/modules/kdbm_pg.c:349: error: implicit declaration >> of function 'PageChecked' >> kdb/modules/kdbm_pg.c: In function 'kdbm_inode': >> kdb/modules/kdbm_pg.c:507: error: 'struct inode' has no >> member named 'u' >> >> the code(in kdb/modules/kdbm_pg.c) which is causing the second error >> is something like this : >> >> iaddr += offsetof(struct inode, u); >> >> what i am not able to understand is that if 'u' is not a correct >> member of the inode , .. then what did they( whoever wrote this piece >> code) intend by 'u' ? , ..... >> >> .... >> and for the first error , ... i just checked out the code .... >> according to the line no shown in the error .....the code is : >> >> kdb_page_flags(page, Checked); >> >> and i don't see any function PageChecked ....! so what can the error >> actually mean ?? >> >> Thanks in advance >> Satish >> >> -- > Well I think people usually don't use KDB modules, so you can simply > disable KDB modules by setting CONFIG_KDB_MODULES=n. This can avoid > the two errors you mentioned. > > Regarding your second error, you can replace "u" with "i_private". > > iaddr += offsetof(struct inode, i_private); > > As to the first error, you can refer to the definition of > kdb_page_flags, which explains your question. > > #define kdb_page_flags(page, type) if (Page ## type(page)) > kdb_printf(" " #type); > > > Regards > Jason > hi jason , i have fixed those errors , .... i changed the u to i_private in the second error and then completely commented out the following line from the kdbm_pg.c file : kdb_page_flags(page, Checked); // on line 349 this solved the first error about the implicit function declaration , ... after this the compilation went on fine , .... but at the stage where the vmlinux file is linked i have some gcc specific errors ( or so it seems from what i have got on google searches ) , ........ here is a short part of the errors : CHK include/linux/version.h CHK include/linux/utsrelease.h CHK include/linux/compile.h GEN .version CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD .tmp_vmlinux1 kernel/built-in.o: In function `timespec_add_ns': /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i386/include/linux/time.h:175: undefined reference to `__umoddi3' kernel/built-in.o: In function `do_gettimeofday': /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i386/kernel/timer.c:865: undefined reference to `__udivdi3' /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i386/kernel/timer.c:866: undefined reference to `__umoddi3' kernel/built-in.o: In function `timespec_add_ns': /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i386/include/linux/time.h:170: undefined reference to `__udivdi3' /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i386/include/linux/time.h:175: undefined reference to `__umoddi3' ^Cmake: *** Deleting file `.tmp_vmlinux1' make: *** [.tmp_vmlinux1] Interrupt can u make anything out of it ? , ... i checked both time.h and timer.c , something appears to be fussy in struct timesoec , but i am not proficient enough to see what it is ? Thanks Satish -- http://satish.playdrupal.com --------------------------- Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.