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 

Linux + SDK + SDL

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



Joined: 18 Dec 2008
Posts: 64
Location: Porto Alegre, RS, Brazil

PostPosted: Thu Dec 18, 2008 2:04 am    Post subject: Linux + SDK + SDL Reply with quote

Hello, I'm looking to develop with SDL to PS2.
I've found the SDK for Windows (mingw) and it seems to work fine, but my "native" operating system is Ubuntu, I run Windows inside VMWare.

I searched and found instructions to build the toolchain, but I was wondering if using SDL with it is just a matter of downloading the SDL binaries, or do I have to re-compile SDL for PS2? In this case, is there are instructions for doing so anywhere?

Thanks in advance, and sorry if this was already answered, I searched, but I'm far from perfect ;)
Back to top
View user's profile Send private message Visit poster's website
ragnarok2040



Joined: 09 Aug 2006
Posts: 230

PostPosted: Thu Dec 18, 2008 6:43 pm    Post subject: Reply with quote

From my experience on ArchLinux, the toolchain builds just fine using a 32-bit (i686) root, but I had trouble building it in my 64-bit (x86-64) root. As I've never used SDL, I'm reasonably sure that you can just check out the sources for it and the various extension libraries, using subversion, then make && make install to have them installed into $PS2SDK/ports.

The url to the sources for ported libraries is svn://svn.ps2dev.org/ps2/trunk/ps2sdk-ports.
Back to top
View user's profile Send private message
protomank



Joined: 18 Dec 2008
Posts: 64
Location: Porto Alegre, RS, Brazil

PostPosted: Fri Dec 19, 2008 6:11 am    Post subject: Reply with quote

Yes, I've run in some problems when building :-(
Even that my Ubuntu is 32 bits, seems like there are some problems compiling gcc
Back to top
View user's profile Send private message Visit poster's website
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Fri Dec 19, 2008 6:19 am    Post subject: Reply with quote

The version of gcc used by ps2toolchain has problems building with the latest version of gcc used in ubuntu 8.10. You can install an earlier version of gcc and run the script using it:

Code:
apt-get install gcc-4.3
CC=gcc-4.3 ./toolchain.sh

Installing the earlier version won't have an affect on the rest of your ubuntu installation.
Back to top
View user's profile Send private message Visit poster's website
protomank



Joined: 18 Dec 2008
Posts: 64
Location: Porto Alegre, RS, Brazil

PostPosted: Fri Dec 19, 2008 6:44 am    Post subject: Reply with quote

I had the first problem fixed, but now I run into a ugly overflow:

