* Bug triggered by change from linux-headers-2.6.8.1-r4 to linux-headers-2.6.11-r2 in /usr/include/linux/keyboard.h (see keyboard.h.diff below) * Version in which libs bug apears: libsdl-1.2.9-r1, libsdl-1.2.8-r1, probably all older too * Symptoms: not detecting framebuffer console support and not compiling all modules for it in final libSDL and then later trying to use framebuffer via compiled in libggi support (what you get is grayscale verticaly interlaced and verticaly shrinked image, apps segfault and messup keymap on exit - then you cant change console and most keys dont work - only way to get rid that insane-console is init 6 via ssh). (see config.log.diff below) NOTE: found on amd64 but i belive it applies to 32bit too, appling keyboad.h.diff fixes it Reproducible: Always Steps to Reproduce: * How to repeat: Compile sdl on linux-headers-2.6.11-r2 with ggi and fbcon support, then start any sdl app which runs on console framebuffer (i used VirtualGameboyAdvance - applies to other sdl apps too) Actual Results: what you get on sdl apps (when it uses fb via libggi) is grayscale verticaly interlaced and verticaly shrinked image, apps segfault and messup keymap on exit - then you cant change console and most keys dont work - only way to get rid that insane-post_sdl-console is init 6 via ssh Expected Results: none of above -_- As it brakes all console (non-X) sdl apps ########################################################################################## #/usr/include/linux/keyboard.h.diff: (linux-headers-2.6.11-r2 vs linux-headers-2.6.8.1-r4) ########################################################################################### --- keyboard.h 2005-10-06 01:58:47.000000000 +0200 +++ keyboard.h.old 2005-06-13 05:04:28.000000000 +0200 @@ -1,16 +1,6 @@ #ifndef __LINUX_KEYBOARD_H #define __LINUX_KEYBOARD_H -#ifndef __le64 -#ifdef _LINUX_TYPES_H -#undef _LINUX_TYPES_H -#warning Gentoo Linux Headers Warning: GNU Libc Linux Headers Override Detected. -#warning Gentoo Linux Headers Warning: This is bad. Removing override and continuing. -#warning Gentoo Linux Headers Warning: If your compilation dies here, mention this when -#warning Gentoo Linux Headers Warning: filing a bug! -#include <linux/types.h> -#endif -#endif #include <linux/wait.h> #define KG_SHIFT 0 ########################################################################################## ########################################################################################### #<...>/work/SDL-1.2.8/config.log.diff: (compiling with patched keyboard.h vs unpatched one) ########################################################################################### --- config.log 2005-10-08 19:14:45.041369008 +0200 +++ /dev/shm/1/SDL-1.2.8.bad/config.log 2005-10-08 19:12:45.596527384 +0200 @@ -1008,15 +1008,59 @@ configure:25120: result: yes configure:25218: checking for framebuffer console support configure:25242: gcc -c -g -O2 -Wall -DENABLE_DUMMYVIDEO -DDISKAUD_SUPPORT -DUSE_DLOPEN -DALSA_SUPPORT -DALSA_DYNAMIC=$(alsa_lib) -DUSE_DLVSYM -DENABLE_X11 -DXTHREADS -I./include -I./src/video -DXFREE86_VM -DXFREE86_VMGAMMA -DXFREE86_DGAMOUSE -DDEFAULT_DGAMOUSE -DXFREE86_XV -DHAVE_XINERAMA -Isrc/video -DENABLE_DGA conftest.c >&5 -configure:25248: $? = 0 -configure:25252: test -z - || test ! -s conftest.err -configure:25255: $? = 0 -configure:25258: test -s conftest.o -configure:25261: $? = 0 -configure:25272: result: yes +In file included from conftest.c:31: +/usr/include/linux/keyboard.h:7:2: warning: #warning Gentoo Linux Headers Warning: GNU Libc Linux Headers Override Detected. +/usr/include/linux/keyboard.h:8:2: warning: #warning Gentoo Linux Headers Warning: This is bad. Removing override and continuing. +/usr/include/linux/keyboard.h:9:2: warning: #warning Gentoo Linux Headers Warning: If your compilation dies here, mention this when +/usr/include/linux/keyboard.h:10:2: warning: #warning Gentoo Linux Headers Warning: filing a bug! +In file included from /usr/include/linux/keyboard.h:11, + from conftest.c:31: +/usr/include/linux/types.h:183: error: redefinition of `struct ustat' +configure:25248: $? = 1 +configure: failed program was: +| /* confdefs.h. */ +| +| #define PACKAGE_NAME "" +| #define PACKAGE_TARNAME "" +| #define PACKAGE_VERSION "" +| #define PACKAGE_STRING "" +| #define PACKAGE_BUGREPORT "" +| #define PACKAGE "SDL" +| #define VERSION "1.2.8" +| #define STDC_HEADERS 1 +| #define HAVE_SYS_TYPES_H 1 +| #define HAVE_SYS_STAT_H 1 +| #define HAVE_STDLIB_H 1 +| #define HAVE_STRING_H 1 +| #define HAVE_MEMORY_H 1 +| #define HAVE_STRINGS_H 1 +| #define HAVE_INTTYPES_H 1 +| #define HAVE_STDINT_H 1 +| #define HAVE_UNISTD_H 1 +| #define HAVE_DLFCN_H 1 +| #ifdef __cplusplus +| extern "C" void std::exit (int) throw (); using std::exit; +| #endif +| #define HAVE_ALLOCA_H 1 +| #define HAVE_ALLOCA 1 +| #define HAVE_LIBASOUND 1 +| /* end confdefs.h. */ +| +| #include <linux/fb.h> +| #include <linux/kd.h> +| #include <linux/keyboard.h> +| +| int +| main () +| { +| +| +| ; +| return 0; +| } +configure:25272: result: no ###########################################################################################
let's have the output from "emerge --info" please.
nexus ~ # emerge --info Portage 2.0.51.22-r3 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r1, 2.6.12-gentoo-r10 x86_64) ================================================================= System uname: 2.6.12-gentoo-r10 x86_64 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5-r2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -pipe -fomit-frame-pointer -O2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon64 -pipe -fomit-frame-pointer -O2" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 7zip X a52 aac aalib acl alsa ares avi berkdb bidi bitmap-fonts bl browserplugin bzip2 cdparanoia cdr chroot crypt cups curl dga dts dv dvd dvdr edl eds emboss encode erandom escreen esd etwin fbcon flac foomaticdb fortran gdbm ggi gif gimpprint gpm gstreamer gtk gtk2 imagemagick imlib ipv6 ithreads java javascript jpeg lcms ldap libcaca libclamav lirc live lm_sensors lzo lzw lzw-tiff mad matroska mikmod mng mozcalendar mozilla mozsvg mp3 mpeg ncurses nls nptl nsplugin nvidia ogg oggvorbis opengl oss pam pcre pdflib perl png python quicktime readline real rtc samba sdl slang sndfile socks5 spell ssl svg tcltk tcpd tga theora tiff truetype truetype-fonts type1-fonts unicode usb userlocales v4l v4l2 vorbis winbind wmf xanim xinerama xml2 xmms xpm xv xvid xvmc zlib zvbi userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Oh yea and thing i forgot to paste: Error messages when sdl app tryies to use fb via libggi on badly compiled libsdl: display-fbdev: ioctl(VT_GETSTATE) failed: Invalid argument display-fbdev: ioctl(VT_GETSTATE) failed: Invalid argument LibGG: unable to open lib: /usr/lib64/ggi/default/fbdev/kgi/genkgi.so: cannot open shared object file: No such file or directory GGI_SetVideoMode() LibGG: unable to open lib: /usr/lib64/ggi/default/fbdev/kgi/genkgi.so: cannot open shared object file: No such file or directory Missing objects from badly compiled libsdl (vs normaly compiled one): SDL_fb3dfx.o SDL_fbelo.o SDL_fbevents.o SDL_fbmatrox.o SDL_fbmouse.o SDL_fbriva.o SDL_fbvideo.o
Ok, cause no one wants to do anything with this here's patch (bellow) to libsdl to workaround linux-headers thing, it allows to configure and compile with fb support. Other thing needed to get fixed is libggi behavior without fb and rechecking linux-headers as in my opinion linux/keyboard.h shouldnt reincude linux/types.h --- configure.orig 2004-12-13 10:04:51.000000000 +0100 +++ configure 2005-10-11 18:06:51.000000000 +0200 @@ -25186,9 +25186,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include <linux/keyboard.h> #include <linux/fb.h> #include <linux/kd.h> - #include <linux/keyboard.h> int main () --- configure.in.orig 2004-12-13 10:02:08.000000000 +0100 +++ configure.in 2005-10-11 18:06:43.000000000 +0200 @@ -808,9 +808,9 @@ AC_MSG_CHECKING(for framebuffer console support) video_fbcon=no AC_TRY_COMPILE([ + #include <linux/keyboard.h> #include <linux/fb.h> #include <linux/kd.h> - #include <linux/keyboard.h> ],[ ],[ video_fbcon=yes
Created attachment 72167 [details, diff] Patch (please test on HPPA)
Well, the actual problem with this is #89387 on HPPA - glibc plays naughty and defines LINUX_ tokens when it shouldn't do, and upstream refuses to change this behaviour last time I looked -- however, I think eradicator has now fixed this locally in glibc 2.3.5 (looking at the patchset) but HPPA has 2.3.5 as -hppa in KEYWORDS so I can't just remove the code altogether. Mike or somebody else from the HPPA team, can you please try the attached patch and see if Xorg still compiles? Thanks.
Fixed in 2.6.11-r3, thanks!