From manningc2@actrix.gen.nz Mon Jan 11 21:42:01 2010
Received: from smtp.firstline.co.nz ([203.167.210.162] helo=firstline.co.nz)
	by stoneboat.aleph1.co.uk with smtp (Exim 4.69)
	(envelope-from <manningc2@actrix.gen.nz>) id 1NUS1G-0004pv-Jm
	for yaffs@lists.aleph1.co.uk; Mon, 11 Jan 2010 21:42:01 +0000
Received: (qmail 23586 invoked by uid 453); 11 Jan 2010 21:41:35 -0000
X-Virus-Checked: Checked by ClamAV on firstline.co.nz
Received: from Unknown (HELO linux-dual-head.local) (10.14.210.25)
	by firstline.co.nz (qpsmtpd/0.40) with ESMTP;
	Tue, 12 Jan 2010 10:41:35 +1300
From: Charles Manning <manningc2@actrix.gen.nz>
To: yaffs@lists.aleph1.co.uk
Date: Tue, 12 Jan 2010 10:41:27 +1300
User-Agent: KMail/1.9.10
References: <916127.95432.qm@web27308.mail.ukl.yahoo.com>
	<201001111241.47833.manningc2@actrix.gen.nz>
	<746190.66554.qm@web27307.mail.ukl.yahoo.com>
In-Reply-To: <746190.66554.qm@web27307.mail.ukl.yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Message-Id: <201001121041.27814.manningc2@actrix.gen.nz>
X-SA-Exim-Connect-IP: 203.167.210.162
X-SA-Exim-Mail-From: manningc2@actrix.gen.nz
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	stoneboat.aleph1.co.uk
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=4.5 tests=AWL,BAYES_00,SPF_NEUTRAL
	autolearn=no version=3.2.5
X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:14:11 +0000)
X-SA-Exim-Scanned: Yes (on stoneboat.aleph1.co.uk)
Subject: Re: [Yaffs] Error compiling on  yaffs_fs.c
X-BeenThere: yaffs@lists.aleph1.co.uk
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: Discussion of YAFFS NAND flash filesystem <yaffs.lists.aleph1.co.uk>
List-Unsubscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/options/yaffs>,
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=unsubscribe>
List-Archive: <http://lists.aleph1.co.uk/lurker/list/yaffs.html>
List-Post: <mailto:yaffs@lists.aleph1.co.uk>
List-Help: <mailto:yaffs-request@lists.aleph1.co.uk?subject=help>
List-Subscribe: <http://lists.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs>,
	<mailto:yaffs-request@lists.aleph1.co.uk?subject=subscribe>
X-List-Received-Date: Mon, 11 Jan 2010 21:42:02 -0000

On Monday 11 January 2010 21:32:08 Cristian Cudizio wrote:
> Da: Charles Manning <manningc2@actrix.gen.nz>
>
> A: yaffs@lists.aleph1.co.uk
> Cc: Cristian Cudizio <cristian.cudizio@yahoo.it>
> 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 >=3D 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=3D/home/oracle/yaffs/yaffs2
> clean make[1]: Entering directory
> `/usr/src/kernels/2.6.18-164.el5-xen-x86_64' CLEAN =20
> /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=3D/home/oracle/yaffs/yaffs2
> modules make[1]: Entering directory
> `/usr/src/kernels/2.6.18-164.el5-xen-x86_64' CC [M]=20
> /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
> =E2=80=98yaffs_commit_write=E2=80=99: /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
> =E2=80=98yaffs_FillInodeFromObject=E2=80=99: /home/oracle/yaffs/yaffs2/ya=
ffs_fs.c:1067:
> error: =E2=80=98struct inode=E2=80=99 has no member named =E2=80=98i_blks=
ize=E2=80=99
> /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 =E2=80=98yaffs_internal_read_super=E2=80=99:
> /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 =3D obj->yst_mode;
>                 inode->i_uid =3D obj->yst_uid;
>                 inode->i_gid =3D obj->yst_gid;
> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19))
> +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18))
>                 inode->i_blksize =3D 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: =E2=80=98struct iattr=E2=80=99 declared ins=
ide 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: =E2=80=98struct iattr=E2=80=99 declared inside parameter list mk=
yaffsimage.c:117:
> warning: =E2=80=98yaffs_CalcNameSum=E2=80=99 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: =E2=80=98struct iattr=E2=80=99 declared ins=
ide 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: =E2=80=98struct iattr=E2=80=99 declared inside parameter list In=
 file included
> from mkyaffs2image.c:35:
> ../yaffs_tagsvalidity.h:22: warning: redundant redeclaration of
> =E2=80=98yaffs_InitialiseTags=E2=80=99 ../yaffs_guts.h:904: warning: prev=
ious declaration
> of =E2=80=98yaffs_InitialiseTags=E2=80=99 was here mkyaffs2image.c: In fu=
nction
> =E2=80=98write_chunk=E2=80=99:
> mkyaffs2image.c:180: warning: passing argument 1 of =E2=80=98little_to_bi=
g_endian=E2=80=99
> from incompatible pointer type mkyaffs2image.c:185: warning: passing
> argument 1 of =E2=80=98yaffs_PackTags2=E2=80=99 from incompatible pointer=
 type
> mkyaffs2image.c:185: warning: passing argument 2 of =E2=80=98yaffs_PackTa=
gs2=E2=80=99 from
> incompatible pointer type mkyaffs2image.c:185: error: too few arguments to
> function =E2=80=98yaffs_PackTags2=E2=80=99 make: *** [mkyaffs2image.o] Er=
ror 1

Thanks for pointing out this issue. I shall fix it.

You don't need mkyaffs2image to run yaffs though, only to build images.
=2DCharles


