| View previous topic :: View next topic |
| Author |
Message |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
Posted: Wed Jul 06, 2005 8:20 am Post subject: How do I use the psptoolchain script? |
|
|
As always, the latest version is available on my site: http://www.oopo.net/consoledev
Instructions are located on the wiki: http://wiki.pspdev.org/psp:programming_faq
Let's take a look at the included readme file:
| Code: | ==================
HOW DO I USE IT?
==================
Basically, you run the toolchain script:
## Make the script executable.
chmod a+x ./toolchain.sh
## Run the script.
./toolchain.sh
First, this script will attempt to make sure you have all the programs
you need to build the toolchain. Then it will download the source from
various places on the internet. Finally, it will compile and build the
source. This may take a long time.
Once finished, you need to add the following to your login settings:
## PSPDEV SETTINGS
export PSPDEV="/usr/local/pspdev"
export PATH="$PATH:$PSPDEV/bin"
Then you're done!
=====================
WHAT ELSE CAN I DO?
=====================
Thanks to Rinco, you can now select which parts of the process to
perform. No longer will you have to rerun the whole script:
-d - Download the required files.
-b - Build and install binutils.
-g - Build and install gcc. (both c and c++)
-n - Build and install newlib.
-p - Download, build and install pspsdk.
For example, say you wanted to update only pspsdk:
./toolchain.sh -p
The script grabs the latest version of pspsdk from the svn repository.
|
That last part is important. Let's repeat it.
| Code: | For example, say you wanted to update only pspsdk:
./toolchain.sh -p
The script grabs the latest version of pspsdk from the svn repository.
|
Now you have no excuse for not knowing how to use it nor for not being up to date with the latest pspsdk.
Thanks for reading, and try the fish...
Last edited by ooPo on Sat Jan 06, 2007 2:29 pm; edited 3 times in total |
|
| Back to top |
|
 |
Arwin
Joined: 12 Jul 2005 Posts: 426
|
Posted: Thu Jul 14, 2005 7:23 am Post subject: |
|
|
I'm probably an idiot but I can't get this to work at all. Have installed the full cygwin but from bash I the chmod a+x ./psptoolchain.sh won't even work. When I use the renamed version it can't find the file, and when I leave the file alone (i.e. with the date) it does the chmod, but then when trying to run it, it complains about being a bin file.
Should I have selected dosmode when I installed cygwin perhaps? |
|
| Back to top |
|
 |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
Posted: Thu Jul 14, 2005 11:19 am Post subject: |
|
|
Could you paste the actual error messages?
Are you using the cygwin shell, or a dos command line?
Could you try: sh ./toolchain.sh |
|
| Back to top |
|
 |
Arwin
Joined: 12 Jul 2005 Posts: 426
|
Posted: Thu Jul 14, 2005 6:53 pm Post subject: |
|
|
| ooPo wrote: | Could you paste the actual error messages?
Are you using the cygwin shell, or a dos command line?
Could you try: sh ./toolchain.sh |
I've been using the cygwin shell (as in the one that starts arwin@xxx> in nice green font ;) )
I'll try that, thanks. I'm noticing though that there are some version issues - there were three .17 versions already present on my machine, and I installed the latest cygwin. When trying to make sure the right one was installed with regsvr32.exe, I got another error I'd never seen before.
I didn't pursue it much yesterday, went on with trying to compile a few things, and was already very happy to have compiled and fixed the hello world example within 2.5 hours of setting out. :) All that, of course, thanks to all the great help on the boards. 8-)
My C skills haven't been used in, what, 10 years, and they were never great - but I've been hacking into WIN32 with VB6 a lot and learnt more about programming in C (or rather, using OS functions of course) from there than I did before programming C. :) |
|
| Back to top |
|
 |
Arwin
Joined: 12 Jul 2005 Posts: 426
|
Posted: Fri Jul 15, 2005 6:01 am Post subject: |
|
|
| Arwin wrote: | | ooPo wrote: | Could you paste the actual error messages?
Are you using the cygwin shell, or a dos command line?
Could you try: sh ./toolchain.sh |
I've been using the cygwin shell (as in the one that starts arwin@xxx> in nice green font ;) )
I'll try that, thanks. |
No luck:
 |
|
| Back to top |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Fri Jul 15, 2005 6:17 am Post subject: |
|
|
Just do a .
No need for the 'sh' in front. _________________ Lego of my Ago! |
|
| Back to top |
|
 |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
Posted: Fri Jul 15, 2005 6:19 am Post subject: |
|
|
| What's psptoolchain.sh? It should be toolchain.sh. |
|
| Back to top |
|
 |
