trying to execute the toolchain

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

Moderators: cheriff, TyRaNiD

Post Reply
everlasting
Posts: 41
Joined: Mon Mar 19, 2007 6:27 pm

trying to execute the toolchain

Post by everlasting »

I have already install the toolchain a couple of times. i am doing it again and i get an error i can not find a solution to.
I am under ubuntu studio 7.04 i have download the latest toolchain and i have unpacked it.
I have created the folder and set the writting permissions:
$ sudo mkdir /usr/local/pspdev
$ sudo chmod 777 /usr/local/pspdev

I have edited the bashrc located at /home/USER where USER is my personal folder, and where the psptoolchain folder (unpacked before) is located. The lines i have added there, are:
export PSPDEV=/usr/local/pspdev
export PATH=$PATH:$PSPDEV/bin

And they are at the end of the .bashrc.
When i execute ./toolchain.sh i get this:
ERROR: Set $PSPDEV before continuing.
../depends/check-pspdev.sh: Failed.

I know that this check-pspdev.sh verifies the path but i do not understand why i get this error as long as i have already set it.
I have also tried to put the "export" lines at .profile and also at /etc/bash.bashrc but the result is the same.

Sorry for such stupid question and thanks in advanced
bulb
Posts: 50
Joined: Thu Jan 19, 2006 10:59 pm

Post by bulb »

Are you sure you are using bash shell? Type: echo $SHELL

Also, try to set environment variables at the command prompt.
everlasting
Posts: 41
Joined: Mon Mar 19, 2007 6:27 pm

Post by everlasting »

Are you sure you are using bash shell? Type: echo $SHELL

Also, try to set environment variables at the command prompt.
Yes i am using bash:
lau@Launux:~$ echo $SHELL
/bin/bash

I didn't know what is to set the enviroment variables at the comand prompt but after lookin around google i have learned a couple of things and everything seems to be working good by now. The toolchain is installing.
I do not understand why it didn't work before, i assume that setting environment variables by command prompt does the same that doing directly to the ~/.bashrc file doesn't it?.
Well thanks a lot bulb, your help has been very useful.
everlasting
Posts: 41
Joined: Mon Mar 19, 2007 6:27 pm

Post by everlasting »

The toolchain have finished. Although i can compile programs now, at the end of executing the toolchain i get this errors:
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/lau/psptoolchain/build/psplinkusb/usbhostfs_pc'
make: *** [all] Error 2
../scripts/009-psplinkusb.sh: Failed.


Any ideas?
Thanks in advanced.
jsharrad
Posts: 100
Joined: Thu Oct 20, 2005 3:06 am

Post by jsharrad »

everlasting wrote: main.c:19:17: error: usb.h: No existe el fichero ó directorio
looks like you need to install libusb
bulb
Posts: 50
Joined: Thu Jan 19, 2006 10:59 pm

Post by bulb »

jsharrad is right, either you are missing libusb or libusb is installed in the directory, where GNU dev tools don't look to.

As for the environment variables, setting them at the command prompt or inside (convenient) profile file is the same. Although I would rather use ~/.bash_profile or ~/.profile, ~/.bashrc might not be always processed (see man or Google for more). Also, did you start a new terminal window after modifying the profile file? Or at least manually run the profile script in the old terminal window?
FreePlay
Posts: 71
Joined: Wed Jan 04, 2006 6:53 pm
Location: Schenectady, New York, USA

Post by FreePlay »

You don't really need libusb; those errors come from compiling usbhostfs, which is built so you can use PSPLink, which is just for debugging and not really needed for making software.
bulb
Posts: 50
Joined: Thu Jan 19, 2006 10:59 pm

Post by bulb »

Agreed. What FreePlay said is that everything to create PSP software is built, so you can just ignore that error (as if toolchain build completed successfully). Though, if you would like to use psplink, libusb package is necessary to be installed and/or well configured.

Anyway, IMO building/installing psplink shouldn't be part of the toolchain, because it is not really necessary and usually the build process of the toolchain fails only because of this component.

I am not saying that psplink isn't cool product. I cannot live without it!
weltall
Posts: 310
Joined: Fri Feb 20, 2004 1:56 am
Contact:

Post by weltall »

actually if he wants to build it he needs libusb-dev packages not libusb which is normally preinstalled
Post Reply