Compiling psms / general compiling issue.
Compiling psms / general compiling issue.
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
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
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.
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.
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.
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
Makeshift Development
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
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
Makeshift Development