make[3]: Entrando no diretório `/arquivos/programas/src/ps2toolchain/build/gcc-3.2.2/build-ee-stage1/gcc'
/arquivos/programas/src/ps2toolchain/build/gcc-3.2.2/build-ee-stage1/gcc/xgcc -B/arquivos/programas/src/ps2toolchain/build/gcc-3.2.2/build-ee-stage1/gcc/ -B/usr/local/ps2dev/ee/ee/bin/ -B/usr/local/ps2dev/ee/ee/lib/ -isystem /usr/local/ps2dev/ee/ee/include -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/config -I../../gcc/../include \
-c -o crtn.o -x assembler-with-cpp ../../gcc/config/mips/crtn5900.asm
make[3]: Saindo do diretório `/arquivos/programas/src/ps2toolchain/build/gcc-3.2.2/build-ee-stage1/gcc'
*** buffer overflow detected ***: ee-ar terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0x40137558]
/lib/tls/i686/cmov/libc.so.6[0x40135680]
/lib/tls/i686/cmov/libc.so.6[0x40134d68]
/lib/tls/i686/cmov/libc.so.6(_IO_default_xsputn+0xc8)[0x400aaa18]
/lib/tls/i686/cmov/libc.so.6(_IO_padn+0xed)[0x4009de0d]
/lib/tls/i686/cmov/libc.so.6(_IO_vfprintf+0x27cf)[0x4007f15f]
/lib/tls/i686/cmov/libc.so.6(__vsprintf_chk+0xa7)[0x40134e17]
/lib/tls/i686/cmov/libc.so.6(__sprintf_chk+0x2d)[0x40134d5d]
ee-ar[0x80513b2]
ee-ar[0x804f3eb]
ee-ar[0x8052228]
ee-ar[0x8055fb8]
ee-ar[0x804bc25]
ee-ar[0x804c867]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0x40053685]
ee-ar[0x8049631]
======= Memory map: ========
08048000-080c7000 r-xp 00000000 08:04 1212540 /usr/local/ps2dev/ee/bin/ee-ar
080c7000-080c8000 r--p 0007e000 08:04 1212540 /usr/local/ps2dev/ee/bin/ee-ar
080c8000-080c9000 rw-p 0007f000 08:04 1212540 /usr/local/ps2dev/ee/bin/ee-ar
080c9000-080cb000 rw-p 080c9000 00:00 0
085ed000-08b33000 rw-p 085ed000 00:00 0 [heap]
40000000-4001a000 r-xp 00000000 08:04 1917159 /lib/ld-2.8.90.so
4001a000-4001b000 r-xp 4001a000 00:00 0 [vdso]
4001b000-4001c000 r--p 0001a000 08:04 1917159 /lib/ld-2.8.90.so
4001c000-4001d000 rw-p 0001b000 08:04 1917159 /lib/ld-2.8.90.so
4001d000-4001f000 rw-p 4001d000 00:00 0
4001f000-40020000 r--p 00000000 08:04 2932850 /usr/lib/locale/pt_BR.utf8/LC_MESSAGES/SYS_LC_MESSAGES
40020000-40027000 r--s 00000000 08:04 2883717 /usr/lib/gconv/gconv-modules.cache
40027000-40031000 rw-p 40027000 00:00 0
4003d000-40195000 r-xp 00000000 08:04 1949747 /lib/tls/i686/cmov/libc-2.8.90.so
40195000-40197000 r--p 00158000 08:04 1949747 /lib/tls/i686/cmov/libc-2.8.90.so
40197000-40198000 rw-p 0015a000 08:04 1949747 /lib/tls/i686/cmov/libc-2.8.90.so
40198000-4019c000 rw-p 40198000 00:00 0
4019c000-401db000 r--p 00000000 08:04 2916504 /usr/lib/locale/pt_BR.utf8/LC_CTYPE
401f9000-40206000 r-xp 00000000 08:04 1916948 /lib/libgcc_s.so.1
40206000-40207000 r--p 0000c000 08:04 1916948 /lib/libgcc_s.so.1
40207000-40208000 rw-p 0000d000 08:04 1916948 /lib/libgcc_s.so.1
bfe87000-bfe9e000 rw-p bffe9000 00:00 0 [stack]
make[2]: *** [libgcc.a] Cancelado
make[2]: ** Apagando arquivo `libgcc.a'
make[2]: Saindo do diretório `/arquivos/programas/src/ps2toolchain/build/gcc-3.2.2/build-ee-stage1/gcc'
make[1]: ** [libgcc.a] Erro 2
make[1]: Saindo do diretório `/arquivos/programas/src/ps2toolchain/build/gcc-3.2.2/build-ee-stage1/gcc'
make: ** [all-gcc] Erro 2
../scripts/002-gcc-3.2.2-stage1.sh: Failed.
Back to top
View user's profile Send private message Visit poster's website
misfire



Joined: 06 Sep 2004
Posts: 120
Location: Germany

PostPosted: Thu Jan 15, 2009 7:48 pm    Post subject: Reply with quote

ooPo wrote:
The version of gcc used by ps2toolchain has problems building with the latest version of gcc used in ubuntu 8.10. You can install an earlier version of gcc and run the script using it:

Code:
apt-get install gcc-4.3
CC=gcc-4.3 ./toolchain.sh

Installing the earlier version won't have an affect on the rest of your ubuntu installation.

On my 64-bit Ubuntu 8.10 I actually had to install gcc version 4.2 in order to build the toolchain correctly.

Here's a tutorial which describes how to set up a PS2DEV environment on Ubuntu:
http://gshi.org/vb/showthread.php?t=3158
Back to top
View user's profile Send private message
protomank



Joined: 18 Dec 2008
Posts: 64
Location: Porto Alegre, RS, Brazil

PostPosted: Thu Jan 15, 2009 8:08 pm    Post subject: Reply with quote

Yes, I had to do the same and it worked.
Now I only need some time to learn how to use drivers to access files for SDL_image :)
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 -> PS2 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