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 

ubuntu 9.04 + pspsdk? Anyone tried?

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



Joined: 25 Oct 2008
Posts: 60
Location: Lithuania

PostPosted: Mon Apr 27, 2009 6:47 am    Post subject: ubuntu 9.04 + pspsdk? Anyone tried? Reply with quote

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....
Back to top
View user's profile Send private message Visit poster's website
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Apr 27, 2009 7:54 am    Post subject: Reply with quote

Just tried it myself - ar generates a buffer overflow while trying to make libgcc.a when compiling gcc.
Back to top
View user's profile Send private message AIM Address
slasher2661996



Joined: 22 Feb 2009
Posts: 91
Location: Melbourne Australia ZOMG

PostPosted: Mon Apr 27, 2009 4:41 pm    Post subject: Reply with quote

Does this apply to Ubuntu 8.10 aswell?
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Apr 27, 2009 6:26 pm    Post subject: Reply with quote

No idea. I update once a year, so I was last using 8.04, which had no troubles.
Back to top
View user's profile Send private message AIM Address
Cpasjuste



Joined: 29 May 2005
Posts: 214

PostPosted: Tue Apr 28, 2009 6:38 pm    Post subject: Reply with quote

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:

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



Joined: 20 May 2008
Posts: 20
Location: Sweden

PostPosted: Tue Apr 28, 2009 9:03 pm    Post subject: Reply with quote

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 + +
  • ASM
  • Python
  • (x)HTML
  • PHP
  • CSS
  • SQL
  • JavaScript
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Wed Apr 29, 2009 5:46 am    Post subject: Reply with quote

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



Joined: 27 Nov 2008
Posts: 108

PostPosted: Wed Apr 29, 2009 6:59 am    Post subject: Reply with quote

Couldn't you do sudo passwd root and just superuser it?
_________________
Programming with:
Geany + Latest PSPSDK from svn
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Wed Apr 29, 2009 9:28 am    Post subject: Reply with quote

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



Joined: 29 May 2005
Posts: 214

PostPosted: Thu Apr 30, 2009 1:56 am    Post subject: Reply with quote

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



Joined: 20 Oct 2008
Posts: 355

PostPosted: Thu Apr 30, 2009 11:03 pm    Post subject: Reply with quote

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



Joined: 01 May 2009
Posts: 3
Location: Sofia, Bulgaria

PostPosted: Fri May 01, 2009 6:35 am    Post subject: Reply with quote

I got it to this point:
Code:
../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
Back to top
View user's profile Send private message Visit poster's website
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Fri May 01, 2009 8:32 am    Post subject: Reply with quote

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:
#!/bin/sh
# freetype.sh by Dan Peori (danpeori@oopo.net)

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



Joined: 20 Oct 2008
Posts: 355

PostPosted: Fri May 01, 2009 8:49 pm    Post subject: Reply with quote

i always wondered why dont you guys just fix that script in the repos
Back to top
View user's profile Send private message MSN Messenger
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Sat May 02, 2009 12:04 am    Post subject: Reply with quote

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

https://sourceforge.net/project/downloading.php?group_id=223830&filename=pspsdk-0.9.3-ubuntu-9.04.tar.gz&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 :)
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
DataMatrix



Joined: 01 May 2009
Posts: 3
Location: Sofia, Bulgaria

PostPosted: Thu May 07, 2009 12:11 am    Post subject: Reply with quote

Disregard this post, the topic is not about the toolchain, but for the sdk
_________________
null
Back to top
View user's profile Send private message Visit poster's website
qbradq



Joined: 04 May 2009
Posts: 4

PostPosted: Fri May 08, 2009 9:59 pm    Post subject: Reply with quote

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

Code:

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



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sat May 09, 2009 7:03 am    Post subject: Reply with quote

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



Joined: 04 May 2009
Posts: 4

PostPosted: Sat May 09, 2009 11:42 am    Post subject: Reply with quote

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



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sat May 09, 2009 12:53 pm    Post subject: Reply with quote

Go ahead - stuff like that is always welcome here. :)
Back to top
View user's profile Send private message AIM Address
jojojoris



Joined: 30 Mar 2008
Posts: 261

PostPosted: Sat May 09, 2009 9:12 pm    Post subject: Reply with quote

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:
int main(){
     SetupCallbacks();
     makeNiceGame();
     sceKernelExitGame();
}
Back to top
View user's profile Send private message
aloha_cn



Joined: 12 May 2005
Posts: 2

PostPosted: Fri May 15, 2009 12:43 am    Post subject: Reply with quote

I installed ubuntu 9.04 and have the same issue. I just fully copy the pspsdk from another FedoraCore8. It works.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Fri May 15, 2009 6:11 am    Post subject: Reply with quote

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.
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
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