Arwin
Joined: 12 Jul 2005 Posts: 426
|
Posted: Fri Jul 15, 2005 6:47 am Post subject: |
|
|
| ooPo wrote: | | What's psptoolchain.sh? It should be toolchain.sh. |
I think I get it. I mistakenly believed that winrar extracted the file, but it actually just dumped a binary.
Now I'm trying to untar the file with tar in cygwin, but I can't get it to work either. *sigh*
Found the xvf option, but now it says its not a proper tar file ... obsolete 64 headers and all that. |
|
| Back to top |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Fri Jul 15, 2005 6:53 am Post subject: |
|
|
if it is .tar.gz then you have to do a:
| Code: |
tar -zxvf filename.tar.gz
|
the z option says it's gzip'd. _________________ Lego of my Ago! |
|
| Back to top |
|
 |
Arwin
Joined: 12 Jul 2005 Posts: 426
|
Posted: Fri Jul 15, 2005 6:55 am Post subject: |
|
|
| Agoln wrote: | if it is .tar.gz then you have to do a:
| Code: |
tar -zxvf filename.tar.gz
|
the z option says it's gzip'd. |
Woohooo!
I'm totally out of this unix thing, apparently. It doesn't show the .gz, how cruel. |
|
| Back to top |
|
 |
Arwin
Joined: 12 Jul 2005 Posts: 426
|
Posted: Fri Jul 15, 2005 7:53 am Post subject: |
|
|
Now, however, I get
gmake: command not found
wget: command not found
Since I installed all the binaries under the devkit, I'm getting fed up. :( |
|
| Back to top |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Fri Jul 15, 2005 8:45 am Post subject: |
|
|
| Arwin wrote: | Now, however, I get
gmake: command not found
wget: command not found
Since I installed all the binaries under the devkit, I'm getting fed up. :( |
Install wget and make from the cygwin setup. _________________ Lego of my Ago! |
|
| Back to top |
|
 |
Arwin
Joined: 12 Jul 2005 Posts: 426
|
Posted: Fri Jul 15, 2005 8:56 am Post subject: |
|
|
| Agoln wrote: | | Arwin wrote: | Now, however, I get
gmake: command not found
wget: command not found
Since I installed all the binaries under the devkit, I'm getting fed up. :( |
Install wget and make from the cygwin setup. |
Make I already installed, I can't any gmake anywhere - I looked through all of them. But I figured out (partly from this thread: http://www.pspupdates.com/forum/showthread.php?p=54080#post54080) that I needed wget from somewhere too.
And hurray, now it seems to be downloading something. :) One small step at a time. |
|
| Back to top |
|
 |
sexdwarf
Joined: 14 Jul 2005 Posts: 34
|
Posted: Sat Jul 16, 2005 2:26 pm Post subject: |
|
|
| Arwin wrote: | | I think I get it. I mistakenly believed that winrar extracted the file, but it actually just dumped a binary. |
this is actually a common issue with winrar - it works correctly with .tar.gz but for .tgz (which is the same thing) it only gunzips it... might be beneficial for novice users if ooPo changed it to .tar.gz ... just a suggestion :)
| Quote: | | Make I already installed, I can't any gmake anywhere |
you can ignore the gmake error since you have make... _________________ ...isn't it nice, sugar and spice...
...luring disco dollies to a life of vice... |
|
| Back to top |
|
 |
ooPo Site Admin
Joined: 17 Jan 2004 Posts: 2032 Location: Canada
|
Posted: Sat Jul 16, 2005 5:23 pm Post subject: |
|
|
Yes, the toolchain script checks for gmake first (hooray for bsd folk) then tries make. As long as the script doesn't give an error message and stop, chances are it is running fine.
As for .tar.gz, well... No offense, but I really don't care if a foolish windows programs can't handle a very common archive format properly just because it isn't getting exactly the extension it wants. I'm actually kinda surprised it doesn't prefer a 'proper' 3-letter extension.
Really, you should be using tar/gunzip to unpack it anyway. Get those hands dirty and touch those unix tools you've committed to using when you decided you wanted to do psp development! :) |
|
| Back to top |
|
 |
