Patchwork Re: Help on "Could not initialize SDL - exiting"

login
register
mail settings
Submitter Michael S. Tsirkin
Date Dec. 30, 2009, 9:31 a.m.
Message ID <20091230093135.GA2285@redhat.com>
Download mbox | patch
Permalink /patch/41902/
State New
Headers show

Comments

Michael S. Tsirkin - Dec. 30, 2009, 9:31 a.m.
On Sun, Dec 27, 2009 at 05:35:56AM -0300, Dejun.Liu wrote:
> Hi,
> 
> below is my DISPLAY info:
> echo ${DISPLAY}
> :0.0
> 
> and i have already added localhost to xhost with the command:
> xhost localhost
> 
> but the error continue the same.
> 
> root@dejunliu-desktop:~# echo ${DISPLAY}
> :0.0
> root@dejunliu-desktop:~# xhost localhost
> localhost being added to access control list
> root@dejunliu-desktop:~# qemu-system-arm -M versatilepb -usb -usbdevice
> wacom-tablet -show-cursor -m 64
> -kernel /home/protocol/study/OE/angstrom-dev/deploy/glibc/images/qemuarm/zImage-2.6.25+2.6.26-rc4-r6-qemuarm.bin -drive file=/home/protocol/study/OE/angstrom-dev/deploy/glibc/images/qemuarm/Angstrom-x11-image-glibc-ipk-2009.X-stable-qemuarm.rootfs.ext3 -append "root=/dev/sda" 
> Could not initialize SDL - exiting
> 
> so ,is my configure right?
> 
> cheers
> 
> Steven Liu
> 
> 
> On Tue, 2009-12-29 at 12:18 +0200, Michael S. Tsirkin wrote:
> > No, I mean DISPLAY.
> > 
> > On Sat, Dec 26, 2009 at 02:44:05PM -0300, Dejun.Liu wrote:
> > > Hi,
> > > 
> > > do u mean: 
> > > export SDL_VIDEODRIVER=x11
> > > ?
> > > i hava set sdl video driver to x11.
> > > 
> > > Steven Liu
> > > 
> > > On Tue, 2009-12-29 at 12:04 +0200, Michael S. Tsirkin wrote:
> > > > Most likely DISPLAY not set.
> > > > 
> > > > On Sat, Dec 26, 2009 at 07:40:01AM -0300, Dejun.Liu wrote:
> > > > > Hi,
> > > > > 
> > > > > Im a newbie to qemu use.
> > > > > so i got a lot error!..........
> > > > > 
> > > > > I build qemu from source with the version 0.10.3,
> > > > > 
> > > > > But when i start qemu with the command below, i got the message
> > > > > Could not initialize SDL - exiting
> > > > > 
> > > > > after that Qemu exit. I dig the web ,but i could not find any answers,so
> > > > > I ask this question in this maillist,sorry for this.
> > > > > 
> > > > > Command:
> > > > > /angstrom-dev/staging/i686-linux/usr/bin/qemu-system-arm -M
> > > > > versatilepb -usb -usbdevice wacom-tablet -show-cursor -m 64
> > > > > -kernel /home/protocol/study/OE/angstrom-dev/deploy/glibc/images/qemuarm/zImage-2.6.25+2.6.26-rc4-r6-qemuarm.bin -drive file=/home/protocol/study/OE/angstrom-dev/deploy/glibc/images/qemuarm/Angstrom-x11-image-glibc-ipk-2009.X-stable-qemuarm.rootfs.ext3 -append "root=/dev/sda"
> > > > > 
> > > > > And ldd result of qemu-system-arm is:
> > > > > 
> > > > > root@dejunliu-desktop:~# ldd `which qemu-system-arm`
> > > > > 	linux-gate.so.1 =>  (0xb7f4c000)
> > > > > 	libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7f18000)
> > > > > 	libz.so.1
> > > > > => /home/protocol/study/OE/angstrom-dev/staging/i686-linux/usr/lib/libz.so.1 (0xb7f06000)
> > > > > 	libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7eed000)
> > > > > 	librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7ee4000)
> > > > > 	libutil.so.1 => /lib/tls/i686/cmov/libutil.so.1 (0xb7ee0000)
> > > > > 	libSDL-1.2.so.0
> > > > > => /home/protocol/study/OE/angstrom-dev/staging/i686-linux/usr/lib/libSDL-1.2.so.0 (0xb7e9f000)
> > > > > 	libncurses.so.5
> > > > > => /home/protocol/study/OE/angstrom-dev/staging/i686-linux/usr/lib/libncurses.so.5 (0xb7e5c000)
> > > > > 	libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d0c000)
> > > > > 	/lib/ld-linux.so.2 (0xb7f4d000)
> > > > > 	libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7d08000)

Oh, X is not linked to. If this is intentional, run with -curses flag,
if not recompile qemu after installing X development libraries.
You should be able to compile the following program without  errors:

#include <SDL.h>
#if defined(SDL_VIDEO_DRIVER_X11)
#include <X11/XKBlib.h>
#else
#error No x11 support
#endif
int main(void) { return 0; }

You can also try applying the following patch, it might give
you more info.


