| View previous topic :: View next topic |
| Author |
Message |
Garak
Joined: 27 Jul 2005 Posts: 46
|
Posted: Mon Sep 12, 2005 4:44 am Post subject: SDL Install / Usage Trouble |
|
|
Greetings,
I am attempting to install the PSP SDL. I am currently running cygwin on Windows. I am using the PSPSDK 4.01 & Toolchain
psptoolchain-20050725.tar for linux. I have compiled numerous programs, so I am sure my basic environment is setup correctly. I believe I successfully installed the SDL from SVN (build 1025). It would seem the header files were copied to /usr/local/include/SDL, while some library files were placed in /usr/local/lib.
I would like to write a simple app that includes and uses the SDL environment. My first attempt was to hijack one of the very simple sample files from the PSPSDK, but that was quite a failure. I attempted to edit the make file to include the SDL header files and library, but that turned out so bad I won't bother embarrassing myself by posting it here.
I know that SDL has some test apps I can build, but after looking at them I have no idea how to build them. And from the looks of it they do not appear to be PSP "ready".
Does anyone have an example of how to setup a makefile and compile an SDL app? Also, based on my description of the location of my SDL files, did they get installed to the right directories? Any help would be really appreciated! |
|
| Back to top |
|
 |
mrbrown
Joined: 17 Jan 2004 Posts: 1536
|
Posted: Mon Sep 12, 2005 5:19 am Post subject: |
|
|
| There's a file SDL for PSP distribution named README.PSP that contains instructions on how to build and link against SDL. |
|
| Back to top |
|
 |
Garak
Joined: 27 Jul 2005 Posts: 46
|
Posted: Mon Sep 12, 2005 6:52 am Post subject: |
|
|
Thank you,
The build instructions state:
To build for the PSP, make sure psp-config is in the path and run:
./autogen.sh
LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" \
./configure --host psp --prefix=`psp-config --psp-prefix`
make
make install
OK... Whats with the
LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" \
What do I do with that portion? Is that a command in itself, or a command line argument to autogen.sh? |
|
| Back to top |
|
 |
cheriff Regular
Joined: 23 Jun 2004 Posts: 262 Location: Sydney.au
|
Posted: Mon Sep 12, 2005 9:02 am Post subject: |
|
|
the \ at the end of the line usually means that while stuff is written over two lines, it should really be entered as a single one.
so that line sets the LDFLAGS environment varible for when you run ./configure. So you should be able to just enter:
| Code: | | LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" ./configure --host psp --prefix=`psp-config --psp-prefix` | as one command. _________________ Damn, I need a decent signature! |
|
| Back to top |
|
 |
Garak
Joined: 27 Jul 2005 Posts: 46
|
Posted: Mon Sep 12, 2005 1:24 pm Post subject: |
|
|
I figured that may be the case, but I have had no luck installing the SDL with any combiniation of typing stuff on a single, or multiple lines. I typed the line just as you stated, and I received the following error:
@gold-leader:~/psphome/devtools/SDL
>LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" ./configure --host psp
--prefix=`psp-config --psp-prefix`
LDFLAGS=-L/usr/local/pspdev/psp/sdk/lib -lc -lpspuser: Command not found.
Any ideas as to what the problem could be? |
|
| Back to top |
|
 |
cheriff Regular
Joined: 23 Jun 2004 Posts: 262 Location: Sydney.au
|
Posted: Mon Sep 12, 2005 4:42 pm Post subject: |
|
|
are you doing this in a normal winXP command box, or the funky cygwin bash shell? You need the cygwin one, i guess.
IF that still fails to work, look in you're .bashrc file in your homedir in cygwin. Hopefully there's some samples on how to set environment values. (you should have at least managed to set PSPSDK in there, to get thus far, right?) and do the same to set LDFLAGS to "-L`psp-config --pspsdk-path`/lib -lc -lpspuser" .
then | Code: | source ~/.bashrc
./configure --host psp --prefix=`psp-config --psp-prefix` | would be equivalent. Of course, you then have to remove that lkine from .bashrc and re source it, coz that LDFLAGS will prolly cock up other stuff if you leave it there.
Of course, there's always the possiblilty that something else in your setup is broken and crappy workarounds such as this wont do squat. I dunno ..:) _________________ Damn, I need a decent signature! |
|
| Back to top |
|
 |
rinco
Joined: 21 Jan 2005 Posts: 255 Location: Canberra, Australia
|
Posted: Mon Sep 12, 2005 7:43 pm Post subject: |
|
|
Best place to start would be tests/SDL/ in the psp repository.
Failing that, there are several SDL games in the pspware repository....
trailblazer, vecteroids, abrick, REminiscence, lopan, eggchess, SMC. Maybe even VisualBoyAdvance...?.
And somewhere in the forums is a Makefile for SMS/SDL. |
|
| Back to top |
|
 |
