ubuntu 9.04 + pspsdk? Anyone tried?

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

Moderators: cheriff, TyRaNiD

Post Reply
Pihas
Posts: 53
Joined: Sat Oct 25, 2008 10:26 pm
Location: Lithuania
Contact:

ubuntu 9.04 + pspsdk? Anyone tried?

Post by Pihas »

Does anyone tried PSP Developing Kit on ubuntu 9.04 ? I want to upgrade my current ubuntu version, but if i will have troubles with sdk....
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Just tried it myself - ar generates a buffer overflow while trying to make libgcc.a when compiling gcc.
slasher2661996
Posts: 91
Joined: Sun Feb 22, 2009 8:32 am
Location: Melbourne Australia ZOMG

Post by slasher2661996 »

Does this apply to Ubuntu 8.10 aswell?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

No idea. I update once a year, so I was last using 8.04, which had no troubles.
Cpasjuste
Posts: 214
Joined: Sun May 29, 2005 8:28 am

Post by Cpasjuste »

Install gcc 4.2 like the readme-ubuntu.txt say, and run toolchain-sudo.sh script instead toolchain.sh, it solve your problem.

There's still a little problem with psplibraries :

Code: Select all

running `aclocal -I .'
running `libtoolize --copy'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
running `autoconf'
cd builds/unix; ./configure --host psp --prefix=/usr/local/pspdev/psp
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking build system type... /bin/bash: ./config.guess: No such file or directory
configure: error: cannot guess build type; you must specify one
make: *** [builds/unix/unix-def.mk] Erreur 1
../scripts/003-freetype.sh: Failed.
ERROR: Could not run the libraries script.
User avatar
bkc
Posts: 19
Joined: Tue May 20, 2008 8:45 pm
Location: Sweden
Contact:

Post by bkc »

I had 8.10 with PSPSDK, now i upgraded (don't like 9.04 going to reinstall 8.10) and PSPSDK works (first thing I tried)... but I haven't tried reinstalling/upgrading the pspsdk yet thou... but going to install dualboot 8.10 and 9.04 like today after school... so when I'm done with that I'll post the results :-)

// BKC
I only speak these languages:
  • C / C + +
  • (x)HTML
  • PHP
  • CSS
  • SQL
  • JavaScript
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Cpasjuste wrote:Install gcc 4.2 like the readme-ubuntu.txt say, and run toolchain-sudo.sh script instead toolchain.sh, it solve your problem.
When I get some time, 4.2 was the next thing I was gonna try. I figured it was too soon for someone to have worked out the problems with the new gcc. Also, I either chown the pspdev directory, or like this time, I put pspdev in my user directory. So I don't need to use sudo. That's a big unneeded pain in the rear.
NoEffex
Posts: 106
Joined: Thu Nov 27, 2008 6:48 am

Post by NoEffex »

Couldn't you do sudo passwd root and just superuser it?
Programming with:
Geany + Latest PSPSDK from svn
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Doing anything as superuser is to be discouraged. It's best to either own the directory being messed with, or even better to keep it all in the user's home directory. Less chance of causing a problem to the system that way. Not to mention, by keeping it in the user home, you never have to worry about when sudo is needed, and when it's not - it's NEVER needed. I really think that all the tutorials and readmes need to be altered to advise people to set the pspdev directory to something like /home/user/Tools/pspdev.
Cpasjuste
Posts: 214
Joined: Sun May 29, 2005 8:28 am

Post by Cpasjuste »

J.F. wrote:
Cpasjuste wrote:Install gcc 4.2 like the readme-ubuntu.txt say, and run toolchain-sudo.sh script instead toolchain.sh, it solve your problem.
When I get some time, 4.2 was the next thing I was gonna try. I figured it was too soon for someone to have worked out the problems with the new gcc. Also, I either chown the pspdev directory, or like this time, I put pspdev in my user directory. So I don't need to use sudo. That's a big unneeded pain in the rear.
I do the same, but we still need to use the sudo.sh script else it will still give the error (dunno why).
coolkehon
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Post by coolkehon »

i got it to work and so before i upgraded from 8.10 / reinstall 9.04 i copied pspdev folder and when i went back after upgrade just copy it back and then no problem it still works a bit primiatve but it works
DataMatrix
Posts: 3
Joined: Fri May 01, 2009 6:30 am
Location: Sofia, Bulgaria
Contact:

Post by DataMatrix »

I got it to this point:

Code: Select all

../scripts/004-newlib-1.15.0.sh: Failed.
ERROR: Could not run the toolchain script.
Ubuntu 9.04

EDIT: As it seems it's going to be one hell of a fight to build the toolchain on 9.04, so I've decided to give Debian 5 a try on a virtual machine (virtualbox) (if I like it, I'm moving to Debian ^^)
null
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Okay, here's how you do it.

To make the toolchain:
Make sure all the dependencies are installed, along with gcc 4.2.
Run "CC=gcc-4.2 ./toolchain.sh" to compile and install the toolchain.

To make the libraries:
After you checkout psplibraries, edit scripts/003-freetype.sh to look like this:

Code: Select all

#!/bin/sh
# freetype.sh by Dan Peori ([email protected])

 ## Download the latest source code.
 if test ! -d "freetype"; then
  svn checkout svn://svn.ps2dev.org/psp/trunk/freetype || { exit 1; }
 else
  svn update freetype || { exit 1; }
 fi

 ## Enter the source directory.
 cd freetype || { exit 1; }

 cd builds/unix
 automake --add-missing
 cd ../..

 ## Bootstrap the source.
 sh autogen.sh || { exit 1; }

 ## Configure the build.
 LDFLAGS="-L$(psp-config --pspsdk-path)/lib -lc -lpspuser" ./configure --host psp --prefix=$(psp-config --psp-prefix) || { exit 1; }

 ## Compile and install.
 make clean && make -j2 && make install && make clean || { exit 1; }
Note the three new lines after "cd freetype || { exit 1; } "
Then run "./libraries.sh"

Everything should work fine.
coolkehon
Posts: 355
Joined: Mon Oct 20, 2008 5:44 am

Post by coolkehon »

i always wondered why dont you guys just fix that script in the repos
Heimdall
Posts: 245
Joined: Thu Nov 10, 2005 1:29 am
Location: Netherlands
Contact:

Post by Heimdall »

I'm not trying to hijack the topic but I just uploaded my first build for Ubuntu 9.04.

https://sourceforge.net/project/downloa ... a=39071053

It packages the sames SDK and libs that my MinPSPW ships with. It worked around the binutils bug and was build with host GCC 4.3.3.

Overall it is composed of:

binutils 1.16.1
gcc 4.3.3
newlib 1.17
- zlib
- bzip2
- freetype
- jpeg
- libbulletml
- libmad
- libmikmod
- libogg
- libpng
- libpspvram
- libTremor
- libvorbis
- lua
- pspgl
- pspirkeyb
- sqlite
- SDL
- SDL_gfx
- SDL_image
- SDL_mixer
- SDL_ttf
- smpeg
- zziplib

Add has support for C, C++, ObjC, ObjC++ I'm still learning on how to create deb files so for now it is only a tar.gz that you can extract whereever you want but make sure you add the bin directory to your path :)
DataMatrix
Posts: 3
Joined: Fri May 01, 2009 6:30 am
Location: Sofia, Bulgaria
Contact:

Post by DataMatrix »

Disregard this post, the topic is not about the toolchain, but for the sdk
null
qbradq
Posts: 4
Joined: Mon May 04, 2009 5:00 am

Post by qbradq »

I get the following error from ./configure when trying to compile the freetype library (and I have patched the script as shown above):

Code: Select all

configure:2550: gcc-4.2   -L/home/qbradq/Public/working/pspdev/psp/sdk/lib -lc -lpspuser conftest.c  >&5
/usr/bin/ld: skipping incompatible /home/qbradq/Public/working/pspdev/psp/sdk/lib/libpspuser.a when searching for -lpspuser
/usr/bin/ld: cannot find -lpspuser
collect2: ld returned 1 exit status
Any ideas how I can resolve that?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Your error shows it's using gcc instead of psp-gcc. Are you running configure by hand? If you use the libraries.sh script, did you make the change to it I noted above?
qbradq
Posts: 4
Joined: Mon May 04, 2009 5:00 am

Post by qbradq »

ACK! Thank you for pointing that out! I was exporting CC=gcc-4.2 for the libraries script as well. I removed that and it worked great.

I have bundled this process up into a fairly fool-proof shell script. I'll post it in case someone else needs it.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Go ahead - stuff like that is always welcome here. :)
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

Post by jojojoris »

coolkehon wrote:i always wondered why dont you guys just fix that script in the repos
I want to know too.

BTW: I am installing the SDK+LIBRARIES on 9.04 now.

Code: Select all

int main(){
     SetupCallbacks();
     makeNiceGame();
     sceKernelExitGame();
}
aloha_cn
Posts: 2
Joined: Thu May 12, 2005 2:40 pm

Post by aloha_cn »

I installed ubuntu 9.04 and have the same issue. I just fully copy the pspsdk from another FedoraCore8. It works.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

jojojoris wrote:
coolkehon wrote:i always wondered why dont you guys just fix that script in the repos
I want to know too.
Because it was never a problem until just recently. I think the maintainers were hoping it was an issue in gcc that would be fixed in an upcoming release so they wouldn't have to patch around the issue.
Post Reply