Page 1 of 1

SDL Lib compilation issue

Posted: Thu Feb 17, 2005 4:37 am
by Shazz
Hello, and again an issue :D I love them... or they love me :D

When I tried to compile and build the last SDL lib I've got :

Code: Select all

ee-ar cru ../lib/libsdl.a SDL.o SDL_error.o SDL_fatal.o SDL_getenv.o SDL_loadso.o video/SDL_video.o video/SDL_surface.o video/SDL_pixels.o video/SDL_blit.o video/SDL_blit_0.o video/SDL_blit_1.o video/SDL_blit_N.o video/SDL_blit_A.o  video/SDL_RLEaccel.o video/SDL_cursor.o video/SDL_bmp.o thread/SDL_thread.o  events/SDL_events.o events/SDL_quit.o events/SDL_active.o events/SDL_keyboard.o events/SDL_mouse.o events/SDL_resize.o thread/ps2sdk/SDL_syssem.o thread/ps2sdk/SDL_systhread.o thread/generic/SDL_syscond.o thread/generic/SDL_sysmutex.o timer/SDL_timer.o  endian/SDL_endian.o main/ps2sdk/sdl_main.o timer/ps2sdk/SDL_systimer.o video/ps2sdk/SDL_ps2video.o audio/SDL_wave.o audio/SDL_audio.o audio/SDL_audiomem.o audio/SDL_audiocvt.o audio/SDL_mixer.o file/SDL_rwops.o audio/ps2sdk/SDL_ps2audio.o joystick/SDL_joystick.o joystick/ps2sdk/ps2joystick.o
ee-ar cru ../lib/libsdlmain.a main/arch.o main/ps2sdk/sdl_main.o
BFD: BFD 2.14 20030612 assertion fail ../../bfd/elf.c:1829
BFD: main/arch.o: invalid string offset 2304 >= 82 for section `.shstrtab'
BFD: BFD 2.14 20030612 assertion fail ../../bfd/elf.c:1829
BFD: main/arch.o: invalid string offset 2304 >= 82 for section `.shstrtab'
make[1]: *** [../lib/libsdlmain.a] Segmentation fault (core dumped)
make[1]: *** Deleting file `../lib/libsdlmain.a'
make[1]: Leaving directory `/cygdrive/c/Dev-Cpp/projects/PS2/ps2sdk-ports/sdl/src'
make: *** [all-src] Error 2
Execution terminated
I tried with 2 differents versions of the toolchain : the Windows setup package and the last toolchain script, same problem (but different cygwin version)

Any idea ?

