I am on a Gentoo 64-bit system, and have been attempting to install the psptoolchain. Unfortunately, the script fails part of the way through. I am unsure of the problem. I have tried multiple versions of gcc including 4.1.2, 4.2.4, 4.3.4, and 4.4.1. None build the toolchain correctly. Here is the most recent failure with 4.1.2
Different error, I think it occured earlier, which means it's probably better to use 4.1.2 to try and compile the toolchain. Any idea why it failed the first time?
There are toolchain gcc/binutils bugs... Try modifying the scripts to add CFLAGS=-O0 when compiling the toolchain gcc and binutils, see if that helps anything.
First, it's failing at newlib, not binutils or gcc. The second post was showing that using a version of gcc newer than 4.1.2 causes compile to fail on gcc.
Second, the configure scripts look like they are using CFLAGS that are not defined in the script. As such, it seems they'd be using my global CFLAGS settings. I've tried messing with those, but so far no success.
Tristanm11 wrote:First, it's failing at newlib, not binutils or gcc.
Yes it is, it is psp-ar crashing while building newlib. psp-ar is part of binutils. Changing your build options when you build binutils will likely avoid the bug in psp-ar.
The second post was showing that using a version of gcc newer than 4.1.2 causes compile to fail on gcc.
That's what I was addressing. Your first post didn't actually show any errors (you may need to look earlier in the output for it, and/or in config.log).
Second, the configure scripts look like they are using CFLAGS that are not defined in the script. As such, it seems they'd be using my global CFLAGS settings. I've tried messing with those, but so far no success.
Made the recommended change. Tried gcc 4.1 and 4.4. Still fails at the same point. Nothing else in that post helps as the only two suggestions are that fix and use an older compiler.
Disabling the stack protector should definitely fix the "gcc 4.4.1" trace that you posted -- with it disabled, such a trace should never happen. If you're still seeing it, I suspect your CFLAGS settings aren't getting applied to the binutils compilation correctly.
As I already said, that does not show any actual errors. You'll have to find the actual error, which is probably in earlier output, or config.log, or any other generated files.
checking whether build environment is sane... config.status: creating Makefile
make[2]: Entering directory `/usr/src/psptoolchain/build/newlib-1.15.0/build-psp/etc'
for f in standards.info configure.info; do \
if test -f ../../etc/`echo $f | sed -e 's/.info$/.texi/'`; then \
if make "MAKEINFO=/usr/src/psptoolchain/build/newlib-1.15.0/missing makeinfo --split-size=5000000 --split-size=5000000" $f; then \
true; \
else \
exit 1; \
fi; \
fi; \
done
make[3]: Entering directory `/usr/src/psptoolchain/build/newlib-1.15.0/build-psp/etc'
/usr/src/psptoolchain/build/newlib-1.15.0/missing makeinfo --split-size=5000000 --split-size=5000000 --no-split -I../../etc -o standards.info ../../etc/standards.texi
WARNING: `makeinfo' is missing on your system. You should only need it if
you modified a `.texi' or `.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy `make' (AIX,
DU, IRIX). You might want to install the `Texinfo' package or
the `GNU make' package. Grab either from any GNU archive site.
make[3]: *** [standards.info] Error 1
make[3]: Leaving directory `/usr/src/psptoolchain/build/newlib-1.15.0/build-psp/etc'
make[2]: *** [info] Error 1
make[2]: Leaving directory `/usr/src/psptoolchain/build/newlib-1.15.0/build-psp/etc'
make[1]: *** [all-etc] Error 2
make[1]: *** Waiting for unfinished jobs....
yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
Old configure script don't recognize the new versions due to the poor method used to check the version. You need to edit the configure script before running it and change the version detection method. Look for
if ${MAKEINFO} --version \
| egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
if ${MAKEINFO} --version \
| egrep 'texinfo[^0-9]*(4\.([4-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
The old method assumed that the version would only go to 4.9, so it broke when the version reached 4.10. New configure scripts have the fix, but old ones will give a missing makeinfo error due to the problem recognizing makeinfo greater than 4.9.
Well, I got the svn version ( I was previously trying with the snapshot that's hosted on the website. ) I managed to get it to compile correctly with some messing with the CFLAGS. Now I'm onto psplibraries. Unfortunately, I'm getting compile crashes there as well.
the copy of psplibraries is the latest from the ps2dev.org svn repositories.
cp -f bzlib.h /usr/local/pspdev/psp/include
chmod a+r /usr/local/pspdev/psp/include/bzlib.h
cp -f libbz2.a /usr/local/pspdev/psp/lib
chmod a+r /usr/local/pspdev/psp/lib/libbz2.a
rm -f *.o libbz2.a
At revision 2469.
running `aclocal -I .'
running `libtoolize --copy'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
running `autoconf'
cd builds/unix; ./configure --host psp --prefix=/usr/local/pspdev/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... /bin/sh: ./config.guess: No such file or directory
configure: error: cannot guess build type; you must specify one
make: *** [builds/unix/unix-def.mk] Error 1
../scripts/003-freetype.sh: Failed.
The CFLAGS suggested further up in the thread. The problems were that the tarball on the website is an older version. The svn worked almost perfectly. The only problem was binutils, which I fixed with: "$CFLAGS -fno-stack-protector -D_FORTIFY_SOURCE=0" as my CFLAGS
My global CFLAGS settings are "-O2 -march=athlon64 -pipe"
It provides a snapshot/instructions which does not work for Ubuntu 9.10 or various Red Hat Linux versions that I tried.
There were a lot of stale references and after googling/reading different posts, I finally checked out the latest versions and was successful.
What I ended up doing was running:
svn co svn://svn.ps2dev.org/psp/trunk/psptoolchain psptoolchain
svn co svn://svn.ps2dev.org/psp/trunk/psplibraries psplibraries
and then following the instructions in the readme file for Ubuntu in psptoolchain directory.
Someone should replace the page at ttp://ps2dev.org/psp/Tools/Toolchain with instructions that you should make sure you have Subversion installed and then run the above "svn co..." commands.