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 

[Magically Solved] Developing SDL application for CFW 3xx
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sun Nov 25, 2007 4:43 am    Post subject: Reply with quote

You're probably installing the toolchain wrong... here's my list of steps. Check it against what you do.

1 - make sure all dependencies are installed. They include:

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


I just use Synaptic Package Manager in Ubuntu to load all of them and their dependencies.

2 - from a newly opened shell, enter

Code:
mkdir projects
cd projects
svn co svn://svn.ps2dev.org/psp/trunk/psptoolchain
cd psptoolchain
sudo mkdir -p /usr/local/pspdev
sudo chmod a+rwx /usr/local/pspdev
sudo chown user:group /usr/local/pspdev
export PSPDEV="/usr/local/pspdev"
export PSPSDK="$PSPDEV/psp/sdk"
export PSPPATH="$PSPDEV/bin:$PSPDEV/psp/bin:$PSPSDK/bin"
export PATH="$PATH:$PSPPATH"
export PKG_CONFIG_PATH="$PSPDEV/psp/lib/pkgconfig"
./toolchain.sh


That will give you a complete toolchain accessible in user mode by the user user:group. Remember to change that to YOU. It's normally just the username you log in with, twice. For me in Ubuntu or Fedora, it's just jlfenton:jlfenton.

Making the pspdev specific to the user means the only sudos you'll ever use are the ones to make and chmod and chown the directory, as you see above. If you don't, and forget about sudo, you'll wind up installing libraries and such to the wrong place, or not at all (might be your problem).

Now let's install the libraries.

3 - Still in the same shell after running ./toolchain, do this

Code:
cd ..
svn co svn://svn.ps2dev.org/psp/trunk/psplibraries
cd psplibraries
./libraries.sh


You are now done. You should have a good toolchain and all the libraries. Remember those exports later when you need to compile something. If you don't edit the bash resource for the user, you'll need to enter these lines every time you open a new shell:

Code:
export PSPDEV="/usr/local/pspdev"
export PSPSDK="$PSPDEV/psp/sdk"
export PSPPATH="$PSPDEV/bin:$PSPDEV/psp/bin:$PSPSDK/bin"
export PATH="$PATH:$PSPPATH"
export PKG_CONFIG_PATH="$PSPDEV/psp/lib/pkgconfig"
Back to top
View user's profile Send private message AIM Address
fungos



Joined: 31 Oct 2007
Posts: 41
Location: cwb br

PostPosted: Mon Nov 26, 2007 3:28 am    Post subject: Reply with quote

Bad news, I did all that step-by-step, and it still doesn't working. :(

Well, thank you for all your help.
Back to top
View user's profile Send private message Visit poster's website
x295



Joined: 29 Nov 2007
Posts: 2

PostPosted: Thu Nov 29, 2007 8:16 am    Post subject: Reply with quote

I use the toolchain from Dan Peori (http://www.oopo.net/consoledev/). Just go at the end of the page, and grab the two tarballs psptoolchain and psplibraries

Just uncompress, and launch the toolchain.sh (you need to have libusb), then libraries.sh

This works for me :D (tm)
Today was my first attempt to build and run a binary on my psp.
Back to top
View user's profile Send private message
fungos



Joined: 31 Oct 2007
Posts: 41
Location: cwb br

PostPosted: Thu Jan 24, 2008 11:50 pm    Post subject: Reply with quote

Hi all,

I just came back from my vacancy and I'm starting again with psp dev, then I wanted to try again to get my code working with a new firmware, I upgraded my phat to 3.80M33-4, updated my psplibraries and then just ran make in that test project (without any line change but the 380 cfw version in makefile). The test app just worked! Now, I will try to develop some test game just for fun finally. :)

I appreciate the help of everyone here, I can't explain why it works now and I have no idea what was wrong.

Thank you all.
Back to top
View user's profile Send private message Visit poster's website
avisphoenix



Joined: 13 Apr 2008
Posts: 1
Location: México

PostPosted: Sun Apr 13, 2008 7:05 am    Post subject: Don't compile Reply with quote

Well I follow this tutorial, step by step, but i have a problems:

First this:
Code:

User:$./toolchain.sh
/usr/bin/autoconf: 44: cannot create conf15520.sh: Permission denied
/usr/bin/autoconf: 44: cannot create conf15520.sh: Permission denied
chmod: no se puede acceder a `conf15520.sh': Don't exist the file or directory
touch: can't run `touch' over `/usr/local/pspdev/test.tmp': Permission denied
ERROR: Grant write permissions for /usr/local/pspdev before continuing.
../depends/check-pspdev.sh: Failed.

But i put a permitions, however i run in root then:

Code:

User:$ sudo ./toolchain.sh
[sudo] password for Root:
ERROR: Add /usr/local/pspdev/bin to your path before continuing.
../depends/check-pspdev.sh: Failed.

then i review the PATH:
Code:

User:$ echo $PATH
/usr/local/pspdev/bin:/usr/local/pspdev/bin:/usr/local/Trolltech/Qt-4.3.2:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/pspdev/bin:/usr/local/pspdev/bin:/usr/local/pspdev/psp/bin:/usr/local/pspdev/psp/sdk/bin

Maybe is the PATH in root:
Code:

User:$  sudo echo $PATH
/usr/local/pspdev/bin:/usr/local/pspdev/bin:/usr/local/Trolltech/Qt-4.3.2:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/pspdev/bin:/usr/local/pspdev/bin:/usr/local/pspdev/psp/bin:/usr/local/pspdev/psp/sdk/bin

Then I edit the check-pspdev, and run another time in root:
After compile about an hour say this:
Code:

User:$ sudo ./toolchain.sh
...
make[3]: psp-ar: Can't find the program
make[3]: *** [libgcc.a] Error 127
make[3]: *** Wait finish the another task....
make[3]: out of directory `/home/user/PSP/Develop/toolchain/psptoolchain/build/gcc-4.1.0/build-psp/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: out of directory `/home/user/PSP/Develop/toolchain/psptoolchain/build/gcc-4.1.0/build-psp/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: out of directory `/home/user/PSP/Develop/toolchain/psptoolchain/build/gcc-4.1.0/build-psp'
make: *** [all] Error 2
../scripts/002-gcc-4.1.0-stage1.sh: Failed.

Then I look in /usr/local/pspdev/bin:
Code:

User:/usr/local/pspdev/bin$ ls
psp-addr2line  psp-c++filt  psp-nm       psp-ranlib   psp-strings
psp-ar         psp-gprof    psp-objcopy  psp-readelf  psp-strip
psp-as         psp-ld       psp-objdump  psp-size


Whats up??? :'( i'm frustrated
I translate the message of console because i speak spanish and have my pc in spanish; then maybe the message are wrong, but is the idea.
Sorry for my bad english :(
Please help me
Back to top
View user's profile Send private message MSN Messenger
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sun Apr 13, 2008 8:25 am    Post subject: Reply with quote

You need to either run toolchain-sudo.sh or chown the pspdev directory. Personally, I chown the directory so I never have to worry about sudo again.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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