media-libs/svgalib-1.9.25 fails compilation with the recently released sys-kernel/gentoo-sources-2.6.26 Reproducible: Always Steps to Reproduce: 1. emerge =sys-kernel/gentoo-sources-2.6.26 2. emerge =media-libs/svgalib-1.9.25 Actual Results: Compilation fails with: CC [M] /var/tmp/portage/media-libs/svgalib-1.9.25/work/svgalib-1.9.25/kernel/svgalib_helper/interrupt.o /var/tmp/portage/media-libs/svgalib-1.9.25/work/svgalib-1.9.25/kernel/svgalib_helper/main.c: In function ‘svgalib_helper_ioctl’: /var/tmp/portage/media-libs/svgalib-1.9.25/work/svgalib-1.9.25/kernel/svgalib_helper/main.c:367: warning: ignoring return value of ‘request_irq’, declared with attribute warn_unused_result /var/tmp/portage/media-libs/svgalib-1.9.25/work/svgalib-1.9.25/kernel/svgalib_helper/main.c: In function ‘svgalib_helper_open’: /var/tmp/portage/media-libs/svgalib-1.9.25/work/svgalib-1.9.25/kernel/svgalib_helper/main.c:455: warning: ignoring return value of ‘request_irq’, declared with attribute warn_unused_result /var/tmp/portage/media-libs/svgalib-1.9.25/work/svgalib-1.9.25/kernel/svgalib_helper/main.c: In function ‘init_module’: /var/tmp/portage/media-libs/svgalib-1.9.25/work/svgalib-1.9.25/kernel/svgalib_helper/main.c:660: error: implicit declaration of function ‘class_device_create’ make[2]: *** [/var/tmp/portage/media-libs/svgalib-1.9.25/work/svgalib-1.9.25/kernel/svgalib_helper/main.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [_module_/var/tmp/portage/media-libs/svgalib-1.9.25/work/svgalib-1.9.25/kernel/svgalib_helper] Error 2 make[1]: Leaving directory `/usr/src/linux-2.6.26-gentoo' make: *** [default] Error 2 Expected Results: svgalib should compile fine :) $ emerge --info Portage 2.2_rc1 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r6 i686) ================================================================= System uname: Linux-2.6.25-gentoo-r6-i686-Intel-R-_Pentium-R-_M_processor_1.60GHz-with-glibc2.0 Timestamp of tree: Thu, 17 Jul 2008 16:46:01 +0000 ccache version 2.4 [disabled] app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.6 dev-lang/python: 2.4.4-r13, 2.5.2-r5 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.2.5 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r2 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.25-r4 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="candy distlocks fixpackages parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="ftp://ftp.unina.it/pub/linux/distributions/gentoo http://mirror.ovh.net/gentoo-distfiles/" LANG="it_IT.UTF-8" LC_ALL="it_IT.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="it en" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/gnome /usr/portage/local/layman/java-overlay /usr/portage/local/layman/science /usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X a52 aac aalib acpi alsa amr apache2 avi bash-completion bitmap-fonts bluetooth branding bzip2 cairo cddb cdparanoia cdr cli cracklib crypt ctype cups dbus djvu dri dvd dvdr dvdread dvi emacs encode esd exif fbcon ffmpeg flac fortran ftp gd gdbm gif gimp gimpprint gnome gnome-print gnutls gpm gstreamer gtk gtk2 gtkhtml hal hddtemp iconv ipv6 java javascript jce jikes jpeg libnotify libsamplerate logrotate mad midi mikmod mmx mmxext mng mp3 mpeg msn mudflap mysql mysqli nautilus ncurses nls nodrm nptl nptlonly nsplugin offensive ogg opengl openmp oss pam pch pcre pdf perl php png ppds python quicktime readline real samba sdl session slang sockets socks5 spell spl sse sse2 ssl startup-notification subversion svg symlink syslog tcpd theora threads tiff tokenizer truetype unicode usb v4l v4l2 vcd vorbis wifi win32codecs wmf wxwindows x86 xml xorg xulrunner xv xvid xvmc zip zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers imagemap include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it en" USERLAND="GNU" VIDEO_CARDS="i810 vesa fbdev" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
I assume you also configured and built that kernel... Your steps to reproduce omit that information.
Yes, I have built the kernel before trying to reinstall svgalib. I forgot to explicitly write it, sorry about that.
Created attachment 160864 [details] my emerge-info and kernel config
Exactly the same problem here. I have created an attachment with my emerge --info and kernel config (http://bugs.gentoo.org/attachment.cgi?id=160864)
This has been removed from 2.6.26 kernel sources in file drivers/base/class.c 692 struct class_device *class_device_create(struct class *cls, 693 struct class_device *parent, 694 dev_t devt, 695 struct device *device, 696 const char *fmt, ...) and it's referenced in file kernel/svgalib_helper/kernel26compat.h 98 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) 99 # define SLH_SYSFS_ADD_CONTROL \ 100 class_device_create(svgalib_helper_class, \ 101 MKDEV(SVGALIB_HELPER_MAJOR, 0), \ 102 NULL, "svga"); 103 104 # define SLH_SYSFS_ADD_DEVICE(_name, _minor) \ 105 class_device_create(svgalib_helper_class, \ 106 MKDEV(SVGALIB_HELPER_MAJOR, _minor), \ 107 &sh_pci_devs[_minor]->dev->dev, _name); 108 #else /* 2.6.15 changed class_device_create */ 109 # define SLH_SYSFS_ADD_CONTROL \ 110 class_device_create(svgalib_helper_class, NULL, \ 111 MKDEV(SVGALIB_HELPER_MAJOR, 0), \ 112 NULL, "svga"); 113 114 # define SLH_SYSFS_ADD_DEVICE(_name, _minor) \ 115 class_device_create(svgalib_helper_class, NULL, \ 116 MKDEV(SVGALIB_HELPER_MAJOR, _minor), \ 117 &sh_pci_devs[_minor]->dev->dev, _name); 118 #endif /* 2.6.15 */
Created attachment 161385 [details, diff] change to kernel26compat.h class_device_create has been removed in version 2.6.26 use device_create instead
(In reply to comment #6) Patch worked for me. Excellent! Thank you for your help.
(In reply to comment #6) The same here, error has gone. Thank you!
The provided patch fixes compilation here too, thanks. Anyway, I've not tested the library yet.
(In reply to comment #6) After further tests the patch only lets it compile, not work correctly. Although a few of the programs that depend on it to build still seem to work correctly.
(In reply to comment #10) > After further tests the patch only lets it compile, not work correctly. Can you please give some detail regarding the failure to work properly.
(In reply to comment #11) trying to load the kernel modules svgalib_helper results in a seg fault
Created attachment 161475 [details, diff] updated patch to kernel26compat.h This patch allows the kernel module svgalib_helper to load.
(In reply to comment #13) Patch works svgalib_helper modprobes ok. Once again thank you.
can you push into the official portage?
Created attachment 162378 [details] My emerge --info and kernel config Works for me as well (vanilla-sources-2.6.26.1, Pentium-M and i810)
added to the tree, thanks