Help test the newtoolchain script.

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Help test the newtoolchain script.

Post by ooPo »

WARNING! STILL EXPERIMENTAL!
http://www.oopo.net/consoledev/files/ne ... 060128.tgz

Code: Select all

 ###################
 ## WHAT IS THIS? ##
 ###################

  This is my second attempt at a great script for automating the building
  and installing of various toolchains. A brief list of the new changes:

  - Moved from a shell script to a perl script.
  - Presents an easy-to-read interface to the user.
  - Supports PS2, PSP and GP2X in one script. Adding more is easy.
  - Logs everything to a log file and shows the last 20 lines on an error.
  - Allows the easy choosing of which steps to run and which to skip.
  - Automatically grabs the latest in patches and software, when possible.

 ######################
 ## HOW DO I USE IT? ##
 ######################

  Usage:

   ./toolchain.pl &#91;system&#93; <list_of_steps>

  Valid systems are currently&#58;

   PS2 PSP GP2X GP2X-LIBS &#40;case sensitive&#41;

  Valid steps are as follows&#58;

   PS2
    1 = binutils
    2 = gcc &#40;C&#41;
    3 = newlib
    4 = gcc &#40;C++&#41;
    5 = pspsdk
    6 = ps2client

   PSP
    1 = binutils
    2 = gcc &#40;C&#41;
    3 = pspsdk headers
    4 = newlib
    5 = gcc &#40;C++&#41;
    6 = pspsdk

   GP2X
    1 = linux-headers
    2 = binutils
    3 = glibc &#40;stage1&#41;
    4 = gcc &#40;stage1&#41;
    5 = glibc &#40;stage2&#41;
    6 = gcc &#40;stage2&#41;

   GP2X-LIBS
    1 = zlib
    2 = jpeglib
    3 = libpng
    4 = freetype

    5 = SDL
    6 = SDL_image
    7 = SDL_mixer
    8 = SDL_ttf

   Steps can be specified in any order and can even be repeated. Be careful
   to not specify an order that is invalid as you'll end up with a bad build.

  ###################
  ## ANY EXAMPLES? ##
  ###################

   To build a complete ps2dev toolchain&#58;

    ./toolchain.sh PS2

   To update and build only the pspsdk&#58;

    ./toolchain.sh PSP 6

   To build just the pspdev binutils and pspsdk&#58;

    ./toolchain.sh PSP 1 6

   To be really weird&#58;

    ./toolchain.sh PS2 1 2 3 4 5 6 5 4 3 2 1

  ###########################
  ## WHO THE HELL ARE YOU? ##
  ###########################

   I'm Dan, sometimes known as ooPo. I can be found at&#58;

    peori@oopo.net
    ooPo on freenode &#40;#ps2dev & #pspdev&#41;
    ooPo on efnet &#40;#gp2xdev&#41;
    http&#58;//www.oopo.net/consoledev
    http&#58;//forums.ps2dev.org

   Enjoy the script, and if you want to modify it... go ahead!

   Just let me know, ok?
Check out the crazy new dependency checking:

Code: Select all

 my %dependencies = &#40;

   "COMMON" => &#91;
    &#91; " gcc&#58;\t\t", "&#123; gcc -v; &#125;", "Please install gcc before continuing." &#93;,
    &#91; " $make&#58;\t\t", "&#123; $make -v; &#125;", "Please install $make before continuing." &#93;,
    &#91; " wget&#58;\t\t", "&#123; wget -V; &#125;", "Please install wget before continuing." &#93;,
    &#91; " patch&#58;\t\t", "&#123; patch -v; &#125;", "Please install patch before continuing." &#93;,
   &#93;,

   "PS2" => &#91;
    &#91; " svn&#58;\t\t", "&#123; svn help; &#125;", "Please install subversion before continuing."&#93;,
    &#91; " \$PS2DEV&#58;\t", "&#123; export | grep ' PS2DEV='; &#125;", "Please read README.PS2 for information." &#93;,
    &#91; " \$PS2SDK&#58;\t", "&#123; export | grep ' PS2SDK='; &#125;", "Please read README.PS2 for information." &#93;,
    &#91; " path&#58;\t\t", "&#123; export | grep ' PATH=' | grep '$PS2DEV'; &#125;", "Please read README.PS2 for information." &#93;,
    &#91; " privs&#58;\t\t", "&#123; mkdir -p $PS2DEV && touch $PS2DEV/.test && rm $PS2DEV/.test; &#125;", "Please read README.PS2 for information." &#93;,
   &#93;,

   "PSP" => &#91;
    &#91; " svn&#58;\t\t", "&#123; svn help; &#125;", "Please install subversion before continuing."&#93;,
    &#91; " automake&#58;\t", "&#123; automake --version; &#125;", "Please install automake before continuing." &#93;,
    &#91; " autoconf&#58;\t", "&#123; autoconf --version; &#125;", "Please install autoconf before continuing." &#93;,
    &#91; " \$PSPDEV&#58;\t", "&#123; export | grep ' PSPDEV='; &#125;", "Please read README.PSP for information." &#93;,
    &#91; " path&#58;\t\t", "&#123; export | grep ' PATH=' | grep '$PSPDEV'; &#125;", "Please read README.PSP for information." &#93;,
    &#91; " privs&#58;\t\t", "&#123; mkdir -p $PSPDEV && touch $PSPDEV/.test && rm $PSPDEV/.test; &#125;", "Please read README.PSP for information." &#93;,
   &#93;,
