Problem with psptoolchain and Mandriva Spring 2008

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

Moderators: cheriff, TyRaNiD

Post Reply
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Problem with psptoolchain and Mandriva Spring 2008

Post by sakya »

Hi! :)

I'm having trouble with psptoolchain on Mandrive 2008 Spring.
The toolchain and libraries installs without problems, but then the eboot generated (also the sdk examples) doesen't work on PSP (black screen and then shuts down).

I red this thread
http://forums.ps2dev.org/viewtopic.php?t=10407
but I installed it this morning from svn and the problem is still here.

The only strange thing during the installation is that I had a problem with newlib:

Code: Select all

error: `CFLAGS' has changed since the previous run:
but I found a solution here (just a patch to the Makefile.in):
http://sourceware.org/ml/newlib/2006/msg00472.html

Does someone know how to solve this problem and make the toolchain work?

I'm using:
automake (GNU automake) 1.10.1
autoconf (GNU Autoconf) 2.61
aclocal (GNU automake) 1.10.1

Many thanks in advance. :)

Ciaooo
Sakya
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Hi sakya,

Ensure you run a full re-install.

Code: Select all

cd psptoolchain
svn update
./toolchain.sh
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)
Insert_witty_name wrote:Hi sakya,

Ensure you run a full re-install.

Code: Select all

cd psptoolchain
svn update
./toolchain.sh
Many thanks for you reply, but no luck: the problem is still present.
I completely removed the /usr/local/pspdev directory and reinstalled all the toolchain.
Any idea?

Many thanks again. ;)
Ciaooo
Sakya
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Well, I just did a complete reinstall from scratch of the toolchain and libs under Ubuntu 8.04 which works fine. So if you're on the very latest, it's not the issue in the thread you linked. Can you give a few lines around the error you reported? You might redirect the output to a file to make sure you don't miss anything. It's possible that there are other errors that you didn't see.
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)
J.F. wrote:Well, I just did a complete reinstall from scratch of the toolchain and libs under Ubuntu 8.04 which works fine.
I tried on Ubuntu 8.04 and had no problem (but I don't like Ubuntu, so I installed Mandriva).
You might redirect the output to a file to make sure you don't miss anything. It's possible that there are other errors that you didn't see.
Here's the error:

Code: Select all

configure: running /bin/sh '../../../../newlib/libc/configure' --prefix=/usr/local/pspdev  '--cache-file=./config.cache' '--build=i686-pc-linux-gnu' '--host=psp' '--target=psp' '--with-newlib' '--enable-multilib' '--with-cross-host=i686-pc-linux-gnu' '--prefix=/usr/local/pspdev' '--program-transform-name=s,^,psp-,; ' '--with-target-subdir=psp' '--srcdir=../../../newlib' 'CC=psp-gcc -B/home/sakya/PSP/psptoolchain/build/newlib-1.15.0/build-psp/psp/newlib/ -isystem /home/sakya/PSP/psptoolchain/build/newlib-1.15.0/build-psp/psp/newlib/targ-include -isystem /home/sakya/PSP/psptoolchain/build/newlib-1.15.0/newlib/libc/include' 'CFLAGS=-O2 ' 'CPPFLAGS=' 'LDFLAGS=' 'build_alias=i686-pc-linux-gnu' 'host_alias=psp' 'target_alias=psp' --cache-file=.././config.cache --srcdir=../../../../newlib/libc
configure: loading cache .././config.cache
configure: error: `CFLAGS' has changed since the previous run:
configure:   former value:  -O2
configure:   current value: -O2
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm .././config.cache' and start over
configure: error: /bin/sh '../../../../newlib/libc/configure' failed for libc
make[1]: *** [configure-target-newlib] Error 1
make[1]: Leaving directory `/home/sakya/PSP/psptoolchain/build/newlib-1.15.0/build-psp'
make: *** [all] Error 2
../scripts/004-newlib-1.15.0.sh: Failed.
To solve this error I just patched the Makefile.in this way (and then all goes ok till the end, also libraries build fine):

Code: Select all

< CFLAGS_FOR_TARGET = -O2 $&#40;CFLAGS&#41; $&#40;SYSROOT_CFLAGS_FOR_TARGET&#41;
---
> #CFLAGS_FOR_TARGET = -O2 $&#40;CFLAGS&#41; $&#40;SYSROOT_CFLAGS_FOR_TARGET&#41;
> CFLAGS_FOR_TARGET = $&#40;strip -O2 $&#40;CFLAGS&#41; $&#40;SYSROOT_CFLAGS_FOR_TARGET&#41;&#41;
339c340,341
< CXXFLAGS_FOR_TARGET = $&#40;CXXFLAGS&#41; $&#40;SYSROOT_CFLAGS_FOR_TARGET&#41;
---
> #CXXFLAGS_FOR_TARGET = $&#40;CXXFLAGS&#41; $&#40;SYSROOT_CFLAGS_FOR_TARGET&#41;
> CXXFLAGS_FOR_TARGET = $&#40;strip $&#40;CXXFLAGS&#41; $&#40;SYSROOT_CFLAGS_FOR_TARGET&#41;&#41;
Many thanks for your help. :)

Ciaooo
Sakya
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Hmm... when I delete everything in newlib-1.15.0/build-psp/ and then do the config, this is what I get:

Code: Select all

jlfenton@jlfenton-desktop&#58;~/projects/psp/psptoolchain/build/newlib-1.15.0/build-psp$ ../configure --prefix="$PSPDEV" --target="psp"
creating cache ./config.cache
checking host system type... x86_64-unknown-linux-gnu
checking target system type... mipsallegrexel-psp-elf
checking build system type... x86_64-unknown-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler &#40;gcc  &#41; works... yes
checking whether the C compiler &#40;gcc  &#41; is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for gnatbind... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... no
*** This configuration is not supported in the following subdirectories&#58;
     target-libgloss
    &#40;Any other directories should still work fine.&#41;
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... no
checking for runtest... no
checking for x86_64-unknown-linux-gnu-ar... no
checking for ar... ar
checking for x86_64-unknown-linux-gnu-as... no
checking for as... as
checking for x86_64-unknown-linux-gnu-dlltool... no
checking for dlltool... no
checking for x86_64-unknown-linux-gnu-ld... no
checking for ld... ld
checking for x86_64-unknown-linux-gnu-lipo... no
checking for lipo... no
checking for x86_64-unknown-linux-gnu-nm... no
checking for nm... nm
checking for x86_64-unknown-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for x86_64-unknown-linux-gnu-strip... no
checking for strip... strip
checking for x86_64-unknown-linux-gnu-windres... no
checking for windres... no
checking for x86_64-unknown-linux-gnu-objcopy... no
checking for objcopy... objcopy
checking for x86_64-unknown-linux-gnu-objdump... no
checking for objdump... objdump
checking for psp-cc... no
checking for psp-gcc... psp-gcc
checking for psp-c++... psp-c++
checking for psp-gcc... psp-gcc
checking for psp-gcj... no
checking for psp-gfortran... no
checking for ar... no
checking for psp-ar... psp-ar
checking for as... no
checking for psp-as... psp-as
checking for dlltool... no
checking for psp-dlltool... no
checking for ld... no
checking for psp-ld... psp-ld
checking for lipo... no
checking for psp-lipo... no
checking for nm... no
checking for psp-nm... psp-nm
checking for objdump... no
checking for psp-objdump... psp-objdump
checking for ranlib... no
checking for psp-ranlib... psp-ranlib
checking for strip... no
checking for psp-strip... psp-strip
checking for windres... no
checking for psp-windres... no
checking where to find the target ar... pre-installed
checking where to find the target as... pre-installed
checking where to find the target cc... pre-installed
checking where to find the target c++... pre-installed
checking where to find the target c++ for libstdc++... pre-installed
checking where to find the target dlltool... pre-installed
checking where to find the target gcc... pre-installed
checking where to find the target gcj... pre-installed
checking where to find the target gfortran... pre-installed
checking where to find the target ld... pre-installed
checking where to find the target lipo... pre-installed
checking where to find the target nm... pre-installed
checking where to find the target objdump... pre-installed
checking where to find the target ranlib... pre-installed
checking where to find the target strip... pre-installed
checking where to find the target windres... pre-installed
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether -fkeep-inline-functions is supported... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
It looks like you have a config.cache file that it's checking and finding a problem with. If you delete everything in the build-psp directory and run that config command, it should go through as there won't be a cache file. Then just do the make:

Code: Select all

make clean && make -j 2 && make install && make clean
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)

Still no luck.
Here's the configure output:

Code: Select all

creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... mipsallegrexel-psp-elf
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler &#40;gcc  &#41; works... yes
checking whether the C compiler &#40;gcc  &#41; is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for gnatbind... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... no
*** This configuration is not supported in the following subdirectories&#58;
     target-libgloss
    &#40;Any other directories should still work fine.&#41;
*** removing etc/Makefile to force reconfigure
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... no
checking for runtest... no
checking for i686-pc-linux-gnu-ar... no
checking for ar... ar
checking for i686-pc-linux-gnu-as... no
checking for as... as
checking for i686-pc-linux-gnu-dlltool... no
checking for dlltool... no
checking for i686-pc-linux-gnu-ld... no
checking for ld... ld
checking for i686-pc-linux-gnu-lipo... no
checking for lipo... no
checking for i686-pc-linux-gnu-nm... no
checking for nm... nm
checking for i686-pc-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for i686-pc-linux-gnu-strip... no
checking for strip... strip
checking for i686-pc-linux-gnu-windres... no
checking for windres... no
checking for i686-pc-linux-gnu-objcopy... no
checking for objcopy... objcopy
checking for i686-pc-linux-gnu-objdump... no
checking for objdump... objdump
checking for psp-cc... no
checking for psp-gcc... psp-gcc
checking for psp-c++... psp-c++
checking for psp-gcc... psp-gcc
checking for psp-gcj... no
checking for psp-gfortran... no
checking for ar... no
checking for psp-ar... psp-ar
checking for as... no
checking for psp-as... psp-as
checking for dlltool... no
checking for psp-dlltool... no
checking for ld... no
checking for psp-ld... psp-ld
checking for lipo... no
checking for psp-lipo... no
checking for nm... no
checking for psp-nm... psp-nm
checking for objdump... no
checking for psp-objdump... psp-objdump
checking for ranlib... no
checking for psp-ranlib... psp-ranlib
checking for strip... no
checking for psp-strip... psp-strip
checking for windres... no
checking for psp-windres... no
checking where to find the target ar... pre-installed
checking where to find the target as... pre-installed
checking where to find the target cc... pre-installed
checking where to find the target c++... pre-installed
checking where to find the target c++ for libstdc++... pre-installed
checking where to find the target dlltool... pre-installed
checking where to find the target gcc... pre-installed
checking where to find the target gcj... pre-installed
checking where to find the target gfortran... pre-installed
checking where to find the target ld... pre-installed
checking where to find the target lipo... pre-installed
checking where to find the target nm... pre-installed
checking where to find the target objdump... pre-installed
checking where to find the target ranlib... pre-installed
checking where to find the target strip... pre-installed
checking where to find the target windres... pre-installed
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether -fkeep-inline-functions is supported... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
But when I compile I get the same error.

Code: Select all

 configure&#58; loading cache .././config.cache
configure&#58; error&#58; `CFLAGS' has changed since the previous run&#58;
configure&#58;   former value&#58;  -O2
configure&#58;   current value&#58; -O2
configure&#58; error&#58; changes in the environment can compromise the build
configure&#58; error&#58; run `make distclean' and/or `rm .././config.cache' and start over
configure&#58; error&#58; /bin/sh '../../../../newlib/libc/configure' failed for libc
make&#91;1&#93;&#58; *** &#91;configure-target-newlib&#93; Error 1
make&#91;1&#93;&#58; Leaving directory `/home/sakya/PSP/psptoolchain/build/newlib-1.15.0/build-psp'
make&#58; *** &#91;all&#93; Error 2
Many thanks for your help. :)