> > > > > 
> > > > > would anyone like to help me to solve this problem?
> > > > > 
> > > > > 
> > > > > Cheers 
> > > > > Steven Liu
> > > > > 
> > > > > 
> > > > > ---------------------------------------------------------------------------------------------------
> > > > > Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) 
> > > > > is intended only for the use of the intended recipient and may be confidential and/or privileged of 
> > > > > Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is 
> > > > > not the intended recipient, unauthorized use, forwarding, printing,  storing, disclosure or copying 
> > > > > is strictly prohibited, and may be unlawful.If you have received this communication in error,please 
> > > > > immediately notify the sender by return e-mail, and delete the original message and all copies from 
> > > > > your system. Thank you. 
> > > > > ---------------------------------------------------------------------------------------------------
> > > 
> > > ---------------------------------------------------------------------------------------------------
> > > Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) 
> > > is intended only for the use of the intended recipient and may be confidential and/or privileged of 
> > > Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is 
> > > not the intended recipient, unauthorized use, forwarding, printing,  storing, disclosure or copying 
> > > is strictly prohibited, and may be unlawful.If you have received this communication in error,please 
> > > immediately notify the sender by return e-mail, and delete the original message and all copies from 
> > > your system. Thank you. 
> > > ---------------------------------------------------------------------------------------------------
> > 
> > 
> 
> ---------------------------------------------------------------------------------------------------
> Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) 
> is intended only for the use of the intended recipient and may be confidential and/or privileged of 
> Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is 
> not the intended recipient, unauthorized use, forwarding, printing,  storing, disclosure or copying 
> is strictly prohibited, and may be unlawful.If you have received this communication in error,please 
> immediately notify the sender by return e-mail, and delete the original message and all copies from 
> your system. Thank you. 
> ---------------------------------------------------------------------------------------------------

You are sending this to a public mailing list.  Do you know that?
Please do not attach such text to your messages.
From 2d4522de5c0772019c15a5ff8ba4ae57a9313510 Mon Sep 17 00:00:00 2001
From: Michael S. Tsirkin <mst@redhat.com>
Date: Wed, 30 Dec 2009 11:17:05 +0200
X-Mutt-Fcc: =sent
Subject: [PATCH] sdl: print error before exiting

Print out SDL_GetError before exit to help people diagnose SDL problems.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 sdl.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Dejun.Liu - Dec. 31, 2009, 8:45 a.m.
Hi,

I hava patched sdl.c file.

return error is below:

root@dejunliu-desktop:/home/protocol/study/OE/build# qemu-system-arm -M
versatilepb -usb -usbdevice wacom-tablet -show-cursor -m 64
-kernel /home/protocol/study/OE/angstrom-dev/deploy/glibc/images/qemuarm/zImage-2.6.25+2.6.26-rc4-r6-qemuarm.bin -drive file=/home/protocol/study/OE/angstrom-dev/deploy/glibc/images/qemuarm/Angstrom-x11-image-glibc-ipk-2009.X-stable-qemuarm.rootfs.ext3 -append "root=/dev/sda"
Could not initialize SDL - exiting
SDL error: No available video device


How should i do?

Steven Liu

