Compiling psms / general compiling issue.

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

Moderators: cheriff, Herben

Post Reply
jyoung182
Posts: 6
Joined: Mon Jan 30, 2006 4:33 am

Compiling psms / general compiling issue.

Post by jyoung182 »

Hello. I'm trying to compile psms (did some simple hacks to the source code) and I get this:

chass@debian:~/build/psms/psms$ make
ee-gcc -O2 -EL -pipe -Wall -Wa,-al -D_EE -DLSB_FIRST -DALIGN_DWORD -fomit-frame-pointer -fno-common -mips3 -mcpu=r5900 -ffreestanding -fno-builtin -fshort-double -nostartfiles -mlong64 -mhard-float -mno-abicalls -c -I/usr/local/ps2dev/ps2sdk//common/include -I/usr/local/ps2dev/ps2sdk//ee/include -I. -I./cpu -I./gfxpipe -c sjpcm_rpc.c -o sjpcm_rpc.o > sjpcm_rpc.lst
/usr/local/ps2dev//ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/bin/as: unrecognized option `-mcpu=r5900'
sjpcm_rpc.c: In function `SjPCM_Puts':
sjpcm_rpc.c:50: warning: implicit declaration of function `memcpy'
sjpcm_rpc.c:51: warning: implicit declaration of function `sif_call_rpc'
make: *** [sjpcm_rpc.o] Error 2


-----------
Googling didn't give me any info on this.. memcpy is a function of the string library, but i cant figure out where sif_call_rpc is supposed to be called.

The source file (sjpcm_rpc.c) has the following includes:
#include <tamtypes.h>
#include <kernel.h>
#include <stdio.h>
#include <stdlib.h>
#include <sifrpc.h>
#include <stdarg.h>
#include "sjpcm.h"
-----

Any ideas?

thanks
JorDy
Posts: 121
Joined: Sun Dec 11, 2005 8:45 am

Post by JorDy »

memcpy or sif_call_rpc is not your problem there warnigns it will compile with warnings but its best to try and fix your problem is

/usr/local/ps2dev//ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/bin/as: unrecognized option `-mcpu=r5900'

so it doesnt know what -mcpu=r5900 is
jyoung182
Posts: 6
Joined: Mon Jan 30, 2006 4:33 am

Post by jyoung182 »

Hello..
You're right, those were just warnings.

Removing the offending flag (not sure if this would create problems of its own), this is what happens:

---------
chass@debian:~/build/psms/psms$ make
ee-gcc -O2 -EL -pipe -Wall -Wa,-al -D_EE -DLSB_FIRST -DALIGN_DWORD -fomit-frame-pointer -fno-common -mips3 -ffreestanding -fno-builtin -fshort-double -nostartfiles -mlong64 -mhard-float -mno-abicalls -c -I/usr/local/ps2dev/ps2sdk//common/include -I/usr/local/ps2dev/ps2sdk//ee/include -I. -I./cpu -I./gfxpipe -c sjpcm_rpc.c -o sjpcm_rpc.o > sjpcm_rpc.lst
sjpcm_rpc.c: In function `SjPCM_Puts':
sjpcm_rpc.c:50: warning: implicit declaration of function `memcpy'
sjpcm_rpc.c:51: warning: implicit declaration of function `sif_call_rpc'
sjpcm_rpc.c: In function `SjPCM_Init':
sjpcm_rpc.c:95: warning: implicit declaration of function `sif_bind_rpc'
sjpcm_rpc.c:96: invalid use of undefined type `struct t_rpc_client_data'
sjpcm_rpc.c:103: warning: implicit declaration of function `k_FlushCache'
sjpcm_rpc.c: In function `SjPCM_Enqueue':
sjpcm_rpc.c:118: storage size of `sdt' isn't known
sjpcm_rpc.c:129: warning: implicit declaration of function `k_sceSifSetDma'
sjpcm_rpc.c:130: warning: implicit declaration of function `k_sceSifDmaStat'
sjpcm_rpc.c:118: warning: unused variable `sdt'
/usr/local/ps2dev/ps2sdk/ee/include/stdio.h: At top level:
sjpcm_rpc.c:33: storage size of `cd0' isn't known
make: *** [sjpcm_rpc.o] Error 1
------
It would seem like those 'warnings' have come back to bite me.

Looking at the source,
static struct t_rpc_client_data cd0;
so t_rpc_client should be defined somewhere.. Does anyone know where these are supposed to be defined? Maybe I could then take a look and make sure i'm using the correct header file.
jyoung182
Posts: 6
Joined: Mon Jan 30, 2006 4:33 am

Post by jyoung182 »

The code I am trying to compile is from 2002, it would seem. This would explain a lot, as i'm guessing the API has changed since then.


I wonder if there are any compatability headers floating around somewhere..

Jim
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

psms won't build with anything resembling the modern toolchain. If you look at some of the samples with ps2sdk you can see just how much has changed..

IIRC buiding psms was pretty broken back in the day as well.

It's a lot more than just a compatibility header thing, I seem to recall some things that would be syntactically invalid now, or just otherwise not work with the current toolchain. The makefiles should be redone as well... If you look at how a current program tries to build itself, and how psms tries to use ee-gcc, you should see what I mean.
Shoot Pixels Not People!
Makeshift Development
jyoung182
Posts: 6
Joined: Mon Jan 30, 2006 4:33 am

Post by jyoung182 »

*sigh*. okay, thanks for the info..

This is all about switching the buttons :D
I hate the current button configuration... maybe I should post a topic for someone who has a system capable of building psms.

Thanks again

Jim
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

...in what way would you change the buttons?
Shoot Pixels Not People!
Makeshift Development
jyoung182
Posts: 6
Joined: Mon Jan 30, 2006 4:33 am

Post by jyoung182 »

I'd like the two buttons to be Square and Cross, not Square and Circle.

Any ideas? Any hidden menu I missed? ;) (After looking at the code, I doubt it).


Jim
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post by Drakonite »

I always hated that too.

I know how much of a PITA setting up an old toolchain and trying to make PSMS build would be, so here is a quick hack with the buttons changed. I haven't tested the cd build, because I can't be bothered to burn a CD for it, but the *link version works just fine.

Here
Shoot Pixels Not People!
Makeshift Development
jyoung182
Posts: 6
Joined: Mon Jan 30, 2006 4:33 am

Post by jyoung182 »

Awesome. I'll burn it and check it out tonight.

Thanks!

Jim
Post Reply