Posted: Thu Feb 17, 2005 5:03 am
by weltall
i get also an error similar to yours:
$ make
make -C src
make[1]: Entering directory `/home/administrator/ps2sdk-ports/sdl/src'
ee-ar cru ../lib/libsdlmain.a main/arch.o main/ps2sdk/sdl_main.o
BFD: BFD 2.13.2.1 assertion fail ../../binutils-2.13.2.1/bfd/elf.c:1789
BFD: main/arch.o: invalid string offset 2304 >= 82 for section `.shstrtab'
BFD: BFD 2.13.2.1 assertion fail ../../binutils-2.13.2.1/bfd/elf.c:1789
BFD: main/arch.o: invalid string offset 2304 >= 82 for section `.shstrtab'
7 [main] ee-ar 2364 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
15110 [main] ee-ar 2364 open_stackdumpfile: Dumping stack trace to ee-ar.exe.stackdump
make[1]: *** [../lib/libsdlmain.a] Segmentation fault (core dumped)
make[1]: *** Deleting file `../lib/libsdlmain.a'
make[1]: Leaving directory `/home/administrator/ps2sdk-ports/sdl/src'
make: *** [all-src] Error 2

Posted: Thu Feb 17, 2005 5:25 am
by pixel
Sounds strange. Could you give me that arch.o file ?

Posted: Thu Feb 17, 2005 5:29 am
by weltall

Posted: Thu Feb 17, 2005 5:37 am
by Shazz
Here is mine if needed :

http://tmpstore.free.fr/pixel

Code: Select all


/* This is needed for automake, so that it can build an empty archive */

int pointless_symbol_so_the_archive_doesnt_look_empty;
Can this piece of code being so..... nasty ?

I changed it to int useless;

And now no more segfault...
(note : the clean does not clean all, especially the arch.o)

Posted: Thu Feb 17, 2005 5:58 am
by weltall
thank shazz now it works :)

Posted: Sun Feb 20, 2005 5:19 pm
by EugeneE3RD
Well, I also got a compilation error. Here is my compilation error:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Owner>cd\ps2dev\ps2sdk-ports\sdl

C:\PS2Dev\ps2sdk-ports\sdl>make
make -C src
make[1]: Entering directory `/cygdrive/c/PS2Dev/ps2sdk-ports/sdl/src'
ee-gcc -D_EE -O2 -G0 -Wall -DDISABLE_TIMERS -DDISABLE_CDROM -DNO_SIGNAL_H -DDEBU
G_ERROR -DDEBUG_VIDEO -DUSE_MATH_H -DENABLE_PS2SDK -I/ee/include -I/common/inclu
de -I. -I../include -Ivideo -Ithread -Ievents -Itimer -Iaudio -Ijoystick -Icdrom
-I/ee/gs/include -I/ee/dma/include -c video/ps2sdk/SDL_ps2video.c -o video/ps2s
dk/SDL_ps2video.o
video/ps2sdk/SDL_ps2video.c:37:19: gsKit.h: No such file or directory
video/ps2sdk/SDL_ps2video.c:38:20: dmaKit.h: No such file or directory
video/ps2sdk/SDL_ps2video.c:81: parse error before "BLACK_RGBAQ"
video/ps2sdk/SDL_ps2video.c:81: warning: type defaults to `int' in declaration o
f `BLACK_RGBAQ'
video/ps2sdk/SDL_ps2video.c:81: warning: implicit declaration of function `GS_SE
TREG_RGBAQ'
video/ps2sdk/SDL_ps2video.c:81: initializer element is not constant
video/ps2sdk/SDL_ps2video.c:81: warning: data definition has no type or storage
class
video/ps2sdk/SDL_ps2video.c:82: parse error before "TEXTURE_RGBAQ"
video/ps2sdk/SDL_ps2video.c:82: warning: type defaults to `int' in declaration o
f `TEXTURE_RGBAQ'
video/ps2sdk/SDL_ps2video.c:82: initializer element is not constant
video/ps2sdk/SDL_ps2video.c:82: warning: data definition has no type or storage
class
video/ps2sdk/SDL_ps2video.c:84: parse error before "gsClut"
video/ps2sdk/SDL_ps2video.c:84: warning: type defaults to `int' in declaration o
f `gsClut'
video/ps2sdk/SDL_ps2video.c:84: warning: data definition has no type or storage
class
video/ps2sdk/SDL_ps2video.c:85: parse error before '*' token
video/ps2sdk/SDL_ps2video.c:85: warning: type defaults to `int' in declaration o
f `gsGlobal'
video/ps2sdk/SDL_ps2video.c:85: warning: data definition has no type or storage
class
video/ps2sdk/SDL_ps2video.c:86: parse error before "gsTexture"
video/ps2sdk/SDL_ps2video.c:86: warning: type defaults to `int' in declaration o
f `gsTexture'
video/ps2sdk/SDL_ps2video.c:86: warning: data definition has no type or storage
class
video/ps2sdk/SDL_ps2video.c: In function `PS2_VideoInit':
video/ps2sdk/SDL_ps2video.c:97: warning: implicit declaration of function `gsKit
_init_global'
video/ps2sdk/SDL_ps2video.c:97: `GS_MODE_PAL' undeclared (first use in this func
tion)
video/ps2sdk/SDL_ps2video.c:97: (Each undeclared identifier is reported only onc
e
video/ps2sdk/SDL_ps2video.c:97: for each function it appears in.)
video/ps2sdk/SDL_ps2video.c:97: warning: assignment makes pointer from integer w
ithout a cast
video/ps2sdk/SDL_ps2video.c:106: warning: implicit declaration of function `dmaK
it_init'
video/ps2sdk/SDL_ps2video.c:106: `D_CTRL_RELE_ON' undeclared (first use in this
function)
video/ps2sdk/SDL_ps2video.c:106: `D_CTRL_MFD_OFF' undeclared (first use in this
function)
video/ps2sdk/SDL_ps2video.c:106: `D_CTRL_STS_UNSPEC' undeclared (first use in th
is function)
video/ps2sdk/SDL_ps2video.c:106: `D_CTRL_STD_OFF' undeclared (first use in this
function)
video/ps2sdk/SDL_ps2video.c:106: `D_CTRL_RCYC_8' undeclared (first use in this f
unction)
video/ps2sdk/SDL_ps2video.c:107: warning: implicit declaration of function `dmaK
it_chan_init'
video/ps2sdk/SDL_ps2video.c:107: `DMA_CHANNEL_GIF' undeclared (first use in this
function)
video/ps2sdk/SDL_ps2video.c:112: warning: implicit declaration of function `gsKi
t_init_screen'
video/ps2sdk/SDL_ps2video.c:114: warning: implicit declaration of function `gsKi
t_clear'
video/ps2sdk/SDL_ps2video.c: In function `PS2_DeleteDevice':
video/ps2sdk/SDL_ps2video.c:130: warning: implicit declaration of function `free
'
video/ps2sdk/SDL_ps2video.c: In function `PS2_SetVideoMode':
video/ps2sdk/SDL_ps2video.c:182: `GS_PSM_T4' undeclared (first use in this funct
ion)
video/ps2sdk/SDL_ps2video.c:186: `GS_PSM_T8' undeclared (first use in this funct
ion)
video/ps2sdk/SDL_ps2video.c:190: `GS_PSM_CT16' undeclared (first use in this fun
ction)
video/ps2sdk/SDL_ps2video.c:197: `GS_PSM_CT24' undeclared (first use in this fun
ction)
video/ps2sdk/SDL_ps2video.c:204: `GS_PSM_CT32' undeclared (first use in this fun
ction)
video/ps2sdk/SDL_ps2video.c:216: warning: implicit declaration of function `gsKi
t_texture_size'
video/ps2sdk/SDL_ps2video.c:217: request for member `Width' in something not a s
tructure or union
video/ps2sdk/SDL_ps2video.c:218: request for member `Height' in something not a
structure or union
video/ps2sdk/SDL_ps2video.c:219: request for member `PSM' in something not a str
ucture or union
video/ps2sdk/SDL_ps2video.c:220: request for member `Mem' in something not a str
ucture or union
video/ps2sdk/SDL_ps2video.c:220: warning: implicit declaration of function `mall
oc'
video/ps2sdk/SDL_ps2video.c:221: request for member `Mem' in something not a str
ucture or union
video/ps2sdk/SDL_ps2video.c:227: request for member `Mem' in something not a str
ucture or union
video/ps2sdk/SDL_ps2video.c:228: request for member `Vram' in something not a st
ructure or union
video/ps2sdk/SDL_ps2video.c:228: warning: implicit declaration of function `gsKi
t_vram_alloc'
video/ps2sdk/SDL_ps2video.c:232: request for member `Clut' in something not a st
ructure or union
video/ps2sdk/SDL_ps2video.c:233: request for member `VramClut' in something not
a structure or union
video/ps2sdk/SDL_ps2video.c:233: `u32' undeclared (first use in this function)
video/ps2sdk/SDL_ps2video.c:233: parse error before "gsKit_vram_alloc"
video/ps2sdk/SDL_ps2video.c:238: request for member `Clut' in something not a st
ructure or union
video/ps2sdk/SDL_ps2video.c:239: request for member `VramClut' in something not
a structure or union
video/ps2sdk/SDL_ps2video.c:245: request for member `Mem' in something not a str
ucture or union
video/ps2sdk/SDL_ps2video.c:255: request for member `Mem' in something not a str
ucture or union
video/ps2sdk/SDL_ps2video.c:258: request for member `Width' in something not a s
tructure or union
video/ps2sdk/SDL_ps2video.c:259: request for member `Height' in something not a
structure or union
video/ps2sdk/SDL_ps2video.c: In function `PS2_UpdateRects':
video/ps2sdk/SDL_ps2video.c:331: warning: implicit declaration of function `gsKi
t_texture_upload'
video/ps2sdk/SDL_ps2video.c:342: warning: implicit declaration of function `gsKi
t_prim_sprite_texture'
video/ps2sdk/SDL_ps2video.c:351: warning: implicit declaration of function `gsKi
t_sync_flip'
make[1]: *** [video/ps2sdk/SDL_ps2video.o] Error 1
make[1]: Leaving directory `/cygdrive/c/PS2Dev/ps2sdk-ports/sdl/src'
make: *** [all-src] Error 2

