SDL: I couldn't initialize SDL: No available video device

0

Ostatnio zaczęłem się bawić z biblioteką SDL. I tu pojnawiają mnie się notorycznie problemy.

Instaluję ją typowo:

./configure
make
sudo make install

I przez pewien czas pasi, wszystko gra.

Lecz po pewnym czasie wyświetla się:

[email protected]:/media/DATA/tomasz/Dokumenty/sdl$ ./SDL1
I couldn't initialize SDL: No available video device
I to nie jest wina złego kodu, tylko SDL w ogóle (słyszałem, że nie używa X-ów).

Tak samo teraz glest i wormux, dosbox nie działa z powodu SDL (ten sam komunikat)

Dziwi mnie tylko fakt, że na początku działa przez pewien czas, a potem już nie. (To zdarzyło się mnie już 2. raz. Za pierwszym razem myślałem, że coś usunęłem. Wszystkie zależności glesta albo przeinstalowałem albo doinstalowałem. Nic to nie dało więc przeinstalowałem linuxa.)

Co może być przyczyną tego dziwnego zachowania się SDL?

P.S. od razu mówię, że nie używałem kont'a root oprócz instalacji glesta, wormuxa i tyle

0
Xgrzyb90 napisał(a)

Co może być przyczyną tego dziwnego zachowania się SDL?

Z tych informacji co podales jasno wynika, ze sdl nie ma dostepu do karty graficznej, czyli nic nie moze zrobic. Linuksy maja to do siebie, ze w wiekszosci przypadkow daja trafne i jasne komunikaty o bledach.
Zajrzyj do logow X'ow (Xorg pliki sie nazywaja) oraz do dmesg po wiecej informacji.
Natomiast mi sie wydaje, ze sterownikow mogles nie wgrac do karty graficznej, ale to tylko wniosek na podstawie komunikatu, ktory przedstawiles.
Pamietam, ze cos tez mialem kiedys z tym SDL'em, ale nie moge sobie przypomniec co konkretnie to bylo, w kazdym razie chodzilo o prawa do jakiegos pliku. Tak jak mowie nie pamietem dokladnie do jakiego.

Wrzuc logi z tych plikow co Ci podalem oraz napisz jakie distro oraz czy stery masz wgrane do karty graficznej poprawnie.

0

Mam Ubuntu 9.10, wersję SDL SDL-1.2.14
www.wit.edu.pl/~polgrabi/dane.tar.gz
Mam własnościowe sterowniki Nvidii version 185

0

Strzelam: przed kompilacją zainstaluj pakiety .dev do xorga i X11 i zobacz czy configure wykryl w ogole ze masz x-y.

0

Wykrywa:

checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define EXTENSIONS... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether byte ordering is bigendian... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking for windres... no
checking for linux-gnu-windres... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for working volatile... yes
checking for ANSI C header files... (cached) yes
checking for sys/types.h... (cached) yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for stdlib.h... (cached) yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for memory.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for size_t... yes
checking for int64_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for working memcmp... yes
checking for working strtod... yes
checking for mprotect... yes
checking for malloc... yes
checking for calloc... yes
checking for realloc... yes
checking for free... yes
checking for getenv... yes
checking for putenv... yes
checking for unsetenv... yes
checking for qsort... yes
checking for abs... yes
checking for bcopy... yes
checking for memset... yes
checking for memcpy... yes
checking for memmove... yes
checking for strlen... yes
checking for strlcpy... no
checking for strlcat... no
checking for strdup... yes
checking for _strrev... no
checking for _strupr... no
checking for _strlwr... no
checking for strchr... yes
checking for strrchr... yes
checking for strstr... yes
checking for itoa... no
checking for _ltoa... no
checking for _uitoa... no
checking for _ultoa... no
checking for strtol... yes
checking for strtoul... yes
checking for _i64toa... no
checking for _ui64toa... no
checking for strtoll... yes
checking for strtoull... yes
checking for atoi... yes
checking for atof... yes
checking for strcmp... yes
checking for strncmp... yes
checking for _stricmp... no
checking for strcasecmp... yes
checking for _strnicmp... no
checking for strncasecmp... yes
checking for sscanf... yes
checking for snprintf... yes
checking for vsnprintf... yes
checking for iconv... yes
checking for sigaction... yes
checking for setjmp... yes
checking for nanosleep... yes
checking for libiconv_open in -liconv... no
checking for pow in -lm... yes
checking for GCC -fvisibility=hidden option... yes
checking for dlopen... yes
checking for dlopen in -lc... no
checking for dlopen in -ldl... yes
checking size of void *... 4
checking for yasm... no
checking to see if supports unquoted-sections... no
checking for nasm... /usr/bin/nasm
checking to see if /usr/bin/nasm supports symbol-visibility... yes
checking for Altivec with GCC altivec.h and -maltivec option... no
checking for Altivec with GCC -maltivec option... no
checking for Altivec with GCC altivec.h and -faltivec option... no
checking for Altivec with GCC -faltivec option... no
checking for OSS audio support... yes
checking for dmedia audio support... no
checking for ALSA CFLAGS...
checking for ALSA LDFLAGS... -lasound -lm -ldl -lpthread
checking for libasound headers version >= 0.9.0... found.
checking for snd_ctl_open in -lasound... yes
-- dynamic libasound -> libasound.so.2
checking for artsc-config... no
checking for esd-config... /usr/bin/esd-config
checking for ESD - version >= 0.2.8... yes
-- dynamic libesd -> libesd.so.0
checking for pkg-config... /usr/bin/pkg-config
checking for PulseAudio 0.9 support... no
checking audio/audiolib.h usability... yes
checking audio/audiolib.h presence... yes
checking for audio/audiolib.h... yes
checking for AuOpenServer in -laudio... yes
checking for NAS audio support... yes
-- dynamic libaudio -> libaudio.so.2
checking for X... libraries , headers
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
-- dynamic libX11 -> libX11.so.6
-- dynamic libX11ext -> libXext.so.6
checking for X11/extensions/Xrandr.h... no
checking for framebuffer console support... yes
checking for getpagesize... yes
checking for directfb-config... /usr/bin/directfb-config
checking directfb.h usability... yes
checking directfb.h presence... no
checking for directfb.h... yes
checking for DirectFB 0.9.15 support... yes
checking for PlayStation 2 GS support... no
checking for PlayStation 3 Cell support... no
checking for SVGAlib (1.4.0+) support... no
checking for libVGL support... no
checking for wscons support... no
checking for OpenGL (GLX) support... yes
checking for Linux 2.4 unified input interface... yes
checking for Touchscreen library support... no
checking for hid_init in -lusbhid... no
checking usb.h usability... no
checking usb.h presence... no
checking for usb.h... no
checking libusb.h usability... no
checking libusb.h presence... no
checking for libusb.h... no
checking for hid_init in -lusb... no
checking for usbhid... no
checking for pthreads... yes
checking for recursive mutexes... yes
checking for pthread semaphores... yes
checking linux/version.h usability... yes
checking linux/version.h presence... yes
checking for linux/version.h... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sdl-config
config.status: creating SDL.spec
config.status: creating SDL.qpg
config.status: creating sdl.pc
config.status: creating include/SDL_config.h
config.status: executing libtool commands
config.status: executing default commands
Generating dependencies for ./src/SDL.c
Generating dependencies for ./src/SDL_error.c
Generating dependencies for ./src/SDL_fatal.c
Generating dependencies for ./src/audio/SDL_audio.c
Generating dependencies for ./src/audio/SDL_audiocvt.c
Generating dependencies for ./src/audio/SDL_audiodev.c
Generating dependencies for ./src/audio/SDL_mixer.c
Generating dependencies for ./src/audio/SDL_mixer_MMX.c
Generating dependencies for ./src/audio/SDL_mixer_MMX_VC.c
Generating dependencies for ./src/audio/SDL_mixer_m68k.c
Generating dependencies for ./src/audio/SDL_wave.c
Generating dependencies for ./src/cdrom/SDL_cdrom.c
Generating dependencies for ./src/cpuinfo/SDL_cpuinfo.c
Generating dependencies for ./src/events/SDL_active.c
Generating dependencies for ./src/events/SDL_events.c
Generating dependencies for ./src/events/SDL_expose.c
Generating dependencies for ./src/events/SDL_keyboard.c
Generating dependencies for ./src/events/SDL_mouse.c
Generating dependencies for ./src/events/SDL_quit.c
Generating dependencies for ./src/events/SDL_resize.c
Generating dependencies for ./src/file/SDL_rwops.c
Generating dependencies for ./src/stdlib/SDL_getenv.c
Generating dependencies for ./src/stdlib/SDL_iconv.c
Generating dependencies for ./src/stdlib/SDL_malloc.c
Generating dependencies for ./src/stdlib/SDL_qsort.c
Generating dependencies for ./src/stdlib/SDL_stdlib.c
Generating dependencies for ./src/stdlib/SDL_string.c
Generating dependencies for ./src/thread/SDL_thread.c
Generating dependencies for ./src/timer/SDL_timer.c
Generating dependencies for ./src/video/SDL_RLEaccel.c
Generating dependencies for ./src/video/SDL_blit.c
Generating dependencies for ./src/video/SDL_blit_0.c
Generating dependencies for ./src/video/SDL_blit_1.c
Generating dependencies for ./src/video/SDL_blit_A.c
Generating dependencies for ./src/video/SDL_blit_N.c
Generating dependencies for ./src/video/SDL_bmp.c
Generating dependencies for ./src/video/SDL_cursor.c
Generating dependencies for ./src/video/SDL_gamma.c
Generating dependencies for ./src/video/SDL_pixels.c
Generating dependencies for ./src/video/SDL_stretch.c
Generating dependencies for ./src/video/SDL_surface.c
Generating dependencies for ./src/video/SDL_video.c
Generating dependencies for ./src/video/SDL_yuv.c
Generating dependencies for ./src/video/SDL_yuv_mmx.c
Generating dependencies for ./src/video/SDL_yuv_sw.c
Generating dependencies for ./src/joystick/SDL_joystick.c
Generating dependencies for ./src/video/dummy/SDL_nullevents.c
Generating dependencies for ./src/video/dummy/SDL_nullmouse.c
Generating dependencies for ./src/video/dummy/SDL_nullvideo.c
Generating dependencies for ./src/audio/disk/SDL_diskaudio.c
Generating dependencies for ./src/audio/dummy/SDL_dummyaudio.c
Generating dependencies for ./src/loadso/dlopen/SDL_sysloadso.c
Generating dependencies for ./src/hermes/mmx_main.asm
Generating dependencies for ./src/hermes/mmxp2_32.asm
Generating dependencies for ./src/hermes/x86_main.asm
Generating dependencies for ./src/hermes/x86p_16.asm
Generating dependencies for ./src/hermes/x86p_32.asm
Generating dependencies for ./src/audio/dsp/SDL_dspaudio.c
Generating dependencies for ./src/audio/dma/SDL_dmaaudio.c
Generating dependencies for ./src/audio/alsa/SDL_alsa_audio.c
Generating dependencies for ./src/audio/esd/SDL_esdaudio.c
Generating dependencies for ./src/audio/nas/SDL_nasaudio.c
Generating dependencies for ./src/video/x11/SDL_x11dga.c
Generating dependencies for ./src/video/x11/SDL_x11dyn.c
Generating dependencies for ./src/video/x11/SDL_x11events.c
Generating dependencies for ./src/video/x11/SDL_x11gamma.c
Generating dependencies for ./src/video/x11/SDL_x11gl.c
Generating dependencies for ./src/video/x11/SDL_x11image.c
Generating dependencies for ./src/video/x11/SDL_x11modes.c
Generating dependencies for ./src/video/x11/SDL_x11mouse.c
Generating dependencies for ./src/video/x11/SDL_x11video.c
Generating dependencies for ./src/video/x11/SDL_x11wm.c
Generating dependencies for ./src/video/x11/SDL_x11yuv.c
Generating dependencies for ./src/video/Xext/Xxf86dga/XF86DGA.c
Generating dependencies for ./src/video/Xext/Xxf86dga/XF86DGA2.c
Generating dependencies for ./src/video/dga/SDL_dgaevents.c
Generating dependencies for ./src/video/dga/SDL_dgamouse.c
Generating dependencies for ./src/video/dga/SDL_dgavideo.c
Generating dependencies for ./src/video/Xext/Xxf86vm/XF86VMode.c
Generating dependencies for ./src/video/Xext/Xv/Xv.c
Generating dependencies for ./src/video/Xext/Xinerama/Xinerama.c
Generating dependencies for ./src/video/Xext/XME/xme.c
Generating dependencies for ./src/video/fbcon/SDL_fb3dfx.c
Generating dependencies for ./src/video/fbcon/SDL_fbelo.c
Generating dependencies for ./src/video/fbcon/SDL_fbevents.c
Generating dependencies for ./src/video/fbcon/SDL_fbmatrox.c
Generating dependencies for ./src/video/fbcon/SDL_fbmouse.c
Generating dependencies for ./src/video/fbcon/SDL_fbriva.c
Generating dependencies for ./src/video/fbcon/SDL_fbvideo.c
Generating dependencies for ./src/video/directfb/SDL_DirectFB_events.c
Generating dependencies for ./src/video/directfb/SDL_DirectFB_video.c
Generating dependencies for ./src/video/directfb/SDL_DirectFB_yuv.c
Generating dependencies for ./src/thread/pthread/SDL_systhread.c
Generating dependencies for ./src/thread/pthread/SDL_syssem.c
Generating dependencies for ./src/thread/pthread/SDL_sysmutex.c
Generating dependencies for ./src/thread/pthread/SDL_syscond.c
Generating dependencies for ./src/joystick/linux/SDL_sysjoystick.c
Generating dependencies for ./src/cdrom/linux/SDL_syscdrom.c
Generating dependencies for ./src/timer/unix/SDL_systimer.c

A bez x-ów też by się skompilował?

0

Nie działa nadal

--EDIT--

Nie wiem, jaką to miało różnicę, ale jak wszystko zrobiłem na roocie to znowu zadziałało.

Poprzednio tylko make install uruchamiałem przez sudo

1 użytkowników online, w tym zalogowanych: 0, gości: 1, botów: 0