Linux + SDK + SDL

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
protomank
Posts: 59
Joined: Thu Dec 18, 2008 1:41 am
Location: Porto Alegre, RS, Brazil
Contact:

Linux + SDK + SDL

Post by protomank »

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 ;)
ragnarok2040
Posts: 202
Joined: Wed Aug 09, 2006 1:00 am

Post by ragnarok2040 »

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.
protomank
Posts: 59
Joined: Thu Dec 18, 2008 1:41 am
Location: Porto Alegre, RS, Brazil
Contact:

Post by protomank »

Yes, I've run in some problems when building :-(
Even that my Ubuntu is 32 bits, seems like there are some problems compiling gcc
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

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: Select all

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.
protomank
Posts: 59
Joined: Thu Dec 18, 2008 1:41 am
Location: Porto Alegre, RS, Brazil
Contact:

Post by protomank »

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.
misfire
Posts: 110
Joined: Mon Sep 06, 2004 7:53 am
Location: Germany

Post by misfire »

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: Select all

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
protomank
Posts: 59
Joined: Thu Dec 18, 2008 1:41 am
Location: Porto Alegre, RS, Brazil
Contact:

Post by protomank »

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 :)
Post Reply