Download, unpack, patch and build!

Code: Select all

   "PSP" => &#91;

    &#91; "binutils-2.16.1", &#91; "psp" &#93;,
     "&#123; wget -c ftp&#58;//ftp.gnu.org/pub/gnu/binutils/binutils-2.16.1.tar.bz2; &#125;",
     "&#123; rm -Rf binutils-2.16.1 && tar xfvj binutils-2.16.1.tar.bz2; &#125;",
     "&#123; cd binutils-2.16.1 && svn cat svn&#58;//svn.pspdev.org/psp/trunk/psptoolchain/binutils-2.16.1.patch | patch -p1; &#125;",
     "&#123; cd binutils-2.16.1 && mkdir -p build-\$target && cd build-\$target && ../configure --prefix=$PSPDEV --target=\$target --enable-install-libbfd && $make && $make install && $make clean; &#125;",
    &#93;,

    &#91; "gcc-4.0.2 &#40;C&#41;", &#91; "psp" &#93;,
     "&#123; wget -c ftp&#58;//ftp.gnu.org/pub/gnu/gcc/gcc-4.0.2/gcc-core-4.0.2.tar.bz2 && wget -c ftp&#58;//ftp.gnu.org/pub/gnu/gcc/gcc-4.0.2/gcc-g++-4.0.2.tar.bz2; &#125;",
     "&#123; rm -Rf gcc-4.0.2 && tar xfvj gcc-core-4.0.2.tar.bz2 && tar xfvj gcc-g++-4.0.2.tar.bz2; &#125;",
     "&#123; cd gcc-4.0.2 && svn cat svn&#58;//svn.pspdev.org/psp/trunk/psptoolchain/gcc-4.0.2.patch | patch -p1; &#125;",
     "&#123; cd gcc-4.0.2 && mkdir -p build-\$target && cd build-\$target && ../configure --prefix=$PSPDEV --target=\$target --enable-languages='c' --with-newlib --without-headers && $make && $make install && $make clean; &#125;",
    &#93;,

    &#91; "pspsdk-current &#40;headers&#41;", &#91; "psp" &#93;,
     "&#123; svn checkout svn&#58;//svn.pspdev.org/psp/trunk/pspsdk; &#125;",
     "",
     "",
     "&#123; cd pspsdk && ./bootstrap && ./configure --with-pspdev=$PSPDEV && $make install-data && $make clean; &#125;",
    &#93;,

    &#91; "newlib-1.13.0", &#91; "psp" &#93;,
     "&#123; wget -c ftp&#58;//sources.redhat.com/pub/newlib/newlib-1.13.0.tar.gz; &#125;",
     "&#123; rm -Rf newlib-1.13.0 && tar xfvz newlib-1.13.0.tar.gz; &#125;",
     "&#123; cd newlib-1.13.0 && svn cat svn&#58;//svn.pspdev.org/psp/trunk/psptoolchain/newlib-1.13.0.patch | patch -p1; &#125;",
     "&#123; cd newlib-1.13.0 && mkdir -p build-\$target && cd build-\$target && ../configure --prefix=$PSPDEV --target=\$target && CPPFLAGS='-G0' $make && $make install && $make clean; &#125;",
    &#93;,
And here's what it looks like in action:

Code: Select all

$ ../toolchain.pl

Dependencies&#58;
 gcc&#58;           Found!
 make&#58;          Found!
 wget&#58;          Found!
 patch&#58;         Found!
 svn&#58;           Found!
 privs&#58;         Found!
 automake&#58;      Found!
 autoconf&#58;      Found!

Step 1 of 6&#58; binutils-2.14
 downloading&#58;   Done!
 unpacking&#58;     Done!
 patching&#58;      Done!
 building&#58;
  ee&#58;           Done!
  iop&#58;          Done!
  dvp&#58;          Done!

Step 2 of 6&#58; gcc-3.2.2 &#40;C&#41;
 downloading&#58;   Done!
 unpacking&#58;     Done!
 patching&#58;      Done!
 building&#58;
  ee&#58;           Done!
  iop&#58;          Done!

Step 3 of 6&#58; newlib-1.10.0
 downloading&#58;   Done!
 unpacking&#58;     Done!
 patching&#58;      Done!
 building&#58;
  ee&#58;           Done!

