Page 1 of 1

trying to compile ps2mp3

Posted: Sun Oct 10, 2004 10:40 pm
by weltall
i'm traying to compile ps2mp3 but at a certain point i get this error and don't complete the compilation

rm -f *.elf *.o *.a MP3.ELF
ee-gcc -D_EE -O2 -G0 -Wall -IC:\ps2sdk/ee/include -IC:\ps2sdk/common/include -I
. -I./INC -c bstdfile.c -o bstdfile.o
In file included from bstdfile.c:59:
C:/ps2sdk/ee/include/kernel.h:272: parse error before '--' token
make: *** [bstdfile.o] Error 1

how can I correct this?
thanks in advance

Posted: Mon Oct 11, 2004 4:48 am
by pixel
Hum, well;

After looking at it, it seems one need to clean a bit the source code. It's not that much adapted to the actual ps2sdk (mainly makefile problems for a first look)

Seems I found some grunt work again...

Posted: Mon Oct 11, 2004 5:24 am
by pixel
Okay, some points (this is mainly for PrimeTime actually)


-) you did include lots of .h files inside your source tree, but, there's no sampletype.h (which I found inside libsample on sourceforge.net)

-) you shouldn't include $(PS2SDK)/Makefile.pref and $(PS2SDK)/Makefile.eeglobal, and since you put lots of precompiled files, you should put them in your source tree, and then, include ./Makefile rather than $(PS2SDK)/Makefile

-) inside sampletype.h and in your own files, you shouldn't use uint32_t and uint8_t, neither should sampletype.h include stdint.h, but rather use u32 and u8 and include tamtypes.h

-) in the linking phase, the libraries should rather be that, in that order:
-lmc -lhdd -lpoweroff -lfileXio -lsbv_patches -ldebug -lsample -lmad -lpad -lgs -lm -lcdvdfs -lc -lkernel -lsyscall -lc

-) the whole source tree isn't really unix compilant, but, well :) (problems with filename's cases, and crlf at end of files)


Seems the biggest issue was the library's order.


Hope that helps.

Posted: Tue Oct 12, 2004 11:52 am
by PrimeTime
Thanks pixel,

I hurried the code and I knew that somewhere I would forget to do a few things...

Sorry about the non-unix compliantcy, I did do the compiling under windows.

Thanks for letting me know.

Ryan

Posted: Tue Oct 12, 2004 5:21 pm
by pixel
Ho well, the whole package is a bit uneasy to compile under unix anyway, and you'll get more troubles trying to fix it if you don't have any unix access, so, don't bother too much with it. And I couldn't find the source code of your rawtoasm thingy, so, no linux version for that :P (had to run it on a windows host)

Posted: Tue Oct 12, 2004 8:50 pm
by PrimeTime
Yeah, i found the rawtoasm in the keylauncher source. I had trouble packing my graphics in using bin2s, so I used this program instead...

Posted: Tue Oct 12, 2004 9:14 pm
by pixel
I bet you're not using the latest bin2s.exe, which has a bugfix about crlf stuff. Please retry with this one:

http://www.nobis-crew.org/bin2s.exe

Posted: Wed Oct 13, 2004 10:49 am
by PrimeTime
danke

Posted: Sat Oct 23, 2004 9:00 pm
by weltall
but how i can compile it anyway?

Re: trying to compile ps2mp3

Posted: Sat Oct 23, 2004 9:06 pm
by evilo
weltall wrote: C:/ps2sdk/ee/include/kernel.h:272: parse error before '--' token
just comment that line in kernel.h (line 272) that should correspond if I'm not wrong to "_print(const char *fmt, ...);"

I had the same issue with my environment, and after several tries,I just fixed it like this... just works like a charm now !

Posted: Sun Oct 24, 2004 11:49 pm
by weltall
thanks evilo now i have no problem with kernel.h
and i can get to work thanks to the advice of pixel so thanks to you two :D and thanks also to primetime for writing and making opensource this program :)

Re: trying to compile ps2mp3

Posted: Thu Oct 28, 2004 8:35 pm
by dlanor
evilo wrote: just comment that line in kernel.h (line 272) that should correspond if I'm not wrong to "_print(const char *fmt, ...);"

I had the same issue with my environment, and after several tries,I just fixed it like this... just works like a charm now !
In my tests I found that line 272 of kernel.h is the function declaration for "putchar", so just commenting it out is inappropriate. Instead you need to replace the line shown below:
int putchar(int c);

with the following three lines:
#ifndef putchar
int putchar(int c);
#endif

That will eliminate the conflict with the 'putchar' macro of stdio.h, which was the cause of the error, while still making the function declaration as needed when the putchar macro is not defined. (Some sources may need it.)

Best regards: dlanor