On Wed, 2009-12-30 at 11:31 +0200, Michael S. Tsirkin wrote:
> On Sun, Dec 27, 2009 at 05:35:56AM -0300, Dejun.Liu wrote:
> > Hi,
> > 
> > below is my DISPLAY info:
> > echo ${DISPLAY}
> > :0.0
> > 
> > and i have already added localhost to xhost with the command:
> > xhost localhost
> > 
> > but the error continue the same.
> > 
> > root@dejunliu-desktop:~# echo ${DISPLAY}
> > :0.0
> > root@dejunliu-desktop:~# xhost localhost
> > localhost being added to access control list
> > root@dejunliu-desktop:~# qemu-system-arm -M versatilepb -usb -usbdevice
> > wacom-tablet -show-cursor -m 64
> > -kernel /home/protocol/study/OE/angstrom-dev/deploy/glibc/images/qemuarm/zImage-2.6.25+2.6.26-rc4-r6-qemuarm.bin -drive file=/home/protocol/study/OE/angstrom-dev/deploy/glibc/images/qemuarm/Angstrom-x11-image-glibc-ipk-2009.X-stable-qemuarm.rootfs.ext3 -append "root=/dev/sda" 
> > Could not initialize SDL - exiting
> > 
> > so ,is my configure right?
> > 
> > cheers
> > 
> > Steven Liu
> > 
> > 
> > On Tue, 2009-12-29 at 12:18 +0200, Michael S. Tsirkin wrote:
> > > No, I mean DISPLAY.
> > > 
> > > On Sat, Dec 26, 2009 at 02:44:05PM -0300, Dejun.Liu wrote:
> > > > Hi,
> > > > 
> > > > do u mean: 
> > > > export SDL_VIDEODRIVER=x11
> > > > ?
> > > > i hava set sdl video driver to x11.
> > > > 
> > > > Steven Liu
> > > > 
> > > > On Tue, 2009-12-29 at 12:04 +0200, Michael S. Tsirkin wrote:
> > > > > Most likely DISPLAY not set.
> > > > > 
> > > > > On Sat, Dec 26, 2009 at 07:40:01AM -0300, Dejun.Liu wrote:
> > > > > > Hi,
> > > > > > 
> > > > > > Im a newbie to qemu use.
> > > > > > so i got a lot error!..........
> > > > > > 
> > > > > > I build qemu from source with the version 0.10.3,
> > > > > > 
> > > > > > But when i start qemu with the command below, i got the message
> > > > > > Could not initialize SDL - exiting
> > > > > > 
> > > > > > after that Qemu exit. I dig the web ,but i could not find any answers,so
> > > > > > I ask this question in this maillist,sorry for this.
> > > > > > 
> > > > > > Command:
> > > > > > /angstrom-dev/staging/i686-linux/usr/bin/qemu-system-arm -M
> > > > > > versatilepb -usb -usbdevice wacom-tablet -show-cursor -m 64
> > > > > > -kernel /home/protocol/study/OE/angstrom-dev/deploy/glibc/images/qemuarm/zImage-2.6.25+2.6.26-rc4-r6-qemuarm.bin -drive file=/home/protocol/study/OE/angstrom-dev/deploy/glibc/images/qemuarm/Angstrom-x11-image-glibc-ipk-2009.X-stable-qemuarm.rootfs.ext3 -append "root=/dev/sda"
> > > > > > 
> > > > > > And ldd result of qemu-system-arm is:
> > > > > > 
> > > > > > root@dejunliu-desktop:~# ldd `which qemu-system-arm`
> > > > > > 	linux-gate.so.1 =>  (0xb7f4c000)
> > > > > > 	libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7f18000)
> > > > > > 	libz.so.1
> > > > > > => /home/protocol/study/OE/angstrom-dev/staging/i686-linux/usr/lib/libz.so.1 (0xb7f06000)
> > > > > > 	libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7eed000)
> > > > > > 	librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7ee4000)
> > > > > > 	libutil.so.1 => /lib/tls/i686/cmov/libutil.so.1 (0xb7ee0000)
> > > > > > 	libSDL-1.2.so.0
> > > > > > => /home/protocol/study/OE/angstrom-dev/staging/i686-linux/usr/lib/libSDL-1.2.so.0 (0xb7e9f000)
> > > > > > 	libncurses.so.5
> > > > > > => /home/protocol/study/OE/angstrom-dev/staging/i686-linux/usr/lib/libncurses.so.5 (0xb7e5c000)
> > > > > > 	libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d0c000)
> > > > > > 	/lib/ld-linux.so.2 (0xb7f4d000)
> > > > > > 	libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7d08000)
> 
> Oh, X is not linked to. If this is intentional, run with -curses flag,
> if not recompile qemu after installing X development libraries.
> You should be able to compile the following program without  errors:
> 
> #include <SDL.h>
> #if defined(SDL_VIDEO_DRIVER_X11)
> #include <X11/XKBlib.h>
> #else
> #error No x11 support
> #endif
> int main(void) { return 0; }
> 
> You can also try applying the following patch, it might give
> you more info.
> 
> 
> > > > > > 
> > > > > > would anyone like to help me to solve this problem?
> > > > > > 
> > > > > > 
> > > > > > Cheers 
> > > > > > Steven Liu
> > > > > > 
> > > > > > 
> > > > > > ---------------------------------------------------------------------------------------------------
> > > > > > Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) 
> > > > > > is intended only for the use of the intended recipient and may be confidential and/or privileged of 
> > > > > > Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is 
> > > > > > not the intended recipient, unauthorized use, forwarding, printing,  storing, disclosure or copying 
> > > > > > is strictly prohibited, and may be unlawful.If you have received this communication in error,please 
> > > > > > immediately notify the sender by return e-mail, and delete the original message and all copies from 
> > > > > > your system. Thank you. 
> > > > > > ---------------------------------------------------------------------------------------------------
> > > > 
> > > > ---------------------------------------------------------------------------------------------------
> > > > Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) 
> > > > is intended only for the use of the intended recipient and may be confidential and/or privileged of 
> > > > Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is 
> > > > not the intended recipient, unauthorized use, forwarding, printing,  storing, disclosure or copying 
> > > > is strictly prohibited, and may be unlawful.If you have received this communication in error,please 
> > > > immediately notify the sender by return e-mail, and delete the original message and all copies from 
> > > > your system. Thank you. 
> > > > ---------------------------------------------------------------------------------------------------
> > > 
> > > 
> > 
> > ---------------------------------------------------------------------------------------------------
> > Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) 
> > is intended only for the use of the intended recipient and may be confidential and/or privileged of 
> > Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is 
> > not the intended recipient, unauthorized use, forwarding, printing,  storing, disclosure or copying 
> > is strictly prohibited, and may be unlawful.If you have received this communication in error,please 
> > immediately notify the sender by return e-mail, and delete the original message and all copies from 
> > your system. Thank you. 
> > ---------------------------------------------------------------------------------------------------
> 
> You are sending this to a public mailing list.  Do you know that?
> Please do not attach such text to your messages.

---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) 
is intended only for the use of the intended recipient and may be confidential and/or privileged of 
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is 
not the intended recipient, unauthorized use, forwarding, printing,  storing, disclosure or copying 
is strictly prohibited, and may be unlawful.If you have received this communication in error,please 
immediately notify the sender by return e-mail, and delete the original message and all copies from 
your system. Thank you. 
---------------------------------------------------------------------------------------------------
Andreas Färber - Dec. 31, 2009, 12:30 p.m.
Hi,

