PSP Toolchain error

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

Moderators: cheriff, TyRaNiD

Post Reply
AussieCannon
Posts: 5
Joined: Thu May 24, 2007 3:38 pm

PSP Toolchain error

Post by AussieCannon »

Hello,
Today May 23 I was trying to set up the psptoolchain on ubuntu feisty fawn and I was following the readme instructions which were

Code: Select all

    ## Make the script executable.
    chmod a+x ./toolchain.sh

    ## Run the script.
    ./toolchain.sh
I did that then it went for a while and when it finished I got an error

Code: Select all

mkdir -p -- ./bfd
Configuring in bfd
configure: creating cache ./config.cache
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... Invalid configuration `psp': machine `psp' not recognized
configure: error: /bin/sh ../../bfd/../config.sub psp failed
make: *** [configure-bfd] Error 1
ERROR BUILDING BINUTILS
(not sure if having more from above it will help but if so let me know)

I was wondering if you could help me finish sucessfully getting this setup

Many Thanks,

AussieCannon
AussieCannon
Posts: 5
Joined: Thu May 24, 2007 3:38 pm

Another Error

Post by AussieCannon »

I have managed to get past that error, even though i am getting lots of them, and some fix themselves or something but i have another error with the psptoolchain it is telling me to add /usr/local/pspdev/bin to my path but it is already there. this is shown in this screenshot
Image
any ideas?

Many Thanks

AussieCannon[/img]
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

That's a very strange thing to happen. Here's the part that's failing:

Code: Select all

 ## Check for $PSPDEV/bin in the path.
 echo $PATH | grep $PSPDEV/bin 1> /dev/null || { echo "ERROR: Add $PSPDEV/bin to your path before continuing."; exit 1; }
Maybe you don't have grep installed? I don't know... that's very weird. There isn't really much that can go wrong with that check. How about an invisible character somewhere in $PSPDEV, like a ctrl-G?

Did you follow the instructions?

Code: Select all

 ==================
  How do I use it?
 ==================

 1) Set up your environment by installing the following software:

  autoconf, automake, bison, flex, gcc, make, ncurses, patch, subversion, terminfo, wget

 2) Add the following to your login script:

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

 3) Run the toolchain script:

  ./toolchain.sh
Very strange indeed.
zilt
Posts: 45
Joined: Tue Feb 21, 2006 11:59 pm
Location: Ontario, Canada
Contact:

Post by zilt »

Maybe running it as 'sudo' isn't using the same path settings his regular user account. Try running it directly as root - or do as I do, just set it up with your regular user account.
"We are dreamers, shapers, singers, and makers. We study the mysteries of laser and circuit, crystal and scanner, holographic demons and invocations of equations. These are the tools we employ and we know... many things." -- Elric, B5
AussieCannon
Posts: 5
Joined: Thu May 24, 2007 3:38 pm

thanks for the responses

Post by AussieCannon »

first of all i downloaded the latest toolchain from the svn, then i followed the exact instructions and based off other errors installed more things until it worked up until this point. The weird thing is that I have been getting very variable errors, a couple of times I got errors building binutils and a few other i don't remember. In response to the invisible character i copy and pasted it from the instructions but i will go back and retype it. also it would be nice if you could tell me what grep was but i will install it. Finally when i was not running it in root or sudo i was getting no permissions to create /usr/local/pspdev/bin even though it was already there.

Edit: I just typed "sudo apt-get install grep" in terminal and it went through and said "grep is already the newest version"

Edit 2: just tried running it without sudo in my regular account and got:

Code: Select all

eric@eric-desktop:~$ cd /home/eric/Desktop/psptoolchain
eric@eric-desktop:~/Desktop/psptoolchain$ ./toolchain.sh
/usr/bin/autoconf: 44: cannot create conf5729.sh: Permission denied
/usr/bin/autoconf: 44: cannot create conf5729.sh: Permission denied
chmod: cannot access `conf5729.sh': No such file or directory
touch: cannot touch `/usr/local/pspdev/test.tmp': Permission denied
ERROR: Grant write permissions for /usr/local/pspdev before continuing.
../depends/check-pspdev.sh: Failed.
eric@eric-desktop:~/Desktop/psptoolchain$ 

Many Thanks,

AussieCannon
zilt
Posts: 45
Joined: Tue Feb 21, 2006 11:59 pm
Location: Ontario, Canada
Contact:

Post by zilt »

Just make /usr/local/pspdev owned by your user account. Become root and do the following commands:

Code: Select all

mkdir /usr/local/pspdev
chown -R eric:users /usr/local/pspdev
Then, leave root and rerun the toolchain.sh script with your regular account. The other option is to just to do the full install as root. These are all basic linux commands and unix concepts - maybe you should read up a bit on linux administration and unix C programming. Incorrect file/dir permissions can cause strange types of errors.
"We are dreamers, shapers, singers, and makers. We study the mysteries of laser and circuit, crystal and scanner, holographic demons and invocations of equations. These are the tools we employ and we know... many things." -- Elric, B5
AussieCannon
Posts: 5
Joined: Thu May 24, 2007 3:38 pm