Step 4 of 6&#58; g++-3.2.2 &#40;C/C++&#41;
 downloading&#58;   Done!
 unpacking&#58;     Done!
 patching&#58;      Done!
 building&#58;
  ee&#58;           Done!

Step 5 of 6&#58; ps2sdk-current
 downloading&#58;	Done!
 unpacking&#58;     Done!
 patching&#58;	Done!
 building&#58;
  ee&#58;           Done!

=====================
== ERROR DETECTED! ==
=====================

Installing include/speedregs.h to /usr/local/ps2dev/ps2sdk/common/include
Installing include/tamtypes.h to /usr/local/ps2dev/ps2sdk/common/include
Installing include/tcpip.h to /usr/local/ps2dev/ps2sdk/common/include
Installing include/sys/fcntl.h to /usr/local/ps2dev/ps2sdk/common/include/sys
Installing include/sys/ioctl.h to /usr/local/ps2dev/ps2sdk/common/include/sys
Installing include/sys/select.h to /usr/local/ps2dev/ps2sdk/common/include/sys
Installing include/sys/stat.h to /usr/local/ps2dev/ps2sdk/common/include/sys
Installing include/sys/time.h to /usr/local/ps2dev/ps2sdk/common/include/sys
make&#91;1&#93;&#58; Leaving directory `/home/peori/Coding/ps2/toolchain/TEST/ps2sdk/common'
make -C samples release
make&#91;1&#93;&#58; Entering directory `/home/peori/Coding/ps2/toolchain/TEST/ps2sdk/samples'
mkdir -p /usr/local/ps2dev/ps2sdk/samples
cp -f Makefile_sample /usr/local/ps2dev/ps2sdk/samples/Makefile
cp -f Makefile.pref_sample /usr/local/ps2dev/ps2sdk/samples/Makefile.pref
cp -f Makefile.eeglobal_sample /usr/local/ps2dev/ps2sdk/samples/Makefile.eeglobal
cp -f Makefile.eeglobal_cpp_sample /usr/local/ps2dev/ps2sdk/samples/Makefile.eeglobal_cpp
cp -f Makefile.iopglobal_sample /usr/local/ps2dev/ps2sdk/samples/Makefile.iopglobal
Released samples dir.
make&#91;1&#93;&#58; Leaving directory `/home/peori/Coding/ps2/toolchain/TEST/ps2sdk/samples'
ln&#58; creating symbolic link `/usr/local/ps2dev/ee/lib/gcc-lib//3.2.2//crt0.o' to `/usr/local/ps2dev/ps2sdk/ee/startup/crt0.o'&#58; No such file or directory
Enjoy!
Panajev2001a
Posts: 100
Joined: Sat Aug 20, 2005 3:25 am

Post by Panajev2001a »

What is that ERROR DETECTED ?

Oh, related to the crt.o file ?
Panajev2001a
Posts: 100
Joined: Sat Aug 20, 2005 3:25 am

Post by Panajev2001a »

I just installed the Eclipse SDK on this Fedora Core 4 installation and I will be trying to use the Perl script to isntall all the toolchain and PSPSDK from scratch.
Panajev2001a
Posts: 100
Joined: Sat Aug 20, 2005 3:25 am

Post by Panajev2001a »

Feels new and yet a little bit too new ;).

I mean, the script execution is very neat and clean hiding away in a logfile all that screen outputs from the various configuration and compilation steps: something I am not too accustomed to when dealing with anithing in the 'NIX world :). All those "checking for <...>" "creating config" "checking if <...>" are gone ;). I think that moving it to a log file instead of outputting it to screen should save you some cycles (at least it would in all my code when I generated run-time debug messages: log file logging would be much faster than outputting tons of messaging to the console screen).

Edit: I am currently at step 6 of 6.

Edit: all done.

Edit: in the future, when we want to only update PSPSDK, should we run step 3 and step 6 or only step 6 ?
Panajev2001a
Posts: 100
Joined: Sat Aug 20, 2005 3:25 am

Post by Panajev2001a »

Samples do seem to compile, I will just have to try them on the PSP later with the EBOOT oader (FW 2.00).
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

For updating pspsdk, running step 6 should be sufficient.

Everything is logged to logfile.txt, btw.
Panajev2001a
Posts: 100
Joined: Sat Aug 20, 2005 3:25 am

Post by Panajev2001a »

ooPo wrote:For updating pspsdk, running step 6 should be sufficient.

Everything is logged to logfile.txt, btw.
I know of the log file, I was praising the choice of logging to the text file instead of outputting to the console screen :).

What does step 3 do then (if step 6 is sufficient) ? really, I am kinda curious :).
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Building newlib requires headers from pspsdk, so all step 3 does is install those headers. Unless you're rebuilding newlib you don't need to do step 3 again.
BraveDog
Posts: 29
Joined: Thu Dec 30, 2004 1:16 am
Location: Cleveland