Am 31.12.2009 um 09:45 schrieb Dejun.Liu:

> root@dejunliu-desktop:/home/protocol/study/OE/build# qemu-system-arm  
> -M
> versatilepb -usb -usbdevice wacom-tablet -show-cursor -m 64
> -kernel /home/protocol/study/OE/angstrom-dev/deploy/glibc/images/ 
> qemuarm/zImage-2.6.25+2.6.26-rc4-r6-qemuarm.bin -drive file=/home/ 
> protocol/study/OE/angstrom-dev/deploy/glibc/images/qemuarm/Angstrom- 
> x11-image-glibc-ipk-2009.X-stable-qemuarm.rootfs.ext3 -append "root=/ 
> dev/sda"
> Could not initialize SDL - exiting
> SDL error: No available video device

I had similar SDL issues on Fedora 12 ppc64. I ran qemu through  
'strace', which showed me that some apparently dynamically loaded X11  
libraries were not installed by default.

Andreas

> How should i do?
>
> Steven Liu
>
> On Wed, 2009-12-30 at 11:31 +0200, Michael S. Tsirkin wrote:
>> On Sun, Dec 27, 2009 at 05:35:56AM -0300, Dejun.Liu wrote:
>>> Hi,
>>>
>>> below is my DISPLAY info:
>>> echo ${DISPLAY}
>>> :0.0
>>>
>>> and i have already added localhost to xhost with the command:
>>> xhost localhost
>>>
>>> but the error continue the same.
>>>
>>> root@dejunliu-desktop:~# echo ${DISPLAY}
>>> :0.0
>>> root@dejunliu-desktop:~# xhost localhost
>>> localhost being added to access control list
>>> root@dejunliu-desktop:~# qemu-system-arm -M versatilepb -usb - 
>>> usbdevice
>>> wacom-tablet -show-cursor -m 64
>>> -kernel /home/protocol/study/OE/angstrom-dev/deploy/glibc/images/ 
>>> qemuarm/zImage-2.6.25+2.6.26-rc4-r6-qemuarm.bin -drive file=/home/ 
>>> protocol/study/OE/angstrom-dev/deploy/glibc/images/qemuarm/ 
>>> Angstrom-x11-image-glibc-ipk-2009.X-stable-qemuarm.rootfs.ext3 - 
>>> append "root=/dev/sda"
>>> Could not initialize SDL - exiting
>>>
>>> so ,is my configure right?
>>>
>>> cheers
>>>
>>> Steven Liu
>>>
>>>
>>> On Tue, 2009-12-29 at 12:18 +0200, Michael S. Tsirkin wrote:
>>>> No, I mean DISPLAY.
>>>>
>>>> On Sat, Dec 26, 2009 at 02:44:05PM -0300, Dejun.Liu wrote:
>>>>> Hi,
>>>>>
>>>>> do u mean:
>>>>> export SDL_VIDEODRIVER=x11
>>>>> ?
>>>>> i hava set sdl video driver to x11.
>>>>>
>>>>> Steven Liu
>>>>>
>>>>> On Tue, 2009-12-29 at 12:04 +0200, Michael S. Tsirkin wrote:
>>>>>> Most likely DISPLAY not set.
>>>>>>
>>>>>> On Sat, Dec 26, 2009 at 07:40:01AM -0300, Dejun.Liu wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> Im a newbie to qemu use.
>>>>>>> so i got a lot error!..........
>>>>>>>
>>>>>>> I build qemu from source with the version 0.10.3,
>>>>>>>
>>>>>>> But when i start qemu with the command below, i got the message
>>>>>>> Could not initialize SDL - exiting
>>>>>>>
>>>>>>> after that Qemu exit. I dig the web ,but i could not find any  
>>>>>>> answers,so
>>>>>>> I ask this question in this maillist,sorry for this.
>>>>>>>
>>>>>>> Command:
>>>>>>> /angstrom-dev/staging/i686-linux/usr/bin/qemu-system-arm -M
>>>>>>> versatilepb -usb -usbdevice wacom-tablet -show-cursor -m 64
>>>>>>> -kernel /home/protocol/study/OE/angstrom-dev/deploy/glibc/ 
>>>>>>> images/qemuarm/zImage-2.6.25+2.6.26-rc4-r6-qemuarm.bin -drive  
>>>>>>> file=/home/protocol/study/OE/angstrom-dev/deploy/glibc/images/ 
>>>>>>> qemuarm/Angstrom-x11-image-glibc-ipk-2009.X-stable- 
>>>>>>> qemuarm.rootfs.ext3 -append "root=/dev/sda"
>>>>>>>
>>>>>>> And ldd result of qemu-system-arm is:
>>>>>>>
>>>>>>> root@dejunliu-desktop:~# ldd `which qemu-system-arm`
>>>>>>> 	linux-gate.so.1 =>  (0xb7f4c000)
>>>>>>> 	libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7f18000)
>>>>>>> 	libz.so.1
>>>>>>> => /home/protocol/study/OE/angstrom-dev/staging/i686-linux/usr/ 
>>>>>>> lib/libz.so.1 (0xb7f06000)
>>>>>>> 	libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0  
>>>>>>> (0xb7eed000)
>>>>>>> 	librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7ee4000)
>>>>>>> 	libutil.so.1 => /lib/tls/i686/cmov/libutil.so.1 (0xb7ee0000)
>>>>>>> 	libSDL-1.2.so.0
>>>>>>> => /home/protocol/study/OE/angstrom-dev/staging/i686-linux/usr/ 
>>>>>>> lib/libSDL-1.2.so.0 (0xb7e9f000)
>>>>>>> 	libncurses.so.5
>>>>>>> => /home/protocol/study/OE/angstrom-dev/staging/i686-linux/usr/ 
>>>>>>> lib/libncurses.so.5 (0xb7e5c000)
>>>>>>> 	libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d0c000)
>>>>>>> 	/lib/ld-linux.so.2 (0xb7f4d000)
>>>>>>> 	libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7d08000)
>>
>> Oh, X is not linked to. If this is intentional, run with -curses  
>> flag,
>> if not recompile qemu after installing X development libraries.
>> You should be able to compile the following program without  errors:
>>
>> #include <SDL.h>
>> #if defined(SDL_VIDEO_DRIVER_X11)
>> #include <X11/XKBlib.h>
>> #else
>> #error No x11 support
>> #endif
>> int main(void) { return 0; }
>>
>> You can also try applying the following patch, it might give
>> you more info.
>>
>>
>>>>>>>
>>>>>>> would anyone like to help me to solve this problem?
>>>>>>>
>>>>>>>
>>>>>>> Cheers
>>>>>>> Steven Liu
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------------------------------------
>>>>>>> Confidentiality Notice: The information contained in this e- 
>>>>>>> mail and any accompanying attachment(s)
>>>>>>> is intended only for the use of the intended recipient and may  
>>>>>>> be confidential and/or privileged of
>>>>>>> Neusoft Corporation, its subsidiaries and/or its affiliates.  
>>>>>>> If any reader of this communication is
>>>>>>> not the intended recipient, unauthorized use, forwarding,  
>>>>>>> printing,  storing, disclosure or copying
>>>>>>> is strictly prohibited, and may be unlawful.If you have  
>>>>>>> received this communication in error,please
>>>>>>> immediately notify the sender by return e-mail, and delete the  
>>>>>>> original message and all copies from
>>>>>>> your system. Thank you.
>>>>>>> ---------------------------------------------------------------------------------------------------
>>>>>
>>>>> ---------------------------------------------------------------------------------------------------
>>>>> Confidentiality Notice: The information contained in this e-mail  
>>>>> and any accompanying attachment(s)
>>>>> is intended only for the use of the intended recipient and may  
>>>>> be confidential and/or privileged of
>>>>> Neusoft Corporation, its subsidiaries and/or its affiliates. If  
>>>>> any reader of this communication is
>>>>> not the intended recipient, unauthorized use, forwarding,  
>>>>> printing,  storing, disclosure or copying
>>>>> is strictly prohibited, and may be unlawful.If you have received  
>>>>> this communication in error,please
>>>>> immediately notify the sender by return e-mail, and delete the  
>>>>> original message and all copies from
>>>>> your system. Thank you.
>>>>> ---------------------------------------------------------------------------------------------------
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------------------------------------
>>> Confidentiality Notice: The information contained in this e-mail  
>>> and any accompanying attachment(s)
>>> is intended only for the use of the intended recipient and may be  
>>> confidential and/or privileged of
>>> Neusoft Corporation, its subsidiaries and/or its affiliates. If  
>>> any reader of this communication is
>>> not the intended recipient, unauthorized use, forwarding,  
>>> printing,  storing, disclosure or copying
>>> is strictly prohibited, and may be unlawful.If you have received  
>>> this communication in error,please
>>> immediately notify the sender by return e-mail, and delete the  
>>> original message and all copies from
>>> your system. Thank you.
>>> ---------------------------------------------------------------------------------------------------
>>
>> You are sending this to a public mailing list.  Do you know that?
>> Please do not attach such text to your messages.
>
> ---------------------------------------------------------------------------------------------------
> Confidentiality Notice: The information contained in this e-mail and  
> any accompanying attachment(s)
> is intended only for the use of the intended recipient and may be  
> confidential and/or privileged of
> Neusoft Corporation, its subsidiaries and/or its affiliates. If any  
> reader of this communication is
> not the intended recipient, unauthorized use, forwarding, printing,   
> storing, disclosure or copying
> is strictly prohibited, and may be unlawful.If you have received  
> this communication in error,please
> immediately notify the sender by return e-mail, and delete the  
> original message and all copies from
> your system. Thank you.
> ---------------------------------------------------------------------------------------------------
Dejun.Liu - Jan. 4, 2010, 1:06 a.m.
Hi

