You can compile PSP homebrews on Windows, but doing it in Windows really sucks. It’s so slowwwwwwwwwwww because you need to run it on a Unix emulator like Cygwin. Well, there are other alternatives like other win32 PSPSDK out there but, if you’re an open source programmer, compile it in an open source way, the native environment of its compiler, Unix or its little brother Linux.
I don’t have a Unix system, but i do have a Linux, and its a Ubuntu Gutsy Gibbon. And the compiling is fast. No more emulating. But it didn’t worked for the first time around. To help those who experienced my worries and those who don’t want to experience it here’s my little guide.
Compiling your PSPSDK+Toolchain on Ubuntu:
- Open a terminal.
- Become root.
sudo su - Install required packages
sudo apt-get install build-essential autoconf automake bison \
flex libncurses5-dev libreadline-dev libusb-dev texinfo libgmp3-dev \
libmpfr-dev
- Download the latest toolchain.
svn co svn://svn.ps2dev.org/psp/trunk/psptoolchain - Setup the environment.
gedit ~/.bashrc - Add the following lines at the end of file, save then close.
export PSPDEV=”/usr/local/pspdev”
export PSPSDK=”$PSPDEV/psp/sdk”
export PATH=”$PATH:$PSPDEV/bin:$PSPSDK/bin” - Load environment changes.
source ~/.bashrc - Now for the long part, build the toolchain and sdk.
sudo ./toolchain-sudo.sh
The compile takes 30 mins to 4 hours, depending on the machine. My rig is an AthlonXP 1800+, and only took less than 2 hours.
Now you can start programming your PSP, the open source way. Enjoy XD.
Edit[2009/07/01]:
Added libmpfr-dev to required install package. This should fix the problem with missing mpfr.h
Edit[2008/11/21]:
Added libgmp3-dev on the required packages. And there seems to be a problem with the gcc in the latest version of Ubuntu(Intrepid Ibex). Here’s a workaround:
- Install GCC 4.2
sudo apt-get install gcc-4.2 - Modify toolchain-sudo.sh, adding following right before “export PSPDEV=/usr/local/pspdev”
export CC=/usr/bin/gcc-4.2
Thanks man, this was really helping me.
I’ve just encountered some errors like :
gmp.h not found, you must install gmp before continuing…
but I’ve managed to get rid off this thing.
You helped a lot thank you!!!
I’ve got the toolchain here:
/home/simon/.psptoolchain
and I’ve done all the edits which you’ve suggested however when double click on:
toolchain-sudo.sh
and run it in terminal the terminal is only visible for about 1 second and then it dissapears. A build folder is generated but it stays empty.
What do I do?
After adding an echo after every line I found that the terminal closes while running: toolchain.sh
line:
## Run all the depend scripts.
for SCRIPT in ${DEPEND_SCRIPTS[@]}; do “$SCRIPT” || { echo “$SCRIPT: Failed.”; exit 1; } done
@Random Guy
Open up a terminal/bash console. And enter “sudo ./toolchain-sudo.sh”.
This is applicable if you’re Using ubuntu.
If you’re not familiar with the console, you could run Nautilus with root privelages by pressing Alt+F2 and type in “gksudo nautilus”. Browse to where the toolchain-sudo.sh and run it.
Thanks! I got it to work (didn’t have proper privileges before, oops)
I get this error:
ls: cannot access /usr/include/mpfr.h: No such file or directory
ERROR: Install mpfr before continuing.
../depends/check-mpfr.sh: Failed.
ERROR: Could not run the toolchain script.
I’m of to find mpfr, any ideas?
Found it, it’s supposed to come with the standard Ubuntu installation but it wasn’t installed =/
Anyway thanks, it’s compiling now =D
it wont work. It cant find mpfr.sh file on the last step. Help Please.
Im also looking for mpfr.h I manually installed mpfr but it installed to user/local/include instead of usr/include HELP!!
my email:
IncludeAustin @yahoo(dot)com
I got it run:
sudo apt-get install libgmp3-dev libmpfr-dev
in the terminal
New problem please help..
This is the error I get about 15minutes into the sudo ./toolchain-sudo.sh
checking for correct version of mpfr.h… no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
Try the –with-gmp and/or –with-mpfr options to specify their locations.
Copies of these libraries’ source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.
../scripts/002-gcc-4.3.2-stage1.sh: Failed.
ERROR: Could not run the toolchain script.
@IncludeAustin, I was just to edit the page before you commented again. Anyways, updated the list of packages needed.