Ciaooo
Sakya
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

sakya wrote: But when I compile I get the same error.

Code: Select all

 configure&#58; loading cache .././config.cache
configure&#58; error&#58; `CFLAGS' has changed since the previous run&#58;
configure&#58;   former value&#58;  -O2
configure&#58;   current value&#58; -O2
configure&#58; error&#58; changes in the environment can compromise the build
configure&#58; error&#58; run `make distclean' and/or `rm .././config.cache' and start over
configure&#58; error&#58; /bin/sh '../../../../newlib/libc/configure' failed for libc
make&#91;1&#93;&#58; *** &#91;configure-target-newlib&#93; Error 1
make&#91;1&#93;&#58; Leaving directory `/home/sakya/PSP/psptoolchain/build/newlib-1.15.0/build-psp'
make&#58; *** &#91;all&#93; Error 2
Uh... if you're compiling, then why does it say "configure:"? Did you cd into psp-build and do the make line I gave above (straight from the script)? To make by hand, delete stuff in psp-build, cd into it, run the configure line, then run the make line. Don't try to execute the script or the makefile at the base level.
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Are you absolutely positive you have the latest subversion revision of psptoolchain sakya (2395 as of this post)?

The setting of CFLAGS = -O2 was something that was added to toolchain.sh in revision 2392 which I removed in 2395.
sakya
Posts: 190
Joined: Fri Apr 28, 2006 5:48 pm
Contact:

Post by sakya »

Hi! :)

@J.F.:
Yes, I cd in the psp-build directory, removed all files and launched the configure, then launched "make clean" and "make".

@Insert_witty_name:
Yes, revision is 2395.
I tried also on a desktop running Mandriva 2007 (I never installed the toolchain on this pc before) and I get the same exact error with newlib (with -O2).
Seems really related to Mandriva!?

Many thanks for your help
Ciaooo
Sakya
Post Reply