yes, I hava find that OE build SDL not support x11 ,so hava the error
No available video device.

thanks all these helps

Steven Liu

On Thu, 2009-12-31 at 13:30 +0100, Andreas Färber wrote:
> Hi,
> 
> Am 31.12.2009 um 09:45 schrieb Dejun.Liu:
> 
> > root@dejunliu-desktop:/home/protocol/study/OE/build# qemu-system-arm  
> > -M
> > versatilepb -usb -usbdevice wacom-tablet -show-cursor -m 64
> > -kernel /home/protocol/study/OE/angstrom-dev/deploy/glibc/images/ 
> > qemuarm/zImage-2.6.25+2.6.26-rc4-r6-qemuarm.bin -drive file=/home/ 
> > protocol/study/OE/angstrom-dev/deploy/glibc/images/qemuarm/Angstrom- 
> > x11-image-glibc-ipk-2009.X-stable-qemuarm.rootfs.ext3 -append "root=/ 
> > dev/sda"
> > Could not initialize SDL - exiting
> > SDL error: No available video device
> 
> I had similar SDL issues on Fedora 12 ppc64. I ran qemu through  
> 'strace', which showed me that some apparently dynamically loaded X11  
> libraries were not installed by default.
> 
> Andreas
> 
> > How should i do?
> >
> > Steven Liu
> >
> > On Wed, 2009-12-30 at 11:31 +0200, Michael S. Tsirkin wrote:
> >> On Sun, Dec 27, 2009 at 05:35:56AM -0300, Dejun.Liu wrote:
> >>> Hi,
> >>>
> >>> below is my DISPLAY info:
> >>> echo ${DISPLAY}
> >>> :0.0
> >>>
> >>> and i have already added localhost to xhost with the command:
> >>> xhost localhost
> >>>
> >>> but the error continue the same.
> >>>
> >>> root@dejunliu-desktop:~# echo ${DISPLAY}
> >>> :0.0
> >>> root@dejunliu-desktop:~# xhost localhost
> >>> localhost being added to access control list
> >>> root@dejunliu-desktop:~# qemu-system-arm -M versatilepb -usb - 
> >>> usbdevice
> >>> wacom-tablet -show-cursor -m 64
> >>> -kernel /home/protocol/study/OE/angstrom-dev/deploy/glibc/images/ 
> >>> qemuarm/zImage-2.6.25+2.6.26-rc4-r6-qemuarm.bin -drive file=/home/ 
> >>> protocol/study/OE/angstrom-dev/deploy/glibc/images/qemuarm/ 
> >>> Angstrom-x11-image-glibc-ipk-2009.X-stable-qemuarm.rootfs.ext3 - 
> >>> append "root=/dev/sda"
> >>> Could not initialize SDL - exiting
> >>>
> >>> so ,is my configure right?
> >>>
> >>> cheers
> >>>
> >>> Steven Liu
> >>>
> >>>
> >>> On Tue, 2009-12-29 at 12:18 +0200, Michael S. Tsirkin wrote:
> >>>> No, I mean DISPLAY.
> >>>>
> >>>> On Sat, Dec 26, 2009 at 02:44:05PM -0300, Dejun.Liu wrote:
> >>>>> Hi,
> >>>>>
> >>>>> do u mean:
> >>>>> export SDL_VIDEODRIVER=x11
> >>>>> ?
> >>>>> i hava set sdl video driver to x11.
> >>>>>
> >>>>> Steven Liu
> >>>>>
> >>>>> On Tue, 2009-12-29 at 12:04 +0200, Michael S. Tsirkin wrote:
> >>>>>> Most likely DISPLAY not set.
> >>>>>>
> >>>>>> On Sat, Dec 26, 2009 at 07:40:01AM -0300, Dejun.Liu wrote:
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>> Im a newbie to qemu use.
> >>>>>>> so i got a lot error!..........
> >>>>>>>
> >>>>>>> I build qemu from source with the version 0.10.3,
> >>>>>>>
> >>>>>>> But when i start qemu with the command below, i got the message
> >>>>>>> Could not initialize SDL - exiting
> >>>>>>>
> >>>>>>> after that Qemu exit. I dig the web ,but i could not find any  
> >>>>>>> answers,so
> >>>>>>> I ask this question in this maillist,sorry for this.
> >>>>>>>
> >>>>>>> Command:
> >>>>>>> /angstrom-dev/staging/i686-linux/usr/bin/qemu-system-arm -M
> >>>>>>> versatilepb -usb -usbdevice wacom-tablet -show-cursor -m 64
> >>>>>>> -kernel /home/protocol/study/OE/angstrom-dev/deploy/glibc/ 
> >>>>>>> images/qemuarm/zImage-2.6.25+2.6.26-rc4-r6-qemuarm.bin -drive  
> >>>>>>> file=/home/protocol/study/OE/angstrom-dev/deploy/glibc/images/ 
> >>>>>>> qemuarm/Angstrom-x11-image-glibc-ipk-2009.X-stable- 
> >>>>>>> qemuarm.rootfs.ext3 -append "root=/dev/sda"
> >>>>>>>
> >>>>>>> And ldd result of qemu-system-arm is:
> >>>>>>>
> >>>>>>> root@dejunliu-desktop:~# ldd `which qemu-system-arm`
> >>>>>>> 	linux-gate.so.1 =>  (0xb7f4c000)
> >>>>>>> 	libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7f18000)
> >>>>>>> 	libz.so.1
> >>>>>>> => /home/protocol/study/OE/angstrom-dev/staging/i686-linux/usr/ 
> >>>>>>> lib/libz.so.1 (0xb7f06000)
> >>>>>>> 	libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0  
> >>>>>>> (0xb7eed000)
> >>>>>>> 	librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0xb7ee4000)
> >>>>>>> 	libutil.so.1 => /lib/tls/i686/cmov/libutil.so.1 (0xb7ee0000)
> >>>>>>> 	libSDL-1.2.so.0
> >>>>>>> => /home/protocol/study/OE/angstrom-dev/staging/i686-linux/usr/ 
> >>>>>>> lib/libSDL-1.2.so.0 (0xb7e9f000)
> >>>>>>> 	libncurses.so.5
> >>>>>>> => /home/protocol/study/OE/angstrom-dev/staging/i686-linux/usr/ 
> >>>>>>> lib/libncurses.so.5 (0xb7e5c000)
> >>>>>>> 	libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7d0c000)
> >>>>>>> 	/lib/ld-linux.so.2 (0xb7f4d000)
> >>>>>>> 	libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7d08000)
> >>
> >> Oh, X is not linked to. If this is intentional, run with -curses  
> >> flag,
> >> if not recompile qemu after installing X development libraries.
> >> You should be able to compile the following program without  errors:
> >>
> >> #include <SDL.h>
> >> #if defined(SDL_VIDEO_DRIVER_X11)
> >> #include <X11/XKBlib.h>
> >> #else
> >> #error No x11 support
> >> #endif
> >> int main(void) { return 0; }
> >>
> >> You can also try applying the following patch, it might give
> >> you more info.
> >>
> >>
> >>>>>>>
> >>>>>>> would anyone like to help me to solve this problem?
> >>>>>>>
> >>>>>>>
> >>>>>>> Cheers
> >>>>>>> Steven Liu
> >>>>>>>
> >>>>>>>
> >>>>>>> ---------------------------------------------------------------------------------------------------
> >>>>>>> Confidentiality Notice: The information contained in this e- 
> >>>>>>> mail and any accompanying attachment(s)
> >>>>>>> is intended only for the use of the intended recipient and may  
> >>>>>>> be confidential and/or privileged of
> >>>>>>> Neusoft Corporation, its subsidiaries and/or its affiliates.  
> >>>>>>> If any reader of this communication is
> >>>>>>> not the intended recipient, unauthorized use, forwarding,  
> >>>>>>> printing,  storing, disclosure or copying
> >>>>>>> is strictly prohibited, and may be unlawful.If you have  
> >>>>>>> received this communication in error,please
> >>>>>>> immediately notify the sender by return e-mail, and delete the  
> >>>>>>> original message and all copies from
> >>>>>>> your system. Thank you.
> >>>>>>> ---------------------------------------------------------------------------------------------------
> >>>>>
> >>>>> ---------------------------------------------------------------------------------------------------
> >>>>> Confidentiality Notice: The information contained in this e-mail  
> >>>>> and any accompanying attachment(s)
> >>>>> is intended only for the use of the intended recipient and may  
> >>>>> be confidential and/or privileged of
> >>>>> Neusoft Corporation, its subsidiaries and/or its affiliates. If  
> >>>>> any reader of this communication is
> >>>>> not the intended recipient, unauthorized use, forwarding,  
> >>>>> printing,  storing, disclosure or copying
> >>>>> is strictly prohibited, and may be unlawful.If you have received  
> >>>>> this communication in error,please
> >>>>> immediately notify the sender by return e-mail, and delete the  
> >>>>> original message and all copies from
> >>>>> your system. Thank you.
> >>>>> ---------------------------------------------------------------------------------------------------
> >>>>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------------------------------------
> >>> Confidentiality Notice: The information contained in this e-mail  
> >>> and any accompanying attachment(s)
> >>> is intended only for the use of the intended recipient and may be  
> >>> confidential and/or privileged of
> >>> Neusoft Corporation, its subsidiaries and/or its affiliates. If  
> >>> any reader of this communication is
> >>> not the intended recipient, unauthorized use, forwarding,  
> >>> printing,  storing, disclosure or copying
> >>> is strictly prohibited, and may be unlawful.If you have received  
> >>> this communication in error,please
> >>> immediately notify the sender by return e-mail, and delete the  
> >>> original message and all copies from
> >>> your system. Thank you.
> >>> ---------------------------------------------------------------------------------------------------
> >>
> >> You are sending this to a public mailing list.  Do you know that?
> >> Please do not attach such text to your messages.
> >
> > ---------------------------------------------------------------------------------------------------
> > Confidentiality Notice: The information contained in this e-mail and  
> > any accompanying attachment(s)
> > is intended only for the use of the intended recipient and may be  
> > confidential and/or privileged of
> > Neusoft Corporation, its subsidiaries and/or its affiliates. If any  
> > reader of this communication is
> > not the intended recipient, unauthorized use, forwarding, printing,   
> > storing, disclosure or copying
> > is strictly prohibited, and may be unlawful.If you have received  
> > this communication in error,please
> > immediately notify the sender by return e-mail, and delete the  
> > original message and all copies from
> > your system. Thank you.
> > ---------------------------------------------------------------------------------------------------
> 