sexdwarf
Joined: 14 Jul 2005 Posts: 34
|
Posted: Sun Jul 17, 2005 12:09 am Post subject: |
|
|
| ooPo wrote: | As for .tar.gz, well... No offense, but I really don't care if a foolish windows programs can't handle a very common archive format properly just because it isn't getting exactly the extension it wants. I'm actually kinda surprised it doesn't prefer a 'proper' 3-letter extension.
Really, you should be using tar/gunzip to unpack it anyway. Get those hands dirty and touch those unix tools you've committed to using when you decided you wanted to do psp development! :) |
i agree fully that it is better to get your hands dirty using the appropriate tools,especially since linux/cygwin will be the development area - just thought i'd mention the extension issue... still amazes me that winrar has this issue after so many versions though... _________________ ...isn't it nice, sugar and spice...
...luring disco dollies to a life of vice... |
|
| Back to top |
|
 |
bugkiller78
Joined: 22 Jul 2005 Posts: 5
|
Posted: Fri Jul 22, 2005 11:46 am Post subject: BINUTILS ERROR |
|
|
Hi,
I'm beating my head against the wall because of this problem. I'm using Cygwin. It took me awhile after I ran ./toolchain.sh. And I got this far to this point:
| Code: | checking for gmsgfmt... msgfmt
checking for xgettext... :
updating cache ./config.cache
creating ./config.status
creating Makefile
creating config.h
linking ../../intl/libgettext.h to libintl.h
C:\cygwin\bin\gmake.exe[1]: Entering directory `C:/cygwin/tmp/pspdev/binutils-2.16/build-psp/intl'
gcc -c -DLOCALEDIR=\"/usr/local/pspdev/share/locale\" -DGNULOCALEDIR=\"/usr/local/pspdev/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/pspdev/share/locale:.\" -DHAVE_CONFIG_H -I.
-I../../intl -g -O2 ../../intl/intl-compat.c
process_begin: CreateProcess((null), gcc -c -DLOCALEDIR=\"/usr/local/pspdev/share/locale\" -DGNULOCALEDIR=\"/usr/local/pspdev/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/pspdev
/share/locale:.\" -DHAVE_CONFIG_H -I. -I../../intl -g -O2 ../../intl/intl-compat.c, ...) failed.
make (e=2): The system cannot find the file specified.
C:\cygwin\bin\gmake.exe[1]: *** [intl-compat.o] Error 2
C:\cygwin\bin\gmake.exe[1]: Leaving directory `C:/cygwin/tmp/pspdev/binutils-2.16/build-psp/intl'
C:\cygwin\bin\gmake.exe: *** [all-intl] Error 2
ERROR BUILDING BINUTILS |
Any1 got any idea? Please help me out!!!
Thanks |
|
| Back to top |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Fri Jul 22, 2005 1:35 pm Post subject: |
|
|
How old is your toolchain? _________________ Lego of my Ago! |
|
| Back to top |
|
 |
bugkiller78
Joined: 22 Jul 2005 Posts: 5
|
Posted: Fri Jul 22, 2005 5:29 pm Post subject: thanks |
|
|
The latest one I just downloaded from here. I think it's 20050625.
I had to go thru a lot of stuff to get this far. Here are my installations:
1. cygwin
2. mingw (I need this for gcc, otherwise the toolchain did NOT even run)
3. additional Unix utils: patch.exe. flex.exe...
4. I also downloaded gmake.exe from some1 (I wasnt able to compile the gnu make sources). This explains why I failed?
Please tell me what I did wrong. Is it helpful if you send me all of the compiled utils such as gcc.exe, gmake.exe, autoconf.exe, automake.exe, gmake.exe, etc... and whatever I need
Thanks, Agoln |
|
| Back to top |
|
 |
Oobles Site Admin
Joined: 17 Jan 2004 Posts: 362 Location: Melbourne, Australia
|
Posted: Fri Jul 22, 2005 9:24 pm Post subject: |
|
|
bugkiller78, you shouldn't need to install mingw, or manually install patch and other tools. gmake.exe is also not required if you use cygwin. The cygwin setup.exe program allows you to select packages to install. It is here that you select gcc, patch, and other things as listed at the following URL.
http://wiki.ps2dev.org/psp:toolchain
http://wiki.ps2dev.org/psp:programming_faq
I'd suggest you start a fresh. If you have the correct packages installed through setup.exe of cygwin you should find the toolchain script works perfectly.
Hope it helps.
David. aka Oobles. |
|
| Back to top |
|
 |
Agoln

Joined: 08 Jun 2005 Posts: 326 Location: Fort Wayne, IN
|
Posted: Fri Jul 22, 2005 11:05 pm Post subject: Re: thanks |
|
|
| bugkiller78 wrote: | | The latest one I just downloaded from here. I think it's 20050625. |
That's not the latest one.
Update your toolchain. Like oobles said, I'd start fresh with those sites. _________________ Lego of my Ago! |
|
| Back to top |
|
 |