Post by BraveDog »

Code: Select all

 building&#58;
  ee&#58;           Done!
  iop&#58;          Done!
  dvp&#58;          Done!

Step 2 of 6&#58; gcc-3.2.2 &#40;C&#41;
 downloading&#58;   Done!
 unpacking&#58;     Done!
 patching&#58;      Done!
 building&#58;
  ee&#58;           Done!
  iop&#58;          Done!

Step 3 of 6&#58; newlib-1.10.0
 downloading&#58;   Done!
 unpacking&#58;     Done!
 patching&#58;      Done!
 building&#58;
  ee&#58;           Done!

Step 4 of 6&#58; gcc-3.2.2 &#40;C/C++&#41;
 downloading&#58;   Done!
 unpacking&#58;     Done!
 patching&#58;      Done!
 building&#58;
  ee&#58;           Error!

=====================
== ERROR DETECTED! ==
=====================

/bin/sh ../libtool --tag CXX --mode=compile /usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/gcc/xgcc -shared-libgcc -B/usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/gcc/ -nostdinc++  -L/usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src -L/usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/.libs -nostdinc -B/usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/ee/newlib/ -isystem /usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/ee/newlib/targ-include -isystem /usr/local/ps2src/newtoolchain/gcc-3.2.2/newlib/libc/include -B/usr/local/ps2dev/ee/ee/bin/ -B/usr/local/ps2dev/ee/ee/lib/ -isystem /usr/local/ps2dev/ee/ee/include -nostdinc++ -I/usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/include/ee -I/usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/include -I../../../../libstdc++-v3/libsupc++  -I../../../../libstdc++-v3/libmath    -g -O2 -fno-implicit-templates  -Wall -Wno-format -W -Wwrite-strings -Winline  -fdiagnostics-show-location=once  -G0  -g    -c ../../../../libstdc++-v3/src/locale-inst.cc
/usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/gcc/xgcc -shared-libgcc -B/usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/gcc/ -nostdinc++ -L/usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src -L/usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/.libs -nostdinc -B/usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/ee/newlib/ -isystem /usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/ee/newlib/targ-include -isystem /usr/local/ps2src/newtoolchain/gcc-3.2.2/newlib/libc/include -B/usr/local/ps2dev/ee/ee/bin/ -B/usr/local/ps2dev/ee/ee/lib/ -isystem /usr/local/ps2dev/ee/ee/include -nostdinc++ -I/usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/include/ee -I/usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/include -I../../../../libstdc++-v3/libsupc++ -I../../../../libstdc++-v3/libmath -g -O2 -fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline -fdiagnostics-show-location=once -G0 -g -c ../../../../libstdc++-v3/src/locale-inst.cc -o locale-inst.o
/usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/include/bits/locale_facets.tcc&#58; In
   member function `_InIter std&#58;&#58;money_get<_CharT, _InIter>&#58;&#58;do_get&#40;_InIter, 
   _InIter, bool, std&#58;&#58;ios_base&, std&#58;&#58;_Ios_Iostate&, std&#58;&#58;basic_string<_CharT, 
   std&#58;&#58;char_traits<_CharT>, std&#58;&#58;allocator<_CharT> >&&#41; const &#91;with _CharT = 
   char, _InIter = std&#58;&#58;istreambuf_iterator<char, std&#58;&#58;char_traits<char> >&#93;'&#58;
../../../../libstdc++-v3/src/locale-inst.cc&#58;47&#58;   instantiated from here
/usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/include/bits/locale_facets.tcc&#58;1167&#58; Internal
   compiler error in schedule_block, at haifa-sched.c&#58;1714
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL&#58;http&#58;//www.gnu.org/software/gcc/bugs.html> for instructions.
make&#91;3&#93;&#58; *** &#91;locale-inst.lo&#93; Error 1
make&#91;3&#93;&#58; Leaving directory `/usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src'
make&#91;2&#93;&#58; *** &#91;all-recursive&#93; Error 1
make&#91;2&#93;&#58; Leaving directory `/usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3'
make&#91;1&#93;&#58; *** &#91;all-recursive-am&#93; Error 2
make&#91;1&#93;&#58; Leaving directory `/usr/local/ps2src/newtoolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3'
make&#58; *** &#91;all-target-libstdc++-v3&#93; Error 2


ERROR&#58; Error!


bravedog@trinity /usr/local/ps2src/newtoolchain
$ 
Well, since I was having problems with the toolchain script in svn, I thought I'd try this new one. Seemed to to work well for a while, but died in the c++ build. I have built the toolchain lots of times before. I have no idea what is messed up on my system now.
Panajev2001a
Posts: 100
Joined: Sat Aug 20, 2005 3:25 am

