toolchain and path

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

Moderators: cheriff, TyRaNiD

Post Reply
Neizan
Posts: 10
Joined: Wed Oct 31, 2007 8:19 am

toolchain and path

Post by Neizan »

Hi,

I'm from Spain and I have some troubles while installing the toolchain for PSP in my computer.

First of all, I read the "readme.txt" file and followed the steps.

Code: Select all

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

  autoconf, automake, bison, flex, gcc, make, ncurses, patch, readline, subversion, texinfo, wget
Automake is 1.9 version. I haven't found ncurses and readline, but I think this is not my actual trouble (may be some time later it will).

Code: Select all

2) Add the following to your login script:

  export PSPDEV=/usr/local/pspdev
  export PATH=$PATH:$PSPDEV/bin
Done. Well, I have add this at the end of the "~/.bashrc" file, I don't know if it must be added in another place of this file, but I think it's not matter.

Code: Select all

3) Run the toolchain script:

  ./toolchain.sh
I have my problem here. I'll add all I do and the tests I do trying to know where is the problem:

Code: Select all

fran@fran-desktop:~$ sudo ./psptoolchain/toolchain.sh
ERROR: Add /usr/local/pspdev/bin to your path before continuing.
../depends/check-pspdev.sh: 14: exit1: not found
../depends/check-pspdev.sh: Failed.
fran@fran-desktop:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/pspdev/bin
fran@fran-desktop:~$ echo $PSPDEV
/usr/local/pspdev
fran@fran-desktop:~$ cd $PSPDEV
fran@fran-desktop:/usr/local/pspdev$ cd bin
fran@fran-desktop:/usr/local/pspdev/bin$
As you can see, $PSPDEV and $PATH have the right values (at least I think so) and the "/usr/local/pspdev/bin" folder exists.


This is in GNU/Linux Ubuntu Gutsy Gibbon 7.1 Desktop CD. If you need more information for helping me, ask me.


I beg your pardon for my poor english.

Thanks for your help.[/quote]
Last edited by Neizan on Thu Nov 01, 2007 7:44 am, edited 1 time in total.
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

Code: Select all

fran@fran-desktop:~$ sudo ./psptoolchain/toolchain.sh
ERROR: Add /usr/local/pspdev/bin to your path before continuing.
../depends/check-pspdev.sh: 14: exit1: not found
Where did you get your psptoolchain scripts? The "exit1: not found" suggests that the file is corrupted, as there is definitely a space between "exit" and "1" in the real version.

But anyway, your problem is that you put /usr/local/pspdev/bin in your normal user's PATH, but that's not the path that gets used when you run "sudo". Two ways around this. The first is the other script provided exactly for this reason:

Code: Select all

sudo ./psptoolchain/toolchain-sudo.sh
The second is to just grant write-permissions to your normal user, and then you wouldn't need to use sudo:

Code: Select all

sudo mkdir -p /usr/local/pspdev
sudo chown -R fran /usr/local/pspdev
I recommend the second but the first might be easier.
Neizan
Posts: 10
Joined: Wed Oct 31, 2007 8:19 am

Post by Neizan »

