AnoopPuthanveetil / yaffs2utils

Automatically exported from code.google.com/p/yaffs2utils
GNU General Public License v2.0
0 stars 1 forks source link

Doesn't compile properly on Mac OSX #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
First, whether you do these defines, or not

 #DEFINE __APPLE__ 
 #DEFINE __MACH__

inside of configs.h

and then do a "make", you still get the same error message.

What is the expected output? What do you see instead?

In file included from yaffs2/yaffs_packedtags1.h:21,
                 from yaffs2/yaffs_packedtags1.c:16:
yaffs2/yaffs_guts.h:135: error: expected specifier-qualifier-list before 
‘loff_t’
make: *** [yaffs2/yaffs_packedtags1.o] Error 1

What version of the product are you using? On what operating system?
Mac OS X 10.7.3

Please provide any additional information below.

Original issue reported on code.google.com by ronaldj...@gmail.com on 11 Apr 2012 at 8:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Would you kindly try the attached patch to solve the issue?
If it is works, I will add this fix into the next release.

Thanks a lot.

Original comment by penguin.lin on 12 Apr 2012 at 6:20

Attachments:

GoogleCodeExporter commented 9 years ago
I applied the patches manually. I think they took; however, still get errors, 
but different ones.  Appears related to a missing file?  See below:

gcc -I. -I./yaffs2 -O2 -Wall -Wshadow -Winline -Wpointer-arith -Wnested-externs 
-Wwrite-strings -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes 
-Wredundant-decls  -D_HAVE_MMAP   -c -o mkyaffs2.o mkyaffs2.c
In file included from mkyaffs2.c:41:
yaffs2utils_ecc.h:22:26: error: mtd/mtd-user.h: No such file or directory
In file included from mkyaffs2.c:41:
yaffs2utils_ecc.h:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘nand_oob_16’
yaffs2utils_ecc.h:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘nand_oob_64’
yaffs2utils_ecc.h:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘nand_oob_user’
mkyaffs2.c:129: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or 
‘__attribute__’ before ‘*’ token
mkyaffs2.c: In function ‘mkyaffs2_tag2spare’:
mkyaffs2.c:315: error: ‘mkyaffs2_oobinfo’ undeclared (first use in this 
function)
mkyaffs2.c:315: error: (Each undeclared identifier is reported only once
mkyaffs2.c:315: error: for each function it appears in.)
mkyaffs2.c:317: error: ‘MTD_MAX_OOBFREE_ENTRIES’ undeclared (first use in 
this function)
mkyaffs2.c:319: error: invalid use of undefined type ‘struct nand_oobfree’
mkyaffs2.c:319: error: invalid use of undefined type ‘struct nand_oobfree’
mkyaffs2.c:321: error: invalid use of undefined type ‘struct nand_oobfree’
mkyaffs2.c:321: error: invalid use of undefined type ‘struct nand_oobfree’
mkyaffs2.c:322: error: invalid use of undefined type ‘struct nand_oobfree’
mkyaffs2.c:322: error: invalid use of undefined type ‘struct nand_oobfree’
mkyaffs2.c: In function ‘mkyaffs2_load_spare’:
mkyaffs2.c:822: error: ‘nand_oob_user’ undeclared (first use in this 
function)
mkyaffs2.c:822: error: ‘nand_ecclayout_t’ undeclared (first use in this 
function)
mkyaffs2.c: In function ‘main’:
mkyaffs2.c:980: error: ‘mkyaffs2_oobinfo’ undeclared (first use in this 
function)
mkyaffs2.c:980: error: ‘nand_oob_16’ undeclared (first use in this function)
mkyaffs2.c:986: error: ‘nand_oob_64’ undeclared (first use in this function)
mkyaffs2.c:1003: error: ‘nand_oob_user’ undeclared (first use in this 
function)
make: *** [mkyaffs2.o] Error 1

Original comment by ronaldj...@gmail.com on 13 Apr 2012 at 3:23

GoogleCodeExporter commented 9 years ago
It's because OSX does NOT have "mtd/mtd-user.h".
I think you can use the headers from your target's toolchain.
In the future release, I will think whether these are required or not!

Original comment by penguin.lin on 13 Apr 2012 at 4:06

GoogleCodeExporter commented 9 years ago
Dear :

Would you try adding the attached file "yaffs2utils_mtd.h" into src, and 
patching the "fix_osx_broken_mtd_h.pach". If it can solve your problem, I will 
add them into the next release.

Thanks a lot!

Original comment by penguin.lin on 16 Apr 2012 at 7:00

Attachments:

GoogleCodeExporter commented 9 years ago
Dear ronaldj100:

Any repose?

The latest version on the trunk contains patches in this issue.
It fix the loff_t issue on MAC OSX, and it use "yaffs2utils_mtd.h" as the 
replacement of "mtd/mtd-user.h" on the MAC OSX. I hope the new version can 
solve your problem.

I would be glad to receive any response.

Thanks a lot.

Original comment by penguin.lin on 17 Apr 2012 at 8:36

GoogleCodeExporter commented 9 years ago
If there are no other response, I will close this issue and set as won't fix.

Original comment by penguin.lin on 27 Jun 2012 at 8:57

GoogleCodeExporter commented 9 years ago

Original comment by penguin.lin on 27 Jun 2012 at 9:17

GoogleCodeExporter commented 9 years ago
In FreeBSD this error too/

Original comment by cellphon...@gmail.com on 2 Apr 2014 at 11:40