trying to compile ps2mp3

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
weltall
Posts: 310
Joined: Fri Feb 20, 2004 1:56 am
Contact:

trying to compile ps2mp3

Post 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
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post 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...
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post 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.
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
PrimeTime
Posts: 25
Joined: Thu Aug 19, 2004 7:49 pm

Post 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
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post 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)
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
PrimeTime
Posts: 25
Joined: Thu Aug 19, 2004 7:49 pm

Post 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...
pixel
Posts: 791
Joined: Fri Jan 30, 2004 11:43 pm

Post 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
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
PrimeTime
Posts: 25
Joined: Thu Aug 19, 2004 7:49 pm

Post by PrimeTime »

danke
weltall
Posts: 310
Joined: Fri Feb 20, 2004 1:56 am
Contact:

Post by weltall »

but how i can compile it anyway?
User avatar
evilo
Posts: 230
Joined: Thu Apr 22, 2004 8:40 pm
Contact:

Re: trying to compile ps2mp3

Post 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 !
weltall
Posts: 310
Joined: Fri Feb 20, 2004 1:56 am
Contact:

Post 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 :)
dlanor
Posts: 258
Joined: Thu Oct 28, 2004 6:28 pm
Location: Stockholm, Sweden

Re: trying to compile ps2mp3

Post 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
Post Reply