C:\PS2Dev\ps2sdk-ports\sdl>

Here is a copy of my paths to the PS2 Compiler/libraries (I use a batch file called ps2dev.bat):

rem Run this from a command prompt to setup your ps2dev settings
set PS2DEV=C:\PS2DEV
set PS2GCC=%PS2DEV%\gcc
set PS2LIB=%PS2DEV%\ps2lib
Set PATH=%PATH%;%PS2DEV%\share;%PS2GCC%\ee\bin;%PS2GCC%\iop\bin;%PS2GCC%\dvp\bin;%PS2GCC%\ee\ee\bin;%PS2GCC%\dvp\dvp\bin;%PS2GCC%\iop\iop\bin;
set PS2SDK=%PS2DEV%\ps2sdk
set PS2SDKSRC=%ps2dev%\ps2sdk
set SUPERLIB=%PS2DEV%\superlib
set SBV-1.0-LITE=%PS2DEV%\sbv
set PS2DRV-1.2=%PS2DEV%\ps2drv
set PADLIB1.2=%PS2DEV%\padlib1.2
set MATH3D=%PS2DEV%\math3d
set LIBPS2MPEG=%PS2DEV%\libps2mpeg
set LIBITO=%PS2DEV%\libito
set LIBHDD=%PS2DEV%\libhdd
set LIBCDVD=%PS2DEV%\libcdvd
set GSULIB=%PS2DEV%\gsulib-1.0.0
set GSLIB=%PS2DEV%\gslib
set GSKIT=%PS2DEV%\gsKit
set FREETYPE=%PS2DEV%\freetype-2.1.4
set FRAMEWORK=%PS2DEV%\framework
set NEWLIB=%PS2DEV%\newlib
set DREAMGL=%PS2DEV%\dream_gl
set DMALIB=%PS2DEV%\dmalib-1.2.0
set KAPI=%PS2DEV%\KAPI
set SDL=%PS2DEV%\ps2sdk-ports\sdl
set SDLMIXER=%PS2DEV\ps2sdk-ports\sdlmixer

