SDL 1.1.8 does not work :-(

Hello,

I don’t get any SDL program working. Any program I try will
compile flawlessly, but when I start it, the program window
does not appear.

The program gets stuck in an endless wait for something,
I suppose. When I use strace, the messages suddenly cease,
and the last lines are (example: test/testsprite):

select(4, [3], NULL, NULL, NULL) = 1 (in [3])
read(3, “\1\0\r\0\0\0\0\0\0\0\10\0\0\0\0\0\374\366\377\2770G\33”…, 32) = 32
write(3, “\217\1\2\0\0\0\0\0”, 8) = 8
read(3, 0xbffff494, 32) = -1 EAGAIN (Resource temporarily
unavailable)
select(4, [3], NULL, NULL, NULL) = 1 (in [3])
read(3, “\1\0\16\0\1\0\0\0\360\270\1\0\0\4\20\4\300\0040\5\0\3\0”…, 32) = 32
read(3, “\0\0\0\0”, 4) = 4
old_mmap(NULL, 327680, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x402a9000
read(3, 0x402a9008, 326464) = -1 EAGAIN (Resource temporarily
unavailable)
select(4, [3], NULL, NULL, NULL

That’s it. The last select call stays unfinished.

When I use a debugger, and I wait until the program get stuck (in this
case, it’s testbitmap), the backtrace is:

(gdb) bt
#0 0x4013471e in select () from /lib/libc.so.6
#1 0x4028cf98 in DTOR_END () from /usr/X11R6/lib/libX11.so.6
#2 0x401f287a in _XRead () from /usr/X11R6/lib/libX11.so.6
#3 0x4029e647 in XF86VidModeGetModeLine () from /usr/X11R6/lib/libXxf86vm.so.1
#4 0x40043a59 in XF86VidModeGetModeInfo () at SDL_x11modes.c:350
#5 0x40043ac1 in save_mode (this=0x804a130) at SDL_x11modes.c:54
#6 0x40044325 in X11_GetVideoModes () at SDL_x11modes.c:191
#7 0x40045c73 in X11_VideoInit (this=0x804a130, vformat=0xbffff654)
at SDL_x11video.c:407
#8 0x4003de26 in SDL_VideoInit () at SDL_video.c:793
#9 0x4001f61b in SDL_InitSubSystem () at SDL.c:148
#10 0x4001f725 in SDL_Init () at SDL.c:148
#11 0x8048aa6 in main (argc=1, argv=0xbffff7a4) at testbitmap.c:57

I don’t have any clue what may cause this problem. Note that I have had
some SDL programs running (RRT, for example), which worked perfectly.

My system is:
SuSE Linux 7.0 (with glibc 2.0 IIRC)
XFree86 3.3.6
SDL 1.1.8, which I compiled myself
Kernel 2.2.16

So, what am I to do? Is this perhaps already a known problem?

Thanks very much for any advice
Michael–
Time flies like an arrow
Fruit flies like a banana

I don’t get any SDL program working. Any program I try will
compile flawlessly, but when I start it, the program window
does not appear.
[…]
My system is:
SuSE Linux 7.0 (with glibc 2.0 IIRC)
XFree86 3.3.6
SDL 1.1.8, which I compiled myself
Kernel 2.2.16

So, what am I to do? Is this perhaps already a known problem?

Half a year ago, there was a thread about problems with SuSE 7.0 . I’ll
just include the essential messages here. For more details, check out
the archive.

==================BEGIN FORWARDED MESSAGE==================On Mon, 12 Mar 2001 13:47:18 -0800, Michael Wand wrote:
Subject: [SDL] SuSE 7.0 problems solved
From: slouken@libsdl.org (slouken)
Date: Thu, 12 Oct 2000 13:40:45 -0700

SuSE ships XFree86 4.0.1 libraries and installs an XFree86 3.3.6 X
server.
The libraries are not completely backwards compatible, and have a bug
in
which listing the available video modes hangs the X vidmode library.

This bug is fixed in XFree86 4.0.2, which should be the next X release.

In the meantime, use the precompiled binaries of SDL, which have been
specially built to avoid these problems. I’m going to put up a binary
of the current CVS at:
http://www.libsdl.org/cvs/libSDL-1.1.so.0.5.1

You can tell if your system will have this problem if SDL reports
VidMode gamma support when you run configure to build it, and the
output of xdpyinfo shows XFree86 336 as the version of the server.

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

===================END FORWARDED MESSAGE===================

==================BEGIN FORWARDED MESSAGE==================
Forwarded message: -------------------
Date: Tue, 10 Oct 2000 20:43:31 +0200 (MEST)
From: crf@sbox.tu-graz.ac.at (Martin Pirker)
Subject: Re: SDL on Suse Linux 7.0

Hi!

from the mailing list:

It seems the SDL_Init locks up, and for all I know it has something todo
with threads, but I can’t find it, as other simple pthread programswork
with Suse 7.
Please contact me directly at slouken at libsdl.org

I already thought about this when Suse 7.0 was released, but now it
surfaces on the list and SDL really seems affected. pthreads is broken
on 7.0 …

http://sdb.suse.de/en/sdb/html/aj_pthread7.0.html

just a hint :wink:

Regards,
Martin

------------------- end forwarded message.
===================END FORWARDED MESSAGE===================

I don’t get any SDL program working. Any program I try will
compile flawlessly, but when I start it, the program window
does not appear.

My system is:
SuSE Linux 7.0 (with glibc 2.0 IIRC)
XFree86 3.3.6
SDL 1.1.8, which I compiled myself

This is a FAQ:
http://www.libsdl.org/faq/FAQ-Linux.html#BROKEN_SUSE

See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Is this the same for SuSE 7.1 ???

CU

“Sam Lantinga” schrieb im Newsbeitrag news:E14ccrm-0000VU-00 at roboto.devolution.com…> > I don’t get any SDL program working. Any program I try will

compile flawlessly, but when I start it, the program window
does not appear.

My system is:
SuSE Linux 7.0 (with glibc 2.0 IIRC)
XFree86 3.3.6
SDL 1.1.8, which I compiled myself

This is a FAQ:
http://www.libsdl.org/faq/FAQ-Linux.html#BROKEN_SUSE

See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Sorry for the HTML Mail earlier :frowning:

Are the pre-compiled libs for suse 7.0 still available somewhere ?? Please
point me in the right direction.
Greetings
Stefan Hagendorn

[SDL did not work. On SuSE 7.0.]

So, one time I was too lazy to read the FAQ:-( Sorry.

However, there is still the question if there are available current prebuilt
binaries which avoid this error, or if I really have to upgrade from
X 3.3.6 to X 4, which I do not really fancy, as my current system works
very well.

I think someone already asked this, but I don’t think there was an answer.
If there was one, just post it again, so that even I get it.

THX
MichaelOn Mon, 12 Mar 2001 22:43:24 +0100, Michael Wand <@Michael_Wand> wrote:


Time flies like an arrow
Fruit flies like a banana

However, there is still the question if there are available current prebuilt
binaries which avoid this error, or if I really have to upgrade from
X 3.3.6 to X 4, which I do not really fancy, as my current system works
very well.

All of the prebuilt binaries should avoid this error. Just grab the RPM
package and install it.

See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software