bugkiller78
Joined: 22 Jul 2005 Posts: 5
|
Posted: Sat Jul 23, 2005 11:10 am Post subject: thanks |
|
|
It's working!!! yay!!!
thanks, guys!!! |
|
| Back to top |
|
 |
RobbieTheRabbit

Joined: 15 Jul 2005 Posts: 5 Location: France
|
Posted: Tue Jul 26, 2005 7:41 am Post subject: |
|
|
Hello,
I have this error and I don't know where does it come from, any advice is welcome :D
Edit : OMG I understood.... I let the image to show how much I'm stupid :P
Thanks. _________________ Do you like rabbits ?... |
|
| Back to top |
|
 |
cable16
Joined: 22 Mar 2005 Posts: 22
|
Posted: Sun Jul 31, 2005 5:23 am Post subject: |
|
|
| nm just looked at the wiki, answered my question. |
|
| Back to top |
|
 |
t-nooby
Joined: 31 Jul 2005 Posts: 6
|
Posted: Sun Jul 31, 2005 4:26 pm Post subject: |
|
|
hey man just waited a long time and the end shows this
| Code: | config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating config.h
config.status: executing default commands
mkdir -p -- ./bfd
Configuring in bfd
configure: creating cache ./config.cache
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking target system type... Invalid configuration `psp': machine `psp' not re
cognized
configure: error: /bin/sh ../../bfd/../config.sub psp failed
make: *** [configure-bfd] Error 1
ERROR BUILDING BINUTILS |
is that normal?
edit: the sdk test works tho |
|
| Back to top |
|
 |
Soban
Joined: 06 Aug 2005 Posts: 14
|
Posted: Sat Aug 06, 2005 12:20 pm Post subject: |
|
|
I'm using cygwin on winxp with gcc 4.0.1 and the latest version of both the sdk and toolchain.
I just ran the script and after about an hour it tells me this:
| Code: | c:\pspdec\bin\psp-ar.exe (3220): *** proc magic mismatch detected - 0xD94C588A/0
xD079E02
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows->Find/Search facility
and delete all but the most recent version. The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
make[2]: *** [libgcc.a] Error 128
make[2]: Leaving directory '/tmp/pspdev/gcc-4.0.1/build-psp/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory '/tmp/pspdev/gcc-4.0.1/build-psp/gcc'
ERROR BUILDING GCC |
So I tried doing what it said. No other versions, so I rebooted and ran it again.
Another hour later it gives me the same thing.
I just reinstalled cygwin, changed a few things, and restarted the script, but it takes an hour to get to the point where it stops so if anyone knows how to solve this problem it would save me a lot of time.
Thanks.
ps: Yes, I read the readme and tried searching this forum for similar questions. No luck.
[edit]
Nevermind... I feel kinda dumb now. I think one of the environment variables from another compiler was interfering with it. Anyway, it works now. |
|
| Back to top |
|
 |
DarknessFX
Joined: 01 Sep 2005 Posts: 2 Location: Brazil
|
Posted: Thu Sep 01, 2005 10:13 pm Post subject: |
|
|
Hi,
Im having some troubles to execute the toolchain script, its locking without reason or error message. I tried to reinstall a fresh Cygwin everytime the toolchain fail and its still locking at random stages.
Sry if answered before, I swear I had used the forum search.
"Where it lock" samples (it does lock on other commands too, but most of time its on config.status):
===
checking how to link with libintl... -lintl
checking for aclocal... aclocal
checking for autoconf... autoconf
checking for autoheader... autoheader
updating cache ./config.cache
configure: creating ./config.status
(lock/stall, CPU goes 0%, FileMon says no I/O at HDD)
---- some other times ----
checking whether canonicalize_file_name must be declared... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... (cached) yes
checking for working mmap... no
checking for working strncmp... yes
updating cache ../config.cache
configure: creating ./config.status
(lock/stall, CPU goes 0%, FileMon says no I/O at HDD)
--- unable to use CTRL+C or CTRL+Break ---
--- when I try to close the CygWin Window ---
4 [main] ? 3880 fork_copy: cygheap pass 0 failed, 0x611548E0..0x6115B778, done 0, windows pid 4028, Win32 error 5
--- yesterday the CTRL+C worked and I got ---
Hangup
(and back to the prompt)
===
Some additional info:
===
- Toolchains tested from ooPo and SVN, PSPSDK sync with SVN.
- W2K3 + CygWin (tried Full and "Wiki" Style), Intel with HT enabled, Chkdisk and Defrag = Ok, no bad sectors.
- While the script is running, Im leaving the machine alone and the CygWin with focus. Already tried to leave it running from one day to other without luck.
- I have it running fine in other 2 machines, can I just copy/duplicate my CygWin folder from the working ones?
===
[Edit]
> I have it running fine in other 2 machines, can I just
> copy/duplicate my CygWin folder from the working ones?
- Did work. Im compiling again. |
|
| Back to top |
|
 |
lantree
Joined: 05 Sep 2005 Posts: 1
|
Posted: Mon Sep 05, 2005 1:20 pm Post subject: X86_64 |
|
|
| This toolchain will not work natively under Windows XP 64bit edition. I had to modify it to have the --host=i686-pc-cygwin since it doesn't seem to reconignise the x86_64 as the platform identifier. So be warned if you have that problem add that flag above to everything but pspsdk in the ./configure's |
|
| Back to top |
|
 |
Ratty
Joined: 18 Sep 2005 Posts: 18
|
Posted: Sun Sep 18, 2005 12:07 pm Post subject: Problem installing in Ubuntu |
|
|
Hi
I'm attempting to install the toolchain in ubuntu 5.04. I'm using toolchain version 20050906. Below is where it dies off, any ideas what's wrong?:
aclocal: configure.ac: 19: macro `AM_PROG_AS' not found in library
configure.ac: 7: `automake requires `AM_CONFIG_HEADER', not `AC_CONFIG_HEADER'
automake: configure.ac: installing `./install-sh'
automake: configure.ac: installing `./mkinstalldirs'
automake: configure.ac: installing `./missing'
Makefile.am:35: DX_COND_doc does not appear in AM_CONDITIONAL
Makefile.am:41: DX_COND_html does not appear in AM_CONDITIONAL
Makefile.am:51: DX_COND_chm does not appear in AM_CONDITIONAL
Makefile.am:55: DX_COND_chi does not appear in AM_CONDITIONAL
Makefile.am:67: DX_COND_man does not appear in AM_CONDITIONAL
Makefile.am:77: DX_COND_rtf does not appear in AM_CONDITIONAL
Makefile.am:87: DX_COND_xml does not appear in AM_CONDITIONAL
Makefile.am:97: DX_COND_ps does not appear in AM_CONDITIONAL
Makefile.am:126: DX_COND_pdf does not appear in AM_CONDITIONAL
Makefile.am:155: DX_COND_latex does not appear in AM_CONDITIONAL
automake: Makefile.am: unterminated conditionals: @DX_COND_doc_TRUE@ @DX_COND_html_TRUE@ @DX_COND_chm_TRUE@ @DX_COND_chi_TRUE@ @DX_COND_man_TRUE@ @DX_COND_rtf_TRUE@ @DX_COND_xml_TRUE@ @DX_COND_ps_TRUE@ @DX_COND_pdf_TRUE@ @DX_COND_latex_TRUE@
automake: Makefile.am: unterminated conditionals: @DX_COND_doc_TRUE@ @DX_COND_html_TRUE@ @DX_COND_chm_TRUE@ @DX_COND_chi_TRUE@ @DX_COND_man_TRUE@ @DX_COND_rtf_TRUE@ @DX_COND_xml_TRUE@ @DX_COND_ps_TRUE@ @DX_COND_pdf_TRUE@ @DX_COND_latex_TRUE@
configure.ac: 7: required file `./[config.h].in' not found
automake: Makefile.am: warning: automake does not support EXTRA_DIST being defined conditionally
Makefile.am:10: variable `DX_CONFIG' not defined
configure.ac:8: error: possibly undefined macro: AC_PSPSDK_VERSION
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:9: error: possibly undefined macro: AC_PSPDEV_PATH
configure.ac:11: error: possibly undefined macro: AM_INIT_AUTOMAKE
configure.ac:14: error: possibly undefined macro: AC_PSPDEV_TOOLCHAIN
configure.ac:19: error: possibly undefined macro: AM_PROG_AS
./configure: line 1312: AC_1.0+beta: command not found
./configure: line 1313: AC_PSPDEV_PATH: command not found
./configure: line 1315: syntax error near unexpected token `pspsdk,'
./configure: line 1315: `AM_INIT_AUTOMAKE(pspsdk, 1.0+beta)'
ERROR RUNNING PSPSDK CONFIGURE |
|
| Back to top |
|
 |
mrbrown
Joined: 17 Jan 2004 Posts: 1536
|
Posted: Sun Sep 18, 2005 3:17 pm Post subject: |
|
|
| Your autotools is too old. |
|
| Back to top |
|
 |
|