Garak
Joined: 27 Jul 2005 Posts: 46
|
Posted: Tue Sep 13, 2005 1:35 pm Post subject: |
|
|
Thank you all for your help.
Cheriff, I am using the funky cygwin c-shell. As it turns out that was my problem. I switched to the BASH shell (Cygwin's default) and ran the commnd as 1 line as you sudgested earlier. In Bash it compiled with no problems. I even compiled the test program sudgested by rinco and it worked great.
Again thank you all for the help, it's greatly appreciated! |
|
| Back to top |
|
 |
cheriff Regular
Joined: 23 Jun 2004 Posts: 262 Location: Sydney.au
|
Posted: Tue Sep 13, 2005 1:50 pm Post subject: |
|
|
cool. I didnt even realise cygwin shipped with anything other than bash!
glad to help, tho :) _________________ Damn, I need a decent signature! |
|
| Back to top |
|
 |
pspblizz
Joined: 13 Sep 2005 Posts: 15
|
Posted: Wed Sep 14, 2005 6:59 am Post subject: |
|
|
I have two problems following those instructions after having downloaded the libsdl with svn.
First this part: "--prefix=`psp-config --psp-prefix`" gives this error:
| Code: |
Invalid option '?'
Usage: psp-config [opts]
Options:
--pspsdk-path : Print the base directory of PSPSDK
|
Next up the .configure gives these two errors:
| Code: |
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
|
And finally, ends with the error:
| Code: |
checking for psp-gcc... psp-gcc
checking for C compiler default output file name... configure: error: C compiler
cannot create executables
See `config.log' for more details.
|
Any feedback to what I need to do?
I used cygwin and have devkitPRO installed with version 4.0.1 of PSPSDK. |
|
| Back to top |
|
 |
rinco
Joined: 21 Jan 2005 Posts: 255 Location: Canberra, Australia
|
Posted: Wed Sep 14, 2005 7:05 pm Post subject: |
|
|
| The --psp-prefix parameter was added to psp-config long long ago. So you need to update your toolchain. Perhaps there is a newer version of devkitpro...? If not, hassle WinterMute. |
|
| Back to top |
|
 |
ayatollah
Joined: 04 Sep 2005 Posts: 15
|
Posted: Mon Sep 26, 2005 10:05 am Post subject: Same Problem on WinXP with DevKitPSP5.0 |
|
|
I have the same problem when I try to build SDL!
I have been searching here for hours but I can not find a solution on this problem. I downloaded devkitProUpdater-1.0.9.exe, have the FULL install and work on MinSys with msysDTK-1.0.1.exe.
I installed:
msys-autoconf-2.59-src.tar.bz2
msys-automake-1.8.2-src.tar.bz2
and when I follow the Instructions in the README.PSP in SDL SVN repository:
| Code: |
./autogen.sh
LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" \
./configure --host psp --prefix=`psp-config --psp-prefix`
make
make install
|
I get this Error Message:
| Code: |
cd builds/unix; ./configure --host psp --prefix=/c/devkitPro/devkitPSP/psp
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking build system type... i686-pc-mingw32
checking host system type... mipsallegrexel-psp-elf
checking target system type... mipsallegrexel-psp-elf
checking for psp-gcc... psp-gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** [builds/unix/unix-def.mk] Error 77
make: ver: Command not found
make: type: Command not found
make: *** [dos_setup] Error 127
make: ver: Command not found
make: *** No rule to make target `install'. Stop.
|
It's the same if I try to install Freetype too..
Any Solution out there???
I tried to install the whole SDK using CYGWIN and the latest Toolchain however that gave me an error message after 2 Hours when building NEWLIB so I figured to go back to MinSys which works like a charm on existing Samples etc.
PLEASE HELP !!! :) |
|
| Back to top |
|
 |
skeezixcodejedi
Joined: 30 Aug 2005 Posts: 29
|
Posted: Tue Sep 27, 2005 5:10 am Post subject: |
|
|
Check the logfile it mentions, and scan up to the actual 'error' lines in question. You'll be able to see the tiny 'C' program it wrote to do the test, and the error messages. Chances are it just can't find the libs needed to produce the executable.. ie: For PSP, it needs to have the pspkernel and other libs. So in the LDOCNFIG= part, you may need to add some -L to locate the right lism or even some -l's to include the right libs.
jeff _________________ --
Have you played Atari today? |
|
| Back to top |
|
 |
ayatollah
Joined: 04 Sep 2005 Posts: 15
|
Posted: Tue Sep 27, 2005 5:49 am Post subject: |
|
|
Thanx for the HINT...
I checked the log file but there was only some strange char in the Path to the SDK so I simply used
| Code: |
$ LDFLAGS="-L/c/devkitPro/devkitPSP/psp/sdk/lib -lc -lpspuser ./configure --host psp --prefix=/c/devkitPro/devkitPSP/psp
|
(not with the PSP-CONFIG Option) and it worked like a charm..
THANKS A LOT! |
|
| Back to top |
|
 |
|