Thank you! I'll try what you say immediately.
Where did you get your psptoolchain scripts? The "exit1: not found" suggests that the file is corrupted, as there is definitely a space between "exit" and "1" in the real version.
Well the "exit1" without space is may fault. In my "tests" for trying make it run, I deleted "exit 1" to look what happened (obviously it doesn't worked), and later I added it (forgetting the space).

I downloaded this psptoolchain script from this link: http://www.oopo.net/consoledev/[/quote]

It seems to be a newest version. Do you recommend me to download the script from this page?


Thank you for your answer
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

The latest version can always be grabbed directly from the subversion repository:

svn checkout svn://svn.ps2dev.org/psp/trunk/psptoolchain

Also, you may want to check out the psplibraries script after installing the toolchain:

svn checkout svn://svn.ps2dev.org/psp/trunk/psplibraries
Neizan
Posts: 10
Joined: Wed Oct 31, 2007 8:19 am

Post by Neizan »

Thank you again, but I have another problem...

The installation starts but I have some errors:

Code: Select all

make -C usbhostfs_pc all
make[1]: se ingresa al directorio `/home/fran/psptoolchain/build/psplinkusb/usbhostfs_pc'
cc -Wall -ggdb -I../usbhostfs -DPC_SIDE -D_FILE_OFFSET_BITS=64 -I. -O2   -c -o main.o main.c
main.c:19:17: error: usb.h: No existe el fichero ó directorio
main.c:98: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
main.c:207: error: expected ‘)’ before ‘*’ token
main.c:226: error: expected ‘)’ before ‘*’ token
main.c:244: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
main.c:311: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c:311: aviso: su ámbito es solamente esta definición o declaración, lo cual probablemente no sea lo que desea
main.c: En la función ‘close_device’:
main.c:317: aviso: declaración implícita de la función ‘usb_release_interface’
main.c:318: aviso: declaración implícita de la función ‘usb_reset’
main.c:319: aviso: declaración implícita de la función ‘usb_close’
main.c: En el nivel principal:
main.c:853: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c: En la función ‘handle_hello’:
main.c:861: aviso: declaración implícita de la función ‘usb_bulk_write’
main.c: En el nivel principal:
main.c:864: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c: En la función ‘handle_open’:
main.c:891: aviso: declaración implícita de la función ‘euid_usb_bulk_read’
main.c:901: aviso: declaración implícita de la función ‘euid_usb_bulk_write’
main.c: En el nivel principal:
main.c:908: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c:982: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c:1076: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c:1143: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c:1194: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c:1225: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c:1290: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c:1337: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c:1392: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c:1447: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c:1502: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c:1654: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c:1702: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c:1785: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c:1836: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c:1948: aviso: se declaró ‘struct usb_dev_handle’ dentro de la lista de parámetros
main.c:2014: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
main.c: En la función ‘do_hostfs’:
main.c:2086: error: ‘g_hDev’ no se declaró aquí (primer uso en esta función)
main.c:2086: error: (Cada identificador no declarado solamente se reporta una vez
main.c:2086: error: ara cada funcion en la que aparece.)
main.c: En la función ‘do_bulk’:
main.c:2223: error: ‘g_hDev’ no se declaró aquí (primer uso en esta función)
main.c: En la función ‘start_hostfs’:
main.c:2250: error: ‘g_hDev’ no se declaró aquí (primer uso en esta función)
main.c:2250: aviso: declaración implícita de la función ‘wait_for_device’
main.c:2291: aviso: la dereferencia de punteros de tipo castigado romperá las reglas de alias estricto
main.c:2301: aviso: la dereferencia de punteros de tipo castigado romperá las reglas de alias estricto
main.c:2311: aviso: la dereferencia de punteros de tipo castigado romperá las reglas de alias estricto
main.c: En la función ‘exit_app’:
main.c:2460: error: ‘g_hDev’ no se declaró aquí (primer uso en esta función)
main.c: En la función ‘async_thread’:
main.c:3083: error: ‘g_hDev’ no se declaró aquí (primer uso en esta función)
main.c: En la función ‘main’:
main.c:3119: aviso: declaración implícita de la función ‘usb_init’
make[1]: *** [main.o] Error 1
make[1]: se sale del directorio `/home/fran/psptoolchain/build/psplinkusb/usbhostfs_pc'
make: *** [all] Error 2
../scripts/009-psplinkusb.sh: Failed.
ERROR: Could not run the toolchain script.
fran@fran-desktop:~$
I think the error is in the line that I translate to english:

Code: Select all

main.c:19:17: error: usb.h: File or folder doesn't exists
I have searched this file in the folder but it isn't there. Did this file must be created during the toolchain installation? Do you know what could be happening?


Excuse me for questioning so much :S[/quote]
Cpasjuste
Posts: 214
Joined: Sun May 29, 2005 8:28 am

Post by Cpasjuste »

The last error (usb.h) is not a problem, it fail on psplink but the toolchain is already compiled and installed. You can get rid of this error by installing the libusb package with aptitude but it's not necessary. You should now install the libs in the same way with the psplibraries script.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

A full set of dependencies is:

autoconf
autogen
automake
bison
build-essential
flex
imagemagick
libreadline-dev
libsdl-dev
libtools
ncurses
patchutils
pkg-config
subversion
texinfo
wget

Note that some are needed for the toolchain and others for the libraries. For example, not having pkg-config will allow you to install the toolchain, but will fail when trying to build the libraries as a number of them require it (ogg, for example).
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

Your "full" set of dependencies is missing the one critical to this particular problem, "libusb-dev".
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

jimparis wrote:Your "full" set of dependencies is missing the one critical to this particular problem, "libusb-dev".
Oh, yeah. Thanks. I forgot to mark that in my file. It was on the post-it. :)
Neizan
Posts: 10
Joined: Wed Oct 31, 2007 8:19 am

Post by Neizan »

Thank you everybody for your help. I've installed everything you have recommended me and now everything it's alright, including the 009-psplinkusb.sh script. :)


As I said, thank you everybody ^^
Post Reply