took your advice again...

Post by AussieCannon »

tried your recommendation again... and this is the result

Code: Select all

eric@eric-desktop:~$ su - root
Password: 
root@eric-desktop:~# mkdir /usr/local/pspdev
mkdir: cannot create directory `/usr/local/pspdev': File exists
root@eric-desktop:~# chown -R eric:users /usr/local/pspdev
root@eric-desktop:~# su - erit
Unknown id: erit
root@eric-desktop:~# su - eric
eric@eric-desktop:~$ cd /home/eric/Desktop/psptoolchain
eric@eric-desktop:~/Desktop/psptoolchain$ ./toolchain.sh
/usr/bin/autoconf: 44: cannot create conf6734.sh: Permission denied
/usr/bin/autoconf: 44: cannot create conf6734.sh: Permission denied
chmod: cannot access `conf6734.sh': No such file or directory
--22:30:14--  ftp://ftp.gnu.org/pub/gnu/binutils/binutils-2.16.1.tar.bz2
           => `binutils-2.16.1.tar.bz2'
Resolving ftp.gnu.org... 199.232.41.7, 140.186.70.20
Connecting to ftp.gnu.org|199.232.41.7|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /pub/gnu/binutils ... done.
==> PASV ... done.    ==> RETR binutils-2.16.1.tar.bz2 ... done.
binutils-2.16.1.tar.bz2: Permission denied
../scripts/001-binutils-2.16.1.sh: Failed.
Edit: also i have tried installing completely in root as well it still didn't work, that was one of the first things i tried..
zilt
Posts: 45
Joined: Tue Feb 21, 2006 11:59 pm
Location: Ontario, Canada
Contact:

Post by zilt »

In your /home/eric/Desktop/psptoolchain, can you type "ls -al" and post the results. It almost seems as though that directory isn't owned by you so the script fails to save the files. I can't think of what else it might be.
AussieCannon
Posts: 5
Joined: Thu May 24, 2007 3:38 pm

Post by AussieCannon »

first

Code: Select all

eric@eric-desktop:~/Desktop/psptoolchain$ ls -al
total 36
drwxr-xr-x 7 eric eric 4096 2007-05-25 16:14 .
drwxr-xr-x 3 eric eric 4096 2007-05-25 16:20 ..
drwxr-xr-x 2 root root 4096 2007-05-25 16:29 build
drwxr-xr-x 3 eric eric 4096 2007-05-25 16:10 depends
drwxr-xr-x 3 eric eric 4096 2007-05-25 16:10 patches
drwxr-xr-x 3 eric eric 4096 2007-05-25 16:10 scripts
drwxr-xr-x 6 eric eric 4096 2007-05-25 16:12 .svn
-rwxr-xr-x 1 eric eric  567 2007-05-25 16:10 toolchain.sh
-rw-r--r-- 1 eric eric  813 2007-05-25 16:10 toolchain.txt
then i did this:

Code: Select all

eric@eric-desktop:~/Desktop/psptoolchain$ sudo chown -R eric:users /home/eric/Desktop/psptoolchain/build
Password:
eric@eric-desktop:~/Desktop/psptoolchain$ ls -al
total 36
drwxr-xr-x 7 eric eric  4096 2007-05-25 16:14 .
drwxr-xr-x 3 eric eric  4096 2007-05-25 16:20 ..
drwxr-xr-x 2 eric users 4096 2007-05-25 16:29 build
drwxr-xr-x 3 eric eric  4096 2007-05-25 16:10 depends
drwxr-xr-x 3 eric eric  4096 2007-05-25 16:10 patches
drwxr-xr-x 3 eric eric  4096 2007-05-25 16:10 scripts
drwxr-xr-x 6 eric eric  4096 2007-05-25 16:12 .svn
-rwxr-xr-x 1 eric eric   567 2007-05-25 16:10 toolchain.sh
-rw-r--r-- 1 eric eric   813 2007-05-25 16:10 toolchain.txt
eric@eric-desktop:~/Desktop/psptoolchain$ 
based off of what you had me do before

Edit: did the chown command one more time except eric:eric so that it's ownership would match up with the rest of them, and now the toolchain is running. Thank you very much, hopefully this will be the end of my troubles with the toolchain.

Many Thanks,

AussieCannon
zilt
Posts: 45
Joined: Tue Feb 21, 2006 11:59 pm
Location: Ontario, Canada
Contact:

Post by zilt »

Your build directory was owned by root, so your user wasn't able to write into it. Also, it looks like your group is 'eric' not 'users' like alot of linux systems - so you'll need to change the 'chown' command to 'chown -R eric:eric' instead to set the correct group for your account. What I don't really understand is where the call to 'autoconf' is coming from at the start of your call to 'toolchain.sh'. I've checked the script and the first thing it basically does is a 'wget' to fetch the binutils bz2 - not a call to autoconf. However, the filesize of toolchain.sh is correct, so I don't know what's going on.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Duh, I totally missed the sudo thing when he's running the script.

Of course it was't working. :)
Post Reply