Da: Charles Manning A: yaffs@lists.aleph1.co.uk Cc: Cristian Cudizio Inviato: Lun 11 gennaio 2010, 00:41:47 Oggetto: Re: [Yaffs] Error compiling on yaffs_fs.c On Saturday 09 January 2010 04:11:25 Cristian Cudizio wrote: > Hi, > i've downloaded via CVS yaffs2 sources on a Oracle Enterprise Linux 5U4 > (equal to RH 5U4) > > but i've this errors on compilation : > include/linux/config.h:6:2: warning: #warning Including config.h is .... > What i'm missing? This will be due to some backporting messing up the conditional compilation. Try changing this: --- yaffs_fs.c~ 2010-01-11 12:39:36.000000000 +1300 +++ yaffs_fs.c 2010-01-11 12:39:36.000000000 +1300 @@ -151,7 +151,7 @@ /*#define T(x) printk x */ -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18)) #define yaffs_InodeToObjectLV(iptr) ((iptr)->i_private) #else #define yaffs_InodeToObjectLV(iptr) ((iptr)->u.generic_ip) There might be some other oddities too. -- Charles Thanks a lot, with that change i've got: [oracle@oel54test11gR201 yaffs2]$ make clean make -C /lib/modules/2.6.18-164.el5xen/build M=/home/oracle/yaffs/yaffs2 clean make[1]: Entering directory `/usr/src/kernels/2.6.18-164.el5-xen-x86_64' CLEAN /home/oracle/yaffs/yaffs2/.tmp_versions make[1]: Leaving directory `/usr/src/kernels/2.6.18-164.el5-xen-x86_64' [oracle@oel54test11gR201 yaffs2]$ make make -C /lib/modules/2.6.18-164.el5xen/build M=/home/oracle/yaffs/yaffs2 modules make[1]: Entering directory `/usr/src/kernels/2.6.18-164.el5-xen-x86_64' CC [M] /home/oracle/yaffs/yaffs2/yaffs_mtdif.o In file included from /home/oracle/yaffs/yaffs2/yportenv.h:42, from /home/oracle/yaffs/yaffs2/yaffs_mtdif.c:17: include/linux/config.h:6:2: warning: #warning Including config.h is deprecated. CC [M] /home/oracle/yaffs/yaffs2/yaffs_mtdif2.o In file included from /home/oracle/yaffs/yaffs2/yportenv.h:42, from /home/oracle/yaffs/yaffs2/yaffs_mtdif2.c:19: include/linux/config.h:6:2: warning: #warning Including config.h is deprecated. CC [M] /home/oracle/yaffs/yaffs2/yaffs_mtdif1.o In file included from /home/oracle/yaffs/yaffs2/yportenv.h:42, from /home/oracle/yaffs/yaffs2/yaffs_mtdif1.c:26: include/linux/config.h:6:2: warning: #warning Including config.h is deprecated. CC [M] /home/oracle/yaffs/yaffs2/yaffs_packedtags1.o In file included from /home/oracle/yaffs/yaffs2/yportenv.h:42, from /home/oracle/yaffs/yaffs2/yaffs_guts.h:20, from /home/oracle/yaffs/yaffs2/yaffs_packedtags1.h:21, from /home/oracle/yaffs/yaffs2/yaffs_packedtags1.c:14: include/linux/config.h:6:2: warning: #warning Including config.h is deprecated. CC [M] /home/oracle/yaffs/yaffs2/yaffs_ecc.o In file included from /home/oracle/yaffs/yaffs2/yportenv.h:42, from /home/oracle/yaffs/yaffs2/yaffs_ecc.c:34: include/linux/config.h:6:2: warning: #warning Including config.h is deprecated. CC [M] /home/oracle/yaffs/yaffs2/yaffs_fs.o In file included from /home/oracle/yaffs/yaffs2/yaffs_fs.c:40: include/linux/config.h:6:2: warning: #warning Including config.h is deprecated. /home/oracle/yaffs/yaffs2/yaffs_fs.c: In function ‘yaffs_commit_write’: /home/oracle/yaffs/yaffs2/yaffs_fs.c:995: warning: cast from pointer to integer of different size /home/oracle/yaffs/yaffs2/yaffs_fs.c: In function ‘yaffs_FillInodeFromObject’: /home/oracle/yaffs/yaffs2/yaffs_fs.c:1067: error: ‘struct inode’ has no member named ‘i_blksize’ /home/oracle/yaffs/yaffs2/yaffs_fs.c:1105: warning: assignment discards qualifiers from pointer target type /home/oracle/yaffs/yaffs2/yaffs_fs.c:1111: warning: assignment discards qualifiers from pointer target type /home/oracle/yaffs/yaffs2/yaffs_fs.c:1115: warning: assignment discards qualifiers from pointer target type /home/oracle/yaffs/yaffs2/yaffs_fs.c: In function ‘yaffs_internal_read_super’: /home/oracle/yaffs/yaffs2/yaffs_fs.c:2064: warning: assignment discards qualifiers from pointer target type /home/oracle/yaffs/yaffs2/yaffs_fs.c:2348: warning: assignment discards qualifiers from pointer target type make[2]: *** [/home/oracle/yaffs/yaffs2/yaffs_fs.o] Error 1 make[1]: *** [_module_/home/oracle/yaffs/yaffs2] Error 2 make[1]: Leaving directory `/usr/src/kernels/2.6.18-164.el5-xen-x86_64' make: *** [modules] Error 2 so, i've applyed this: @@ -1063,7 +1063,7 @@ static void yaffs_FillInodeFromObject(st inode->i_mode = obj->yst_mode; inode->i_uid = obj->yst_uid; inode->i_gid = obj->yst_gid; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)) inode->i_blksize = inode->i_sb->s_blocksize; #endif #if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)) And module compilation succeds, but i've this error on utils/ compilation: [oracle@oel54test11gR201 utils]$ make ln -s ../yaffs_ecc.c yaffs_ecc.c gcc -c -I/usr/include -I.. -O2 -Wall -DCONFIG_YAFFS_UTIL -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline yaffs_ecc.c -o yaffs_ecc.o gcc -c -I/usr/include -I.. -O2 -Wall -DCONFIG_YAFFS_UTIL -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline mkyaffsimage.c -o mkyaffsimage.o In file included from mkyaffsimage.c:31: ../yaffs_guts.h:838: warning: ‘struct iattr’ declared inside parameter list ../yaffs_guts.h:838: warning: its scope is only this definition or declaration, which is probably not what you want ../yaffs_guts.h:839: warning: ‘struct iattr’ declared inside parameter list mkyaffsimage.c:117: warning: ‘yaffs_CalcNameSum’ defined but not used gcc -o mkyaffsimage yaffs_ecc.o mkyaffsimage.o gcc -c -I/usr/include -I.. -O2 -Wall -DCONFIG_YAFFS_UTIL -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline mkyaffs2image.c -o mkyaffs2image.o In file included from mkyaffs2image.c:33: ../yaffs_guts.h:838: warning: ‘struct iattr’ declared inside parameter list ../yaffs_guts.h:838: warning: its scope is only this definition or declaration, which is probably not what you want ../yaffs_guts.h:839: warning: ‘struct iattr’ declared inside parameter list In file included from mkyaffs2image.c:35: ../yaffs_tagsvalidity.h:22: warning: redundant redeclaration of ‘yaffs_InitialiseTags’ ../yaffs_guts.h:904: warning: previous declaration of ‘yaffs_InitialiseTags’ was here mkyaffs2image.c: In function ‘write_chunk’: mkyaffs2image.c:180: warning: passing argument 1 of ‘little_to_big_endian’ from incompatible pointer type mkyaffs2image.c:185: warning: passing argument 1 of ‘yaffs_PackTags2’ from incompatible pointer type mkyaffs2image.c:185: warning: passing argument 2 of ‘yaffs_PackTags2’ from incompatible pointer type mkyaffs2image.c:185: error: too few arguments to function ‘yaffs_PackTags2’ make: *** [mkyaffs2image.o] Error 1 Regards, Cristian