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 

SDL setup question

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



Joined: 17 Oct 2005
Posts: 10

PostPosted: Mon Oct 17, 2005 5:16 pm    Post subject: SDL setup question Reply with quote

Ive been looking for how to setup SDL/SDL_Image for the devkit and aren't sure what to do. I've found the SVN but not sure what I need or how to set it up. Any info would be great.
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Mon Oct 17, 2005 5:30 pm    Post subject: Reply with quote

Read README.PSP
Back to top
View user's profile Send private message
b00st



Joined: 17 Oct 2005
Posts: 10

PostPosted: Mon Oct 17, 2005 5:58 pm    Post subject: Reply with quote

don't think Im reading this right. autogen.sh doesn't download anything. I have to download everything in the /trunk/SDL folder, don't I? Im not really sure how to use SVN. lil help?

(sorry if im being a pest, but if it helps me, it'll probably help a few other people)

###EDIT###
Realised the toolkit had to download PSPSDK via SVN. looked through toolchain.sh and found what I needed.
svn checkout svn://svn.ps2dev.org/psp/trunk/SDL

Thanks anyway
Back to top
View user's profile Send private message
b00st



Joined: 17 Oct 2005
Posts: 10

PostPosted: Mon Oct 17, 2005 7:05 pm    Post subject: Reply with quote

ok, now i ./autogen.sh and all is fine. Next, I try

LDFLAGS="-L'/usr/local/pspdev/bin/psp-config.exe --/usr/local/pspdev/psp/sdk' /lib -lc -lpspuser -lpsputility" ./configure --host psp --prefix='/usr/local/pspdev/bin/psp-config.exe --psp-prefix'

but I get 'checking for C compiler default output file name... configure: error: C compiler cannot create executables'

I can upload the config.log if it'll help...
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Tue Oct 18, 2005 4:19 am    Post subject: Reply with quote

I don't know where you got that command, but it's wrong. Use the one in README.PSP:
Code:
LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser -lpsputility" ./configure --host psp --prefix=`psp-config --psp-prefix`
Back to top
View user's profile Send private message
b00st



Joined: 17 Oct 2005
Posts: 10

PostPosted: Tue Oct 18, 2005 8:20 am    Post subject: Reply with quote

jimparis: My command is the same, except I put the whole path to psp-config.

I fixed it up anyway and tried again with the same result. Im guessing this is a compiler problem. The line it is breaking on is:

checking for C compiler default output file name... configure: error: C compiler cannot create executables

its looking right at psp-gcc, and I know it works because I've built the samples in the PSPSDK with it...

looking at the config.log, i see a line:
configure:2623: psp-gcc conftest.c >&5
then there are a few 'undefined reference to' lines. Some of them are 'sceKernelCreateThread' and 'sceKernelStartThread'. It then goes on to show the actual conftest.c which is just something like:

int main () {
;
return 0;
}

Would it be because psp-gcc is looking for all that psp goodness we add to every program? BTW, is it just me or has anyone else had this problem?
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Tue Oct 18, 2005 8:25 am    Post subject: Reply with quote

b00st wrote:
jimparis: My command is the same, except I put the whole path to psp-config.

No, it is not. You put a space before "/lib" and you used apostrophes instead of backquotes. Read and follow README.PSP.
Back to top
View user's profile Send private message
b00st



Joined: 17 Oct 2005
Posts: 10

PostPosted: Tue Oct 18, 2005 8:54 am    Post subject: Reply with quote

even when I copy and paste the command from README.PSP i get the same thing. I dont think this is from an incorrect ./configure.
Afterwards, if i 'echo $LDFLAGS' I get
-L/user/local/pspdev/psp/sdk/lib -lc -lpspuser -lpsputility
I think thats what it should be. :(
Back to top
View user's profile Send private message
b00st



Joined: 17 Oct 2005
Posts: 10

PostPosted: Wed Oct 19, 2005 7:25 pm    Post subject: Reply with quote

Still getting the same results... So, noone can help at the moment?
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Wed Oct 19, 2005 7:29 pm    Post subject: Reply with quote

No idea, it works here. Maybe try removing and reinstalling everything from a clean slate (http://wiki.ps2dev.org/psp:programming_faq)
Back to top
View user's profile Send private message
b00st



Joined: 17 Oct 2005
Posts: 10

PostPosted: Wed Oct 19, 2005 7:49 pm    Post subject: Reply with quote

Yeah, I removed cygwin and reinstalled it today hoping it would fix it. Followed the link you gave exactly. I was thinking, Its not an environment variable I haven't set or anything, do you think? The only ones Ive set are the three it said to add to by .bashrc:

## PSPDEV PATH SETTINGS
export PSPDEV="/usr/local/pspdev"
export PSPSDK="$PSPDEV/psp/sdk"
export PATH="$PATH:$PSPDEV/bin:$PSPSDK/bin"

Also, would it help if I did my './configure > output.txt' so you could take a look?
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Wed Oct 19, 2005 8:16 pm    Post subject: Reply with quote

Sure, paste that (and config.log) on rafb.net/paste
Back to top
View user's profile Send private message
b00st



Joined: 17 Oct 2005
Posts: 10

PostPosted: Sun Oct 23, 2005 10:46 am    Post subject: Reply with quote

ok, I pasted it to http://rafb.net/paste/results/blfdqK44.html
Pasted by: b00st
Language: Plain Text
Description: SDL Setup Problems
You have 24 hours from now to view it, but i can repaste if needed or send to you as a text file.
Thanks for being patient and not just ignoring my rants.
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Sun Oct 23, 2005 11:06 am    Post subject: Reply with quote

Well of course the best place to start is the first error:
Code:
LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser -lpsputility" ./configure --host psp --prefix=`psp-config --psp-prefix`
configure: error: expected an absolute directory name for --prefix: psp-config --psp-prefix
This is the source of the problem. It looks like your shell isn't properly expanding the backquotes. Make sure you're running bash:
Code:
$ /bin/bash
and try again. Or try it like this:
Code:
LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lc -lpspuser -lpsputility" ./configure --host psp --prefix=$(psp-config --psp-prefix)
or if that fails try
Code:
LDFLAGS="-L/usr/local/pspdev/psp/sdk/lib -lc -lpspuser -lpsputility" ./configure --host psp --prefix=/usr/local/pspdev/psp
or as a last resort try
Code:
export LDFLAGS="-L/usr/local/pspdev/psp/sdk/lib -lc -lpspuser -lpsputility"
./configure --host psp --prefix=/usr/local/pspdev/psp
although in that last case you'll have to remember to run
Code:
unset LDFLAGS
afterwards or else other builds will fail.
Back to top
View user's profile Send private message
b00st



Joined: 17 Oct 2005
Posts: 10

PostPosted: Sun Oct 23, 2005 4:16 pm    Post subject: Reply with quote

Ah my goodness! Tried it again with
Code:
export LDFLAGS="-L/usr/local/pspdev/psp/sdk/lib -lc -lpspuser -lpsputility"
./configure --host psp --prefix=/usr/local/pspdev/psp

and seems to have worked. I had tried the same thing without 'export' with no luck. Thanks heaps, couldn't have done it without you!
Back to top
View user's profile Send private message
Arwin



Joined: 12 Jul 2005
Posts: 426

PostPosted: Sun Oct 23, 2005 11:49 pm    Post subject: Reply with quote

Being a complete n00b, where does SDL go in the first place? I'm trying to compile Rob's PSP PDA and it needs SDL. I know how to get it out of SVN but that's about it, and not even sure where to put it.

Then I guess I have to execute the stuff in the readme.psp in the Cygwin command prompt, or is that to include it into your project? (Rob's project has that already of course).

So what's the minimum I should do to be able to compile a project that already uses SDL in its makefile? If anyone can help me that would save me heaps of time of mucking about ... thanks!
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Mon Oct 24, 2005 2:16 am    Post subject: Reply with quote

Just follow README.PSP and it will get installed into /usr/local/pspdev/psp/lib. Make sure you're running bash to avoid the problems above.
Back to top
View user's profile Send private message
Orion_



Joined: 27 Jan 2005
Posts: 69

PostPosted: Wed Oct 26, 2005 7:08 pm    Post subject: Reply with quote

how to install SDL with devkitpro ?

I found automake and autoconf for mingw but still don't work
./autogen.sh: /bin/aclocal: No such file or directory
./autogen.sh: /bin/automake: No such file or directory
/bin/autoconf: /usr/bin/autom4te: No such file or directory
/bin/autoconf: /usr/bin/autom4te: No such file or directory
./autogen.sh: /bin/aclocal: No such file or directory
./autogen.sh: /bin/automake: No such file or directory
/bin/autoconf: /usr/bin/autom4te: No such file or directory
/bin/autoconf: /usr/bin/autom4te: No such file or directory
Back to top
View user's profile Send private message
Orion_



Joined: 27 Jan 2005
Posts: 69

PostPosted: Wed Oct 26, 2005 8:04 pm    Post subject: Reply with quote

I installed active perl and copied all the files from c:\perl\bin\ in mingw bin, and it work but seems to freeze after writting "This may take a while ..."
I'm waiting since 10min ...
Back to top
View user's profile Send private message
Orion_



Joined: 27 Jan 2005
Posts: 69

PostPosted: Wed Oct 26, 2005 8:39 pm    Post subject: Reply with quote

ok I installed mingw DTK and it work
Back to top
View user's profile Send private message
Orion_



Joined: 27 Jan 2005
Posts: 69

PostPosted: Wed Oct 26, 2005 11:16 pm    Post subject: Reply with quote

I think the problem above (using devkitpro) is because:
psp-config --psp-prefix
give:
/c/devkitPro/devkitpsp/psp

and it should be:
/c/devkitPro/devkitPSP/psp

I tried with case sensitive path and it work pretty well :)
Back to top
View user's profile Send private message
droneuath



Joined: 03 Nov 2005
Posts: 2

PostPosted: Thu Nov 03, 2005 8:13 am    Post subject: SDL Compilation Issue Reply with quote

Hi all!

Didn't want to create a new thread for this.

I tried to compile SDL from subversion and after running the command
Code:

LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser -lpsputility" ./configure --host psp --prefix=`psp-config --psp-prefix`

(described in README.PSP) the following errormessage is displayed:

Code:

./configure: line 21519: syntax error near unexpected token `src/thread,'
./configure: line 21519: `    COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c)'

Does this sound familiar to anyone, perhaps an autoconf/automake issue?

Thanks in advance

PS.: All sources are fresh outa svn, Environment is Linux.
Back to top
View user's profile Send private message
droneuath



Joined: 03 Nov 2005
Posts: 2

PostPosted: Thu Nov 03, 2005 8:25 am    Post subject: Reply with quote

Issue is resolved, repository was broken. I did a final svn checkout to be sure its the latest version and got it working ;)
Back to top
View user's profile Send private message
Thanhda



Joined: 09 Apr 2005
Posts: 331
Location: Canada

PostPosted: Mon Nov 21, 2005 9:02 pm    Post subject: Reply with quote

got some building issue. dont know why.

Code:
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall `/usr/local/pspdev/psp/sdk/../bin/sdl-config --cflags`  -L. -L/usr/local/pspdev/psp/sdk/lib   sdltest.o `/usr/local/pspdev/psp/sdk/../bin/sdl-config --libs` -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpsputility -lpspuser -lpspkernel -o sdltest.elf
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/bin/ld: skipping incompatible /usr/local/pspdev/psp/lib/libSDL.a when searching for -lSDL
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/bin/ld: skipping incompatible /usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libSDL.a when searching for -lSDL
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/bin/ld: skipping incompatible /usr/local/pspdev/psp/bin/../lib/libSDL.a when searching for -lSDL
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/bin/ld: skipping incompatible /usr/local/pspdev/psp/lib/libSDL.a when searching for -lSDL
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/bin/ld: cannot find -lSDL
collect2: ld returned 1 exit status
make: *** [sdltest.elf] Error 1


i set up just as it says in the README.PSP and i get this error when trying to build. dont know why.
_________________
There are 10 types of people in the world: Those who understand binary, and those who don't...
Back to top
View user's profile Send private message Visit poster's website
ufoz



Joined: 10 Nov 2005
Posts: 86
Location: Tokyo

PostPosted: Fri Nov 25, 2005 12:50 am    Post subject: Reply with quote

I just spent some time getting SDL to work, maybe it should be noted in the README.PSP file that the SDL_main function needs to have
Code:
extern "C"

linkage if you're compiling C++ code, otherwise my psp-g++ threw a hissy fit about an undefined reference.
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP 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