Post by Panajev2001a »

ooPo wrote:Building newlib requires headers from pspsdk, so all step 3 does is install those headers. Unless you're rebuilding newlib you don't need to do step 3 again.
Thanks ooPo for the explanation :).
Gary13579
Posts: 93
Joined: Mon Aug 15, 2005 7:43 am

Post by Gary13579 »

Still on step 1, but as I said on IRC, it seems to crash if you are running it from a path with a space on it (ie "/home/Gary S/newtoolchain/").
The errors: http://pastebin.com/527878

Will let you know how the rest goes.
BraveDog
Posts: 29
Joined: Thu Dec 30, 2004 1:16 am
Location: Cleveland

Post by BraveDog »

Ok, I have done much more tests. I have been only working with builing the PS2 toolchain. I have reinstalled cygwin twice and tried building it with two versions of gcc (3.4.4 and 3.3.2). They all errored on the build of libstdc++ on locale-inst.cc. However when I tried my Mandrake 10.0 box it compiled everything just fine. I think one of the packages changed recently on cygwin and now the c++ stuff has problems building. I don't think it is a problem with your script ooPo, that seems to work wonderfully. So this just seems to only be a problem in cygwin, and I think it is because of a recent change in one of cygwins packages.
I found this note in the gcc-3.2.2.patch:

Code: Select all

Personally, I had trouble getting libstdc++-v3 to build without double precision
  emulation but YMMV.  It should be possible to configure the compiler and libs
  to use single precision doubles in place of doubles, however you'd have to make
  sure that all your libs are built in this manner.
Anyone got any advice? (besides stop using cygwin :) ).
Panajev2001a
Posts: 100
Joined: Sat Aug 20, 2005 3:25 am

PROBLEM

Post by Panajev2001a »

i see that you have released a new version of the script, good :). I tried to run the last one released before it using only step 6 and it failed, but the newest one did not fail :D.


Edit: no the problem remains, in order to execute step 6 alone you first have to execute step 3 or all steps before it.
[root@IGGS newtoolchain]# ./toolchain.pl PSP 6

Dependencies:
gcc: Found!
make: Found!
wget: Found!
patch: Found!
svn: Found!
automake: Found!
autoconf: Found!
$PSPDEV: Found!
path: Found!
privs: Found!

Step 6 of 6: pspsdk-current
downloading: Done!
unpacking: Done!
patching: Done!
building:
psp: Error!

=====================
== ERROR DETECTED! ==
=====================

##

##
## Executing the following command:
##
##
##

##
## Executing the following command:
##
##
##

##
## Executing the following command:
##
## { cd pspsdk && ./configure --with-pspdev=/usr/local/pspdev && make && make install && make clean; }
##
sh: line 0: cd: pspsdk: No such file or directory


ERROR: Error!
If I run steps 3 and 6 at the same time ./toolchain.pl PSP 3 6 it works and then it lets me run step 6 alone.

(I did delete the directory in which I unpacked the new toolchain script and re-unpacked it using the new version once more, just to test it again).
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Hmm. Step 3 downloads pspsdk, step 6 doesn't as it assumes it is still downloaded.

Lemme fix that.
Panajev2001a
Posts: 100
Joined: Sat Aug 20, 2005 3:25 am

Post by Panajev2001a »

In the log file, why is it not present the SVN version of the PSPSDK downloaded (like if you browse the repository witha web server: using the old script it would say which version was checked out... I do not find it in this log file...) ? I hope not to have missed it big time.

Here is the proof of what I posted earlier:
[root@IGGS newtoolchain]# ./toolchain.pl PSP 6

Dependencies:
gcc: Found!
make: Found!
wget: Found!
patch: Found!
svn: Found!
automake: Found!
autoconf: Found!
$PSPDEV: Found!
path: Found!
privs: Found!

Step 6 of 6: pspsdk-current
downloading: Done!
unpacking: Done!
patching: Done!
building:
psp: Error!

=====================
== ERROR DETECTED! ==
=====================

##

##
## Executing the following command:
##
##
##

##
## Executing the following command:
##
##
##

##
## Executing the following command:
##
## { cd pspsdk && ./configure --with-pspdev=/usr/local/pspdev && make && make install && make clean; }
##
sh: line 0: cd: pspsdk: No such file or directory


ERROR: Error!

[root@IGGS newtoolchain]# ./toolchain.pl PSP 3

Dependencies:
gcc: Found!
make: Found!
wget: Found!
patch: Found!
svn: Found!
automake: Found!
autoconf: Found!
$PSPDEV: Found!
path: Found!
privs: Found!

Step 3 of 6: pspsdk-current (headers)
downloading: Done!
unpacking: Done!
patching: Done!
building:
psp: Done!
[root@IGGS newtoolchain]# ./toolchain.pl PSP 6

