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 

Compiling psms / general compiling issue.

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



Joined: 30 Jan 2006
Posts: 6

PostPosted: Mon Jan 30, 2006 4:37 am    Post subject: Compiling psms / general compiling issue. Reply with quote

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
Back to top
View user's profile Send private message
JorDy



Joined: 11 Dec 2005
Posts: 121

PostPosted: Mon Jan 30, 2006 5:42 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
jyoung182



Joined: 30 Jan 2006
Posts: 6

PostPosted: Mon Jan 30, 2006 9:08 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
jyoung182



Joined: 30 Jan 2006
Posts: 6

PostPosted: Mon Jan 30, 2006 9:22 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Mon Jan 30, 2006 9:55 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
jyoung182



Joined: 30 Jan 2006
Posts: 6

PostPosted: Mon Jan 30, 2006 2:33 pm    Post subject: Reply with quote

*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
Back to top
View user's profile Send private message
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Mon Jan 30, 2006 5:32 pm    Post subject: Reply with quote

...in what way would you change the buttons?
_________________
Shoot Pixels Not People!
Makeshift Development
Back to top
View user's profile Send private message Visit poster's website
jyoung182



Joined: 30 Jan 2006
Posts: 6

PostPosted: Tue Jan 31, 2006 1:17 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Drakonite
Site Admin


Joined: 17 Jan 2004
Posts: 989

PostPosted: Tue Jan 31, 2006 10:17 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
jyoung182



Joined: 30 Jan 2006
Posts: 6

PostPosted: Wed Feb 01, 2006 2:09 am    Post subject: Reply with quote

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

Thanks!

Jim
Back to top
View user's profile Send private message
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