forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

libjpeg src prob parse errors

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
cory1492



Joined: 10 Dec 2004
Posts: 216

PostPosted: Fri Mar 11, 2005 1:19 am    Post subject: libjpeg src prob parse errors Reply with quote

Lots of em too, any ideas on why this would be doing something like this? (this is straight from CVS so I am not sure if it was ever completed or not)

Code:
Cory@home /usr/local/ps2dev/ps2sdk-ports/libjpeg
$ make
make -C src
make[1]: Entering directory `/usr/local/ps2dev/ps2sdk-ports/libjpeg/src'
ee-gcc -D_EE -O2 -G0 -Wall  -I/usr/local/ps2dev/ps2sdk/ee/include -I/usr/local/p
s2dev/ps2sdk/common/include -I. -I../include -c jcapimin.c -o jcapimin.o
In file included from jcapimin.c:39:
jinclude.h:177: parse error before "size_t"
In file included from jcapimin.c:41:
../include/jpeglib.h:137: parse error before '*' token
../include/jpeglib.h:137: warning: type defaults to `int' in declaration of `JSAMPROW'
../include/jpeglib.h:137: warning: data definition has no type or storage class
../include/jpeglib.h:139: parse error before '*' token
../include/jpeglib.h:139: warning: type defaults to `int' in declaration of `JSAMPARRAY'
../include/jpeglib.h:139: warning: data definition has no type or storage class
../include/jpeglib.h:141: parse error before '*' token
../include/jpeglib.h:141: warning: type defaults to `int' in declaration of `JSAMPIMAGE'
../include/jpeglib.h:141: warning: data definition has no type or storage class
../include/jpeglib.h:511: syntax error before "struct"
../include/jpeglib.h:963: parse error before "JSAMPARRAY"
../include/jpeglib.h:963: warning: no semicolon at end of struct or union
../include/jpeglib.h:1183: parse error before '*' token
../include/jpeglib.h:1183: warning: type defaults to `int' in declaration of `sample_range_limit'
../include/jpeglib.h:1183: warning: data definition has no type or storage class
../include/jpeglib.h:1245: warning: `main' is usually a function
../include/jpeglib.h:1265: parse error before '}' token
../include/jpeglib.h:1533: parse error before "JSAMPARRAY"
../include/jpeglib.h:1533: warning: no semicolon at end of struct or union
../include/jpeglib.h:1575: parse error before '*' token
../include/jpeglib.h:1575: warning: type defaults to `int' in declaration of `JSAMPARRAY'
../include/jpeglib.h:1575: `JSAMPARRAY' declared as function returning a function
../include/jpeglib.h:1575: `JSAMPARRAY' redeclared as different kind of symbol
../include/jpeglib.h:139: previous declaration of `JSAMPARRAY'
../include/jpeglib.h:1575: warning: data definition has no type or storage class
../include/jpeglib.h:1611: parse error before '}' token
../include/jpeglib.h:1795: parse error before '(' token
../include/jpeglib.h:1795: warning: type defaults to `int' in declaration of `jpeg_CreateCompress'
../include/jpeglib.h:1885: parse error before "JSAMPARRAY"
../include/jpeglib.h:1897: parse error before "JSAMPIMAGE"
../include/jpeglib.h:1961: parse error before "JSAMPARRAY"
../include/jpeglib.h:1973: parse error before "JSAMPIMAGE"
In file included from ../include/jpeglib.h:2189,
                 from jcapimin.c:41:
jpegint.h:113: parse error before "JSAMPARRAY"
jpegint.h:137: parse error before "JSAMPARRAY"
jpegint.h:151: parse error before "JSAMPIMAGE"
jpegint.h:167: parse error before "JSAMPARRAY"
jpegint.h:185: parse error before "JSAMPIMAGE"
jpegint.h:211: parse error before "JSAMPARRAY"
jpegint.h:317: parse error before "JSAMPARRAY"
jpegint.h:335: parse error before "JSAMPIMAGE"
jpegint.h:363: parse error before "JSAMPIMAGE"
jpegint.h:439: parse error before "JSAMPARRAY"
jpegint.h:473: parse error before "JSAMPIMAGE"
jpegint.h:493: parse error before "JSAMPIMAGE"
jpegint.h:509: parse error before "JSAMPARRAY"
jpegint.h:743: parse error before "input_array"
In file included from ../include/jpeglib.h:2191,
                 from jcapimin.c:41:
jerror.h:411: parse error before '->' token
jerror.h:535: warning: type defaults to `int' in declaration of `_mp'
jerror.h:535: `p1' undeclared here (not in a function)
jerror.h:535: warning: data definition has no type or storage class
jerror.h:535: warning: type defaults to `int' in declaration of `_mp'
jerror.h:535: conflicting types for `_mp'
jerror.h:535: previous declaration of `_mp'
jerror.h:535: `p2' undeclared here (not in a function)
jerror.h:535: warning: data definition has no type or storage class
jerror.h:535: warning: type defaults to `int' in declaration of `_mp'
jerror.h:535: conflicting types for `_mp'
jerror.h:535: previous declaration of `_mp'
jerror.h:535: `p3' undeclared here (not in a function)
jerror.h:535: warning: data definition has no type or storage class
jerror.h:535: parse error before '->' token
jerror.h:535: parse error before '->' token
jerror.h:545: warning: type defaults to `int' in declaration of `_mp'
jerror.h:545: conflicting types for `_mp'
jerror.h:535: previous declaration of `_mp'
jerror.h:545: `p1' undeclared here (not in a function)
jerror.h:545: warning: data definition has no type or storage class
jerror.h:545: warning: type defaults to `int' in declaration of `_mp'
jerror.h:545: conflicting types for `_mp'
jerror.h:545: previous declaration of `_mp'
jerror.h:545: `p2' undeclared here (not in a function)
jerror.h:545: warning: data definition has no type or storage class
jerror.h:545: warning: type defaults to `int' in declaration of `_mp'
jerror.h:545: conflicting types for `_mp'
jerror.h:545: previous declaration of `_mp'
jerror.h:545: `p3' undeclared here (not in a function)
jerror.h:545: warning: data definition has no type or storage class
jerror.h:545: warning: type defaults to `int' in declaration of `_mp'
jerror.h:545: conflicting types for `_mp'
jerror.h:545: previous declaration of `_mp'
jerror.h:545: `p4' undeclared here (not in a function)
jerror.h:545: warning: data definition has no type or storage class
jerror.h:545: parse error before '->' token
jerror.h:545: parse error before '->' token
jerror.h:557: warning: type defaults to `int' in declaration of `_mp'
jerror.h:557: conflicting types for `_mp'
jerror.h:545: previous declaration of `_mp'
jerror.h:557: `p1' undeclared here (not in a function)
jerror.h:557: warning: data definition has no type or storage class
jerror.h:557: warning: type defaults to `int' in declaration of `_mp'
jerror.h:557: conflicting types for `_mp'
jerror.h:557: previous declaration of `_mp'
jerror.h:557: `p2' undeclared here (not in a function)
jerror.h:557: warning: data definition has no type or storage class
jerror.h:557: warning: type defaults to `int' in declaration of `_mp'
jerror.h:557: conflicting types for `_mp'
jerror.h:557: previous declaration of `_mp'
jerror.h:557: `p3' undeclared here (not in a function)
jerror.h:557: warning: data definition has no type or storage class
jerror.h:557: warning: type defaults to `int' in declaration of `_mp'
jerror.h:557: conflicting types for `_mp'
jerror.h:557: previous declaration of `_mp'
jerror.h:557: `p4' undeclared here (not in a function)
jerror.h:557: warning: data definition has no type or storage class
jerror.h:557: warning: type defaults to `int' in declaration of `_mp'
jerror.h:557: conflicting types for `_mp'
jerror.h:557: previous declaration of `_mp'
jerror.h:557: `p5' undeclared here (not in a function)
jerror.h:557: warning: data definition has no type or storage class
jerror.h:557: parse error before '->' token
jerror.h:557: parse error before '->' token
jerror.h:569: warning: type defaults to `int' in declaration of `_mp'
jerror.h:569: conflicting types for `_mp'
jerror.h:557: previous declaration of `_mp'
jerror.h:569: `p1' undeclared here (not in a function)
jerror.h:569: warning: data definition has no type or storage class
jerror.h:569: warning: type defaults to `int' in declaration of `_mp'
jerror.h:569: conflicting types for `_mp'
jerror.h:569: previous declaration of `_mp'
jerror.h:569: `p2' undeclared here (not in a function)
jerror.h:569: warning: data definition has no type or storage class
jerror.h:569: warning: type defaults to `int' in declaration of `_mp'
jerror.h:569: conflicting types for `_mp'
jerror.h:569: previous declaration of `_mp'
jerror.h:569: `p3' undeclared here (not in a function)
jerror.h:569: warning: data definition has no type or storage class
jerror.h:569: warning: type defaults to `int' in declaration of `_mp'
jerror.h:569: conflicting types for `_mp'
jerror.h:569: previous declaration of `_mp'
jerror.h:569: `p4' undeclared here (not in a function)
jerror.h:569: warning: data definition has no type or storage class
jerror.h:569: warning: type defaults to `int' in declaration of `_mp'
jerror.h:569: conflicting types for `_mp'
jerror.h:569: previous declaration of `_mp'
jerror.h:569: `p5' undeclared here (not in a function)
jerror.h:569: warning: data definition has no type or storage class
jerror.h:569: warning: type defaults to `int' in declaration of `_mp'
jerror.h:569: conflicting types for `_mp'
jerror.h:569: previous declaration of `_mp'
jerror.h:569: `p6' undeclared here (not in a function)
jerror.h:569: warning: data definition has no type or storage class
jerror.h:569: warning: type defaults to `int' in declaration of `_mp'
jerror.h:569: conflicting types for `_mp'
jerror.h:569: previous declaration of `_mp'
jerror.h:569: `p7' undeclared here (not in a function)
jerror.h:569: warning: data definition has no type or storage class
jerror.h:569: warning: type defaults to `int' in declaration of `_mp'
jerror.h:569: conflicting types for `_mp'
jerror.h:569: previous declaration of `_mp'
jerror.h:569: `p8' undeclared here (not in a function)
jerror.h:569: warning: data definition has no type or storage class
jerror.h:569: parse error before '->' token
jerror.h:569: parse error before '->' token
jcapimin.c:99: `cinfo' undeclared here (not in a function)
jcapimin.c:101: parse error before '(' token
jcapimin.c:101: warning: type defaults to `int' in declaration of `memset'
jcapimin.c:101: warning: parameter names (without types) in function declaration