I'm getting compile errors for every lib that I try to compile. I'm useing the PS2Dev for Win32 compiler from Loser which is at http://www.internalreality.com/ (It's from July 2004)

Posted: Sun Feb 20, 2005 8:40 pm
by cory1492
EugeneE3RD wrote:Well, I also got a compilation error. Here is my compilation error:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
That is true, windows xp seems to be one big error overall. just kidding.

Have you tried the newer sdk with cygwin? I had some difficulty trying to get the win32.exe install to work at anything and found it was much simpler to go with cygwin, espectially since many improvements (is that the right word? ie: define improve == more_complicated == -newbie_friendly) have been done since Losers compilation.

Posted: Sun Feb 20, 2005 10:33 pm
by pixel
EugeneE3RD wrote: video/ps2sdk/SDL_ps2video.c:37:19: gsKit.h: No such file or directory
video/ps2sdk/SDL_ps2video.c:38:20: dmaKit.h: No such file or directory
You need gsKit, obviously. From CVS.

Posted: Sun Feb 20, 2005 11:58 pm
by Neil Stevens
And when you've build gsKit, set the GSKIT environment variable to the path where you built it.

Posted: Mon Feb 21, 2005 1:57 am
by Shazz
I would just add, get the LATEST gsKit available under CVS..

Currently the SDL source code changes mostly everyday, Gawd added sound support based on sjpcm, he should commit my patchs to handle USB devices...

So stay tuned :D