---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) 
is intended only for the use of the intended recipient and may be confidential and/or privileged of 
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is 
not the intended recipient, unauthorized use, forwarding, printing,  storing, disclosure or copying 
is strictly prohibited, and may be unlawful.If you have received this communication in error,please 
immediately notify the sender by return e-mail, and delete the original message and all copies from 
your system. Thank you. 
---------------------------------------------------------------------------------------------------
Mulyadi Santosa - Jan. 4, 2010, 7:43 a.m.
On Mon, Jan 4, 2010 at 8:06 AM, Dejun.Liu <liu-dj@neusoft.com> wrote:
> Hi
>
> yes, I hava find that OE build SDL not support x11 ,so hava the error
> No available video device.
>
> thanks all these helps

Glad you spot the error. Let us know how you solve it further. Or
maybe you'll be kind enough and post your howto to Qemu wiki.
Dejun.Liu - Jan. 4, 2010, 8:10 a.m.
Hi,
OE's Holger has patch OE with this problem

-------------------
> On Monday 04 January 2010 04:11:33 Dejun.Liu wrote:
> > -->I used the OE build Qemu which at the staging
> > dir(angstrom-dev/staging/i686-linux/usr/bin).
> > and i executed the command in the buildserver not using ssh
> 
> The good thing is, I was just trying the same and see the error you
see.
>  The error is printed by qemu when it can not use the SetVideoMode
call of
>  SDL.
> 
> I will land a fix in a second. What you want to change in
libsdl-native as
>  a quick solution is to add DEPENDS += "libx11-native" and change
>  --disable- video-x11" to --enable-video-x11".