jcapimin.c:101: `memset' declared as function returning a function
jcapimin.c:101: parse error before numeric constant
jcapimin.c:115: parse error before '(' token
jcapimin.c: In function `jpeg_finish_compress':
jcapimin.c:301: structure has no member named `global_state'
jcapimin.c:303: structure has no member named `global_state'
jcapimin.c:313: structure has no member named `global_state'
jcapimin.c:325: structure has no member named `progress'
jcapimin.c:327: structure has no member named `progress'
jcapimin.c:329: structure has no member named `progress'
jcapimin.c:331: structure has no member named `progress'
jcapimin.c:341: called object is not a function
jcapimin.c: In function `jpeg_write_marker':
jcapimin.c:395: structure has no member named `global_state'
jcapimin.c:397: structure has no member named `global_state'
jcapimin.c:399: structure has no member named `global_state'
jcapimin.c: In function `jpeg_write_m_header':
jcapimin.c:433: structure has no member named `global_state'
jcapimin.c:435: structure has no member named `global_state'
jcapimin.c:437: structure has no member named `global_state'
jcapimin.c: In function `jpeg_write_tables':
jcapimin.c:511: structure has no member named `global_state'
jcapimin.c:519: structure has no member named `err'
make[1]: *** [jcapimin.o] Error 1
make[1]: Leaving directory `/usr/local/ps2dev/ps2sdk-ports/libjpeg/src'
make: *** [all-src] Error 2


also had this problem with libpng:
Code:
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \

    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)

#  ifndef PNG_NO_USER_TRANSFORM_PTR

taking out the \ , CRs and extra spaces resolved the issue for the most part at any rate.

Could these be a problem with my local install of the GCC/SDK?

Also, I think there is a redundancy in the sdk/toolchain:
Code:
/usr/local/ps2dev/ps2sdk/ee/include/time.h:17: warning: redefinition of `clock_t'
/usr/local/ps2dev/ee/ee/sys-include/sys/types.h:66: warning: `clock_t' previously declared here
Back to top
View user's profile Send private message
evilo



Joined: 22 Apr 2004
Posts: 230

PostPosted: Fri Mar 11, 2005 1:49 am    Post subject: Reply with quote

concerning libpng, the port is complete and working, and I have it compiling fine under cygwin and using gcc 3.2.2, and without any warning/errors about the "\"..

I know that multi-line is deprecated in gcc, but as it was working as it for me, I don't know why you have that error... which version of GCC do you use ?
Back to top
View user's profile Send private message Visit poster's website
cory1492



Joined: 10 Dec 2004
Posts: 216

PostPosted: Fri Mar 11, 2005 2:13 am    Post subject: libpng fixed for cygwin/toolchain Reply with quote

using "gcc -v" gcc version 3.3.3 (cygwin special)
Code:
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/specs
Configured with: /gcc/gcc-3.3.3-3/configure --verbose --prefix=/usr --exec-prefi
x=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/s
hare/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,java,objc,
pascal --enable-nls --without-included-gettext --enable-libgcj --with-system-zli
b --enable-interpreter --enable-threads=posix --enable-java-gc=boehm --enable-sj
lj-exceptions --disable-version-specific-runtime-libs --disable-win32-registry
Thread model: posix
gcc version 3.3.3 (cygwin special)

Do you think I should use 3.2.2 with a clean cygwin/toolchain install instead? It may resolve the other problems I was having ("forgot" that some of this is still partially done without the ps2 toolchain)

At any rate, I went through the entire libpng and fixed the nothing after || and nothing after && errors I was getting, here is a copy (I tested it on a ps2v9 with a 255kb test file)- also I modded the makefile to point to the ports dir in the sdk for zlib, as well as including a install section in the makefile.

Many files were changed to fix the above error, Id give you a diff file but Im not able to get diff to output anything useful for me just yet (my next learning experience I guess...)

fixed up libpng rar'd
Back to top
View user's profile Send private message
cory1492



Joined: 10 Dec 2004
Posts: 216

PostPosted: Fri Mar 11, 2005 2:26 am    Post subject: Reply with quote

hrrm, wonder if that could be the reason my ee-objdump gives no info on disassembly of something I built with the ee toolchain...

Code:
$ ee-objdump -d syscall.elf
syscall.elf:     file format elf32-littlemips

Disassembly of section .text:

00100000 <_ftext>:
  100000:   e0 ff bd 27    *unknown*
  100004:   10 00 02 3c    *unknown*
  100008:   10 00 bf ff    *unknown*
  10000c:   00 00 b0 ff    *unknown*
  100010:   00 68 43 90    *unknown*
  100014:   0f 00 60 14    *unknown*
  100018:   10 00 10 3c    *unknown*
  10001c:   04 5a 02 8e    *unknown*
etc. --> always *unknown*
Back to top
View user's profile Send private message
evilo



Joined: 22 Apr 2004
Posts: 230

PostPosted: Fri Mar 11, 2005 2:33 am    Post subject: Reply with quote

since the GCC patches are made for the GCC 3.2.2... yes definitely !
Back to top
View user's profile Send private message Visit poster's website
cory1492



Joined: 10 Dec 2004
Posts: 216

PostPosted: Fri Mar 11, 2005 3:15 am    Post subject: Reply with quote

hrmm, the 3.2.2 is no longer available to the cygwin installer as far as I can tell. I bet that would resolve all the problems Im having right now though :)

arent the patches done to 3.2.2 to get the toolchain ee-gcc and iop-gcc only though?
Quote:
$ ee-gcc -v
Reading specs from /usr/local/ps2dev/ee/lib/gcc-lib/ee/3.2.2/specs
Configured with: ../configure --prefix=/usr/local/ps2dev/ee --target=ee --enable
-languages=c,c++ --with-newlib --with-headers=/usr/local/ps2dev/ee/ee/include --
enable-cxx-flags=-G0
Thread model: single
gcc version 3.2.2

$ iop-gcc -v
Reading specs from /usr/local/ps2dev/iop/lib/gcc-lib/iop/3.2.2/specs
Configured with: ../configure --prefix=/usr/local/ps2dev/iop --target=iop --enab
le-languages=c --with-newlib --without-headers
Thread model: single
gcc version 3.2.2


Last edited by cory1492 on Fri Mar 11, 2005 3:19 am; edited 1 time in total
Back to top
View user's profile Send private message
evilo



Joined: 22 Apr 2004
Posts: 230

PostPosted: Fri Mar 11, 2005 3:19 am    Post subject: Reply with quote

use the oopo script : http://www.oopo.net/consoledev/

it will download & install everything you need (including gcc)

be sure to have wget and cvs installed (check the cygwin packages)

good work !
Back to top
View user's profile Send private message Visit poster's website
cory1492



Joined: 10 Dec 2004
Posts: 216

PostPosted: Fri Mar 11, 2005 3:20 am    Post subject: Reply with quote

see above evilo, thanks for helping out BTW

using up to date cygwin with the toolchain installed by oopos script, perhaps I should not install the gcc when I install cygwin?
Back to top
View user's profile Send private message
evilo



Joined: 22 Apr 2004
Posts: 230

PostPosted: Fri Mar 11, 2005 3:27 am    Post subject: Reply with quote

ohh.. yes, you have gcc 3.2.2 patched already ;)

so no, you don't need it install it from cygwin, since concerning the PS2, the oopo script will download it from gnu and install/patch it.. !

be sure to compile with ee-gcc (if you target the EE) and not gcc ... , see makefile in the SDK for proper examples...

[EDIT]
just readed again your first post.. and everything is fine...
I just got confused after when you mentioned gcc 3.3.3 and thougth you made some kind of custom install !
Back to top
View user's profile Send private message Visit poster's website
cory1492



Joined: 10 Dec 2004
Posts: 216

PostPosted: Fri Mar 11, 2005 3:30 am    Post subject: Reply with quote

could that be the problem then, some of libpng is compiling under gcc 3.3.3 and the rest under ee-gcc?

It works fine now with those \ taken out but I have been having other problems that just seem odd to me...

custom install, rofl - Im not that good yet :)
Back to top
View user's profile Send private message
mharris



Joined: 25 Jan 2004
Posts: 155
Location: Annapolis, MD, USA

PostPosted: Fri Mar 11, 2005 8:48 am    Post subject: Reply with quote

cory1492 wrote:
hrrm, wonder if that could be the reason my ee-objdump gives no info on disassembly of something I built with the ee toolchain...

Code:
$ ee-objdump -d syscall.elf
syscall.elf:     file format elf32-littlemips

Disassembly of section .text:

00100000 <_ftext>:
  100000:   e0 ff bd 27    *unknown*
  100004:   10 00 02 3c    *unknown*
  100008:   10 00 bf ff    *unknown*
  10000c:   00 00 b0 ff    *unknown*
  100010:   00 68 43 90    *unknown*
  100014:   0f 00 60 14    *unknown*
  100018:   10 00 10 3c    *unknown*
  10001c:   04 5a 02 8e    *unknown*
etc. --> always *unknown*

This is a bug in ee-binutils that I introduced back in January :-( See the thread in the toolchain forum for more info. Basically, "ee-objdump -d" is broken in the ps2toolchain in CVS.

Hint: Much of the time, "iop-objdump -d" should work for you, as most of the opcodes are the same.

I have a patch ready to submit when I get home, if my kids let me.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group