forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

trying to execute the toolchain

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
everlasting



Joined: 19 Mar 2007
Posts: 41

PostPosted: Mon Oct 01, 2007 7:32 am    Post subject: trying to execute the toolchain Reply with quote

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
Back to top
View user's profile Send private message
bulb



Joined: 19 Jan 2006
Posts: 50

PostPosted: Mon Oct 01, 2007 8:12 am    Post subject: Reply with quote

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

Also, try to set environment variables at the command prompt.
Back to top
View user's profile Send private message
everlasting



Joined: 19 Mar 2007
Posts: 41

PostPosted: Mon Oct 01, 2007 8:47 am    Post subject: Reply with quote

Quote:
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.
Back to top
View user's profile Send private message
everlasting



Joined: 19 Mar 2007
Posts: 41

PostPosted: Mon Oct 01, 2007 9:14 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
jsharrad



Joined: 20 Oct 2005
Posts: 102

PostPosted: Mon Oct 01, 2007 2:09 pm    Post subject: Reply with quote

everlasting wrote:

main.c:19:17: error: usb.h: No existe el fichero ó directorio


looks like you need to install libusb
Back to top
View user's profile Send private message
bulb



Joined: 19 Jan 2006
Posts: 50

PostPosted: Mon Oct 01, 2007 5:32 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
FreePlay



Joined: 04 Jan 2006
Posts: 71
Location: Schenectady, New York, USA

PostPosted: Mon Oct 01, 2007 8:34 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
bulb



Joined: 19 Jan 2006
Posts: 50

PostPosted: Mon Oct 01, 2007 8:45 pm    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
weltall



Joined: 20 Feb 2004
Posts: 310

PostPosted: Mon Oct 01, 2007 10:02 pm    Post subject: Reply with quote

actually if he wants to build it he needs libusb-dev packages not libusb which is normally preinstalled
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group