I(Holger) have comitted two patches for it (one with a crappy username
though).
--------------------------
I will post it to Qemu wiki tomorrow.

Steven Liu


On Mon, 2010-01-04 at 14:43 +0700, Mulyadi Santosa wrote:
> On Mon, Jan 4, 2010 at 8:06 AM, Dejun.Liu <liu-dj@neusoft.com> wrote:
> > Hi
> >
> > yes, I hava find that OE build SDL not support x11 ,so hava the error
> > No available video device.
> >
> > thanks all these helps
> 
> Glad you spot the error. Let us know how you solve it further. Or
> maybe you'll be kind enough and post your howto to Qemu wiki.
> 

---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) 
is intended only for the use of the intended recipient and may be confidential and/or privileged of 
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is 
not the intended recipient, unauthorized use, forwarding, printing,  storing, disclosure or copying 
is strictly prohibited, and may be unlawful.If you have received this communication in error,please 
immediately notify the sender by return e-mail, and delete the original message and all copies from 
your system. Thank you. 
---------------------------------------------------------------------------------------------------
Mulyadi Santosa - Jan. 4, 2010, 8:17 a.m.
On Mon, Jan 4, 2010 at 3:10 PM, Dejun.Liu <liu-dj@neusoft.com> wrote:
>>
>> I will land a fix in a second. What you want to change in
> libsdl-native as
>>  a quick solution is to add DEPENDS += "libx11-native" and change
>>  --disable- video-x11" to --enable-video-x11".
>
> I(Holger) have comitted two patches for it (one with a crappy username
> though).
> --------------------------
> I will post it to Qemu wiki tomorrow.
>
> Steven Liu