Dependencies:
gcc: Found!
make: Found!
wget: Found!
patch: Found!
svn: Found!
automake: Found!
autoconf: Found!
$PSPDEV: Found!
path: Found!
privs: Found!

Step 6 of 6: pspsdk-current
downloading: Done!
unpacking: Done!
patching: Done!
building:
psp: Done!
[root@IGGS newtoolchain]#

Edit: oh, so it was a bug :). At least I was not yelling for a no-issue this time :).
Panajev2001a
Posts: 100
Joined: Sat Aug 20, 2005 3:25 am

Post by Panajev2001a »

One more thing, the doxygen documentation for PSPSDK... in which directory is it (dumb question I know) ?

The docs directory does not seem to be generated :(.

(not in /usr/local/pspdev/psp/ or /usr/local/pspdev/psp/sdk/ at least and I just installed dot :()
Panajev2001a
Posts: 100
Joined: Sat Aug 20, 2005 3:25 am

Still problems. Newer ones at least...

Post by Panajev2001a »

[root@IGGS Panajev]# rm -rf newtoolchain
[root@IGGS Panajev]# tar -zxvf downloads/newtoolchain-20060202.tgz
newtoolchain/
newtoolchain/toolchain.pl
newtoolchain/patches/
newtoolchain/patches/binutils-2.16.1-GP2X.patch
newtoolchain/patches/freetype-2.1.10-GP2X.patch
newtoolchain/patches/gcc-4.0.2-GP2X.patch
newtoolchain/patches/glibc-2.3.5-GP2X.patch
newtoolchain/patches/jpeg-6b-GP2X.patch
newtoolchain/patches/libpng-1.2.8-GP2X.patch
newtoolchain/patches/SDL-1.2.9-GP2X-paeryn.patch
newtoolchain/patches/SDL_image-1.2.4-GP2X.patch
newtoolchain/patches/SDL_mixer-1.2.6-GP2X.patch
newtoolchain/patches/SDL_ttf-2.0.7-GP2X.patch
newtoolchain/patches/libogg-1.1.3-GP2X.patch
newtoolchain/patches/libvorbis-1.1.2-GP2X.patch
newtoolchain/patches/libmikmod-3.1.11-GP2X.patch
newtoolchain/patches/smpeg-0.4.4-GP2X.patch
newtoolchain/patches/SDL_gfx-2.0.13-GP2X.patch
newtoolchain/README
newtoolchain/README.PS2
newtoolchain/README.PSP
newtoolchain/README.GP2X
[root@IGGS Panajev]# cd newtoolchain
[root@IGGS newtoolchain]# ./toolchain.pl PSP 6

Dependencies:
gcc: Found!
make: Found!
wget: Found!
patch: Found!
svn: Found!
automake: Found!
autoconf: Found!
$PSPDEV: Found!
path: Found!
privs: Found!

Step 6 of 6: pspsdk-current
downloading: Done!
unpacking: Done!
patching: Done!
building:
psp: Error!

=====================
== ERROR DETECTED! ==
=====================

Checked out revision 1778.

##
## Executing the following command:
##
##
##

##
## Executing the following command:
##
##
##

##
## Executing the following command:
##
## { cd pspsdk && ./configure --with-pspdev=/usr/local/pspdev && make && make install && make clean; }
##
sh: ./configure: No such file or directory


ERROR: Error!

[root@IGGS newtoolchain]#

Yet, running steps 3 and 6 works as a charm:
[root@IGGS newtoolchain]# ./toolchain.pl PSP 3 6

Dependencies:
gcc: Found!
make: Found!
wget: Found!
patch: Found!
svn: Found!
automake: Found!
autoconf: Found!
$PSPDEV: Found!
path: Found!
privs: Found!

Step 3 of 6: pspsdk-current (headers)
downloading: Done!
unpacking: Done!
patching: Done!
building:
psp: Done!

Step 6 of 6: pspsdk-current
downloading: Done!
unpacking: Done!
patching: Done!
building:
psp: Done!
BraveDog
Posts: 29
Joined: Thu Dec 30, 2004 1:16 am
Location: Cleveland

Post by BraveDog »

ooPo,
Great job on the script, can I suggest that in the PS2 section to have it set PS2SDKSRC to the place where it does the svn checkout?
ie. export PS2SDKSRC=`pwd`/ps2sdk or something similar.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

It downloads ps2sdk to the exact same place it downloads the rest of the software. Why would you need a way to specify a different location for just that specific package?
BraveDog
Posts: 29
Joined: Thu Dec 30, 2004 1:16 am
Location: Cleveland

Post by BraveDog »

Well, it was in the old toolchain.sh.

Code: Select all

  ## Check out the latest source.
  cvs -d $CVSROOT checkout ps2sdk

  ## Enter the source directory.
  cd ps2sdk

  ## Configure the source.
  export PS2SDKSRC="`pwd`"

  ## Build the source.
  $MAKE clean; $MAKE || &#123; echo "ERROR BUILDING PS2SDK"; exit; &#125;

  ## Install the result.
  $MAKE release || &#123; echo "ERROR INSTALLING PS2SDK"; exit; &#125;

  ## Replace newlib's crt0 with the one in ps2sdk.
  ln -sf $&#40;PS2SDK&#41;/ee/startup/crt0.o $&#40;PS2DEV&#41;/ee/lib/gcc-lib/ee/3.2.2/
  ln -sf $&#40;PS2SDK&#41;/ee/startup/crt0.o $&#40;PS2DEV&#41;/ee/ee/lib/
This would ensure that is uses code and tools like bin2s from the directory it just fetched. Mine was set to where I usually checkout ps2sdk on my own. This way I can have a older 'stable' ps2sdk sandbox and the toolchain grabs the latest and greatest. If you feel this should change, that is fine. I will just make sure to set $PS2SDKSRC to where the toolchain script will be building from.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Wasn't that a leftover from back when ps2sdk needed $PS2SDKSRC set to build properly? I think it automatically sets it now when it doesn't exist.

Code: Select all

ifeq &#40;x$&#40;PS2SDKSRC&#41;, x&#41;
  export PS2SDKSRC=$&#40;shell pwd&#41;
endif
That's from the current ps2sdk makefile.
BraveDog
Posts: 29
Joined: Thu Dec 30, 2004 1:16 am
Location: Cleveland

Post by BraveDog »

Ah, ok. Well then I guess I need to unset this variable. Then all should work fine.
Panajev2001a
Posts: 100
Joined: Sat Aug 20, 2005 3:25 am

Post by Panajev2001a »

[root@IGGS newtoolchain]# ./toolchain.pl PSP 6

Dependencies:
gcc: Found!
make -j2: Found!
wget: Found!
patch: Found!
svn: Found!
automake: Found!
autoconf: Found!
$PSPDEV: Found!
path: Found!
privs: Found!

Step 6 of 6: pspsdk-current
downloading: Done!
unpacking: Done!
patching: Done!
building:
psp: Error!

=====================
== ERROR DETECTED! ==
=====================

Checked out revision 1796.

##
## Executing the following command:
##
##
##

##
## Executing the following command:
##
##
##

##
## Executing the following command:
##
## { cd pspsdk && ./configure --with-pspdev=/usr/local/pspdev && make -j2 && make -j2 install && make -j2 clean; }
##
sh: ./configure: No such file or directory


ERROR: Error!
New revision of the script, new error... sorry ooPo :(.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Yeah, I see it isn't running the bootstrap command before trying to configure.

I'll fix it. In the meantime, use: ./toolchain.pl 3 6

Step 3 will download and properly set up pspsdk for step 6.
Panajev2001a
Posts: 100
Joined: Sat Aug 20, 2005 3:25 am

Post by Panajev2001a »

ooPo wrote:Yeah, I see it isn't running the bootstrap command before trying to configure.

I'll fix it. In the meantime, use: ./toolchain.pl 3 6

Step 3 will download and properly set up pspsdk for step 6.
I am doing that, jsut reporting any problems with the command that only asks for step 6 when I see a new release. For my own needs I make it run steps 3 and 6 of course :).

Thanks again for the new script btw :).
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Fixed and updated. Grab the 20060211 version from my site:

http://www.oopo.net/consoledev
Paolo
Posts: 12
Joined: Tue Nov 08, 2005 12:34 am

Post by Paolo »

Hi!
I installed fresh version of Cygwin to c:\cygwin and added the following lines to .bashrc:

export PSPDEV="/usr/local/pspdev"
export PATH="$PATH:$PSPDEV/bin"

Then I extracted and executed the new toolchain (newtoolchain-20060211.tgz).
After a while it gave the following error: (Last lines from log)

Code: Select all

rm -f ./libgcc.a
psp-ar  rc ./libgcc.a libgcc/./_muldi3.o libgcc/./_negdi2.o libgcc/./_lshrdi3.o libgcc/./_ashldi3.o libgcc/./_ashrdi3.o libgcc/./_cmpdi2.o libgcc/./_ucmpdi2.o libgcc/./_floatdidf.o libgcc/./_floatdisf.o libgcc/./_fixunsdfsi.o libgcc/./_fixunssfsi.o libgcc/./_fixunsdfdi.o libgcc/./_fixdfdi.o libgcc/./_fixunssfdi.o libgcc/./_fixsfdi.o libgcc/./_fixxfdi.o libgcc/./_fixunsxfdi.o libgcc/./_floatdixf.o libgcc/./_fixunsxfsi.o libgcc/./_fixtfdi.o libgcc/./_fixunstfdi.o libgcc/./_floatditf.o libgcc/./_clear_cache.o libgcc/./_enable_execute_stack.o libgcc/./_trampoline.o libgcc/./__main.o libgcc/./_absvsi2.o libgcc/./_absvdi2.o libgcc/./_addvsi3.o libgcc/./_addvdi3.o libgcc/./_subvsi3.o libgcc/./_subvdi3.o libgcc/./_mulvsi3.o libgcc/./_mulvdi3.o libgcc/./_negvsi2.o libgcc/./_negvdi2.o libgcc/./_ctors.o libgcc/./_ffssi2.o libgcc/./_ffsdi2.o libgcc/./_clz.o libgcc/./_clzsi2.o libgcc/./_clzdi2.o libgcc/./_ctzsi2.o libgcc/./_ctzdi2.o libgcc/./_popcount_tab.o libgcc/./_popcountsi2.o libgcc/./_popcountdi2.o libgcc/./_paritysi2.o libgcc/./_paritydi2.o libgcc/./_powisf2.o libgcc/./_powidf2.o libgcc/./_powixf2.o libgcc/./_powitf2.o libgcc/./_mulsc3.o libgcc/./_muldc3.o libgcc/./_mulxc3.o libgcc/./_multc3.o libgcc/./_divsc3.o libgcc/./_divdc3.o libgcc/./_divxc3.o libgcc/./_divtc3.o libgcc/./_eprintf.o libgcc/./__gcc_bcmp.o libgcc/./_divdi3.o libgcc/./_moddi3.o libgcc/./_udivdi3.o libgcc/./_umoddi3.o libgcc/./_udiv_w_sdiv.o libgcc/./_udivmoddi4.o libgcc/./_pack_sf.o libgcc/./_unpack_sf.o libgcc/./_addsub_sf.o libgcc/./_mul_sf.o libgcc/./_div_sf.o libgcc/./_fpcmp_parts_sf.o libgcc/./_compare_sf.o libgcc/./_eq_sf.o libgcc/./_ne_sf.o libgcc/./_gt_sf.o libgcc/./_ge_sf.o libgcc/./_lt_sf.o libgcc/./_le_sf.o libgcc/./_unord_sf.o libgcc/./_si_to_sf.o libgcc/./_sf_to_si.o libgcc/./_negate_sf.o libgcc/./_make_sf.o libgcc/./_sf_to_df.o libgcc/./_sf_to_tf.o libgcc/./_thenan_sf.o libgcc/./_sf_to_usi.o libgcc/./_usi_to_sf.o libgcc/./_pack_df.o libgcc/./_unpack_df.o libgcc/./_addsub_df.o libgcc/./_mul_df.o libgcc/./_div_df.o libgcc/./_fpcmp_parts_df.o libgcc/./_compare_df.o libgcc/./_eq_df.o libgcc/./_ne_df.o libgcc/./_gt_df.o libgcc/./_ge_df.o libgcc/./_lt_df.o libgcc/./_le_df.o libgcc/./_unord_df.o libgcc/./_si_to_df.o libgcc/./_df_to_si.o libgcc/./_negate_df.o libgcc/./_make_df.o libgcc/./_df_to_sf.o libgcc/./_df_to_tf.o libgcc/./_thenan_df.o libgcc/./_df_to_usi.o libgcc/./_usi_to_df.o libgcc/./unwind-dw2.o libgcc/./unwind-dw2-fde.o libgcc/./unwind-sjlj.o libgcc/./gthr-gnat.o libgcc/./unwind-c.o
make&#91;2&#93;&#58; psp-ar&#58; Command not found
make&#91;2&#93;&#58; *** &#91;libgcc.a&#93; Error 127
make&#91;2&#93;&#58; Leaving directory `/home/Administrator/newtoolchain/gcc-4.0.2/build-psp/gcc'
make&#91;1&#93;&#58; *** &#91;stmp-multilib&#93; Error 2
make&#91;1&#93;&#58; Leaving directory `/home/Administrator/newtoolchain/gcc-4.0.2/build-psp/gcc'
make&#58; *** &#91;all-gcc&#93; Error 2

What did I miss? It says that psp-ar not found, but I can find psp-ar.exe in c:\cygwin\usr\local\pspdev\bin

Any help would be appreciated, my previous pspsdk installation broke somehow, and I haven't been able to reinstall it, no matter what I try... :(

Btw, new toolchain script looks nice!!! :D
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

When you added those lines to your .bashrc, did you quit and re-open the cygwin shell window before trying to run the toolchain script?

Adding stuff to your startup script only works if you restart.
User avatar
harleyg
Posts: 123
Joined: Wed Oct 05, 2005 6:15 am

Post by harleyg »

no.
you can use source ~/.bashrc...
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

As I always state when someone thinks they're smart for piping up out of nowhere with a semingly more-clever method...

This is a new user. I am trying to make sure he understands the basics before telling him the advanced stuff.

Kthxbai.
Post Reply