Great! I believe lots of people will be thankful for that! :)

NB: I mean, Qemu forum, not qemu wiki. But anyway, at least you could
always just post the patch here (to this list).
Dejun.Liu - Jan. 4, 2010, 8:25 a.m.
Hi, 

I will do it tomorrow!
sorry for that ,today i prepare for a ppt for my boss.

sorry

Steven Liu

On Mon, 2010-01-04 at 15:17 +0700, Mulyadi Santosa wrote:
> On Mon, Jan 4, 2010 at 3:10 PM, Dejun.Liu <liu-dj@neusoft.com> wrote:
> >>
> >> I will land a fix in a second. What you want to change in
> > libsdl-native as
> >>  a quick solution is to add DEPENDS += "libx11-native" and change
> >>  --disable- video-x11" to --enable-video-x11".
> >
> > I(Holger) have comitted two patches for it (one with a crappy username
> > though).
> > --------------------------
> > I will post it to Qemu wiki tomorrow.
> >
> > Steven Liu
> 
> Great! I believe lots of people will be thankful for that! :)
> 
> NB: I mean, Qemu forum, not qemu wiki. But anyway, at least you could
> always just post the patch here (to this list).
> 

---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) 
is intended only for the use of the intended recipient and may be confidential and/or privileged of 
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is 
not the intended recipient, unauthorized use, forwarding, printing,  storing, disclosure or copying 
is strictly prohibited, and may be unlawful.If you have received this communication in error,please 
immediately notify the sender by return e-mail, and delete the original message and all copies from 
your system. Thank you. 
---------------------------------------------------------------------------------------------------

Patch

diff --git a/sdl.c b/sdl.c
index 034440f..8483bf9 100644
--- a/sdl.c
+++ b/sdl.c
@@ -850,6 +850,7 @@  void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)
     flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE;
     if (SDL_Init (flags)) {
         fprintf(stderr, "Could not initialize SDL - exiting\n");
+        fprintf(stderr, "SDL error: %s\n", SDL_GetError());
         exit(1);
     }
     vi = SDL_GetVideoInfo();