Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 247671 - x11-drivers/ati-drivers-8.552-r2 fails to emerge on amd64 using sys-kernel/gentoo-sources-2.6.27-r2
Summary: x11-drivers/ati-drivers-8.552-r2 fails to emerge on amd64 using sys-kernel/ge...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Luca Barbato
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-20 09:10 UTC by Dominik Kozaczko
Modified: 2009-04-25 02:17 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log to prove that it compiles after including <linux/errno.h> in <linux/sysrq.h> (build.log,8.16 KB, text/plain)
2008-11-21 01:18 UTC, Matteo Modesti
Details
My "patch" to fix <linux/sysrq.h> in gentoo-sources (include_errnoH_in_sysrqH.patch,270 bytes, patch)
2008-11-21 01:25 UTC, Matteo Modesti
Details | Diff
config-2.6.27-gentoo-r3 (config-2.6.27-gentoo-r3,36.83 KB, text/plain)
2008-11-21 06:08 UTC, Nikos Chantziaras
Details
config-2.6.26-gentoo-r3 (config-2.6.26-gentoo-r3,35.48 KB, text/plain)
2008-11-21 06:09 UTC, Nikos Chantziaras
Details
MAGIC SYSRQ patch for when USE=-debug (sysrq-patch,2.07 KB, patch)
2008-11-23 12:38 UTC, C.P. Banks
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Kozaczko 2008-11-20 09:10:09 UTC
I tried to update ati-drivers.
This is the log:

>>> Compiling source in /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work ...
 * Preparing fglrx module
make -j5 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= GCC_VER_MAJ=4 KVER=2.6.27-gentoo-r2 KDIR=/usr/src/linux kmod_build
make -C /usr/src/linux M=/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Wejście do katalogu `/usr/src/linux-2.6.27-gentoo-r2'
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.o
In file included from /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.c:35:
include/linux/sysrq.h: In function ‘__reterr’:
include/linux/sysrq.h:66: error: ‘EINVAL’ undeclared (first use in this function)
include/linux/sysrq.h:66: error: (Each undeclared identifier is reported only once
include/linux/sysrq.h:66: error: for each function it appears in.)
make[2]: *** [/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.o] Błąd 1
make[2]: *** Oczekiwanie na niezakończone zadania....
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘__ke_vm_phys_addr_str’:
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3206: warning: return makes pointer from integer without a cast
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3207: warning: return makes pointer from integer without a cast
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3208: warning: return makes pointer from integer without a cast
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3210: warning: return makes pointer from integer without a cast
make[1]: *** [_module_/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x] Błąd 2
make[1]: Opuszczenie katalogu `/usr/src/linux-2.6.27-gentoo-r2'
make: *** [kmod_build] Błąd 2
 * 
 * ERROR: x11-drivers/ati-drivers-8.552-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3285:  Called linux-mod_src_compile
 *             environment, line 2493:  Called die
 * The specific snippet of code:
 *               eval "emake HOSTCC="$(tc-getBUILD_CC)" 			CROSS_COMPILE=${CHOST}- 						LDFLAGS="$(get_abi_LDFLAGS)" 						${BUILD_FIXES} 		${BUILD_PARAMS} 						${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";
 *  The die message:
 *   Unable to emake HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS=  GCC_VER_MAJ=4 KVER=2.6.27-gentoo-r2 KDIR=/usr/src/linux kmod_build
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/temp/environment'.
 * 


Reproducible: Always

Steps to Reproduce:




# emerge --info
WARNING: repository at /usr/local/portage is missing a repo_name entry
Portage 2.2_rc14 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.7-r2, 2.6.27-gentoo-r2 x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r2-x86_64-AMD_Phenom-tm-_9650_Quad-Core_Processor-with-glibc2.2.5
Timestamp of tree: Thu, 20 Nov 2008 08:30:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.4.6-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0-r1
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-r1
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.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -msse3 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb /var/spool/torque"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=k8 -msse3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="pl_PL.UTF-8"
LC_ALL="pl_PL.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="pl en"
MAKEOPTS="-j5"
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/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X acl acpi alsa amd64 berkdb bzip2 cli cracklib crypt cups dbus dri flac fortran gdbm gif gpm gtk hal iconv ipv6 isdnlog java jpeg jpeg2k midi mmx mudflap multilib ncurses nls nptl nptlonly opengl openmp pam pcre perl png pppd python readline reflection session smp spl sse sse2 sse3 ssl startup-notification sysfs tcpd threads unicode vorbis xinerama xorg xprint zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers 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 joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl en" USERLAND="GNU" VIDEO_CARDS="radeon fglrx vesa mach64"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Ognjan Kirilov Iordanov 2008-11-20 13:18:58 UTC
The same problem on: 
emerge --info             
Portage 2.2_rc14 (default-linux/x86/2007.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.26-thinkpad-r1 i686)
=================================================================                                              
System uname: Linux-2.6.26-thinkpad-r1-i686-Intel-R-_Pentium-R-_M_processor_2.00GHz-with-glibc2.0              
Timestamp of tree: Thu, 20 Nov 2008 11:45:01 +0000                                                             
distcc 3.0 i686-pc-linux-gnu [disabled]                                                                        
app-shells/bash:     3.2_p39                                                                                   
dev-java/java-config: 1.3.7, 2.1.6-r1                                                                          
dev-lang/python:     2.4.4-r4, 2.5.2-r8                                                                        
dev-python/pycrypto: 2.0.1-r6                                                                                  
dev-util/cmake:      2.6.2                                                                                     
sys-apps/baselayout: 2.0.0                                                                                     
sys-apps/openrc:     0.3.0-r1                                                                                  
sys-apps/sandbox:    1.2.18.1-r3                                                                               
sys-devel/autoconf:  2.13, 2.63                                                                                
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1                               
sys-devel/binutils:  2.19                                                                                      
sys-devel/gcc-config: 1.4.0-r4                                                                                 
sys-devel/libtool:   2.2.6a                                                                                    
virtual/os-headers:  2.6.27-r2                                                                                 
ACCEPT_KEYWORDS="x86 ~x86"                                                                                     
CBUILD="i686-pc-linux-gnu"                                                                                     
CFLAGS="-O2 -march=pentium-m -fomit-frame-pointer -pipe"                                                       
CHOST="i686-pc-linux-gnu"                                                                                      
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /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="-O2 -march=pentium-m -fomit-frame-pointer -pipe"                                                                       
DISTDIR="/usr/portage/distfiles"                                                                                                 
FEATURES="distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"                 
GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ "                                                          
LANG="de_DE.utf8@euro"                                                                                                           
LC_ALL="de_DE.utf8@euro"                                                                                                         
LDFLAGS=""                                                                                                                       
LINGUAS="de"
MAKEOPTS="-j5"
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/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync1.de.gentoo.org/gentoo-portage"
USE="16bittmp X X509 a52 aac aalib acl acpi alsa apache2 bash-completion bluetooth bzip2 cairo cardbus cdda cdparanoia cdr chipcard chipcard2 cli cracklib crypt css ctype cups curl dba dbus dbx deprecated dga directfb discouraged divx dri dts dvb dvd dvdr dvdread eds emacs encode esd ethereal evo fam fat fbcon ffmpeg firefox flac fortran ftp gd gdbm gif glut glx gphoto2 gpm gps gstreamer gtk hal hbci hdaps httpd icc iconv icq ipv6 isdnlog jabber java javascript john jpeg junit kde kerberos laptop ldap live madmadwifi midi mikmod mime mjpeg mmx mmxext mono mozdevelop mozsvg mp3 mpeg mplayer mudflap mysql ncurses nls no-seamonkey nodoc nosrc nowin nptlonly nsplugin ntfs ogg openct opengl openmp openvpn pam pcmcia pcre pcsc-lite pda pdf perl php piix_hotplug png postgres ppds pppd python qt-static qt3 qt3support qt4 quicktime readline reflection regex reiser4 reiserfs samba sdl session shoutsmartcard spell spl sse sse2 ssl stream svg svga swat tcltk tcpd tetex threads tidy tiff truetype type1 unicode usb v4l v4l2 vcdvorbis wifi win32codecs wxwindows x86 xcomposite xfs xinerama xml xorg xosd xprint xrandr xulrunner xv xvid" ALSA_CARDS="ali5451als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1         emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m        maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul 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 ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt intel        mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage      siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware  voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Matteo Modesti 2008-11-20 17:14:13 UTC
Same problem for me, with both 2.6.26-r2 and 2.6.27-r2.

I found out that the problem isn't from fglrx itself but from these files:
/usr/src/linux-2.6.26-gentoo-r2/include/linux/sysrq.h
/usr/src/linux-2.6.27-gentoo-r2/include/linux/sysrq.h
/usr/src/linux-2.6.27-gentoo-r3/include/linux/sysrq.h

The problem is that sysrq.h uses EINVAL without including <linux/errno.h>

So the best thing to do would be fixing that header file in the gentoo-sources packages, adding a simple   #include <linux/errno.h>   at the beginning of sysrq.h.

At the same time, a simple   #include <linux/errno.h>   in kcl_debug.c lets ati-drivers compile, so I think it'd be good to add it too.


P.S.: change Summary to:
x11-drivers/ati-drivers-8.552-r2 fails to emerge due to missing #include <linux/errno.h> in <linux/sysrq.h>
Comment 3 Andreas Piening 2008-11-20 23:51:46 UTC
Hi Matteo,

I tried what you discribed, but without luck. To track down if I've done a mistake or missed something, I'll write down step by step what I did:
1.) emerged, configured (with "kernel hacking/export unused symbols" enabled, I red this is neccessary), compiled and bootet into gentoo-sources-2.6.27-r3. I am on amd64.
2.) edited "/usr/src/linux-2.6.27-gentoo-r3/include/linux/sysrq.h" and added "#include <linux/errno.h>" just before the first "#ifndef" (right after the file-versioning comments).
3.) unpacked the ati-drivers-package with "ebuild ati-drivers-8.552-r2.ebuild unpack".
4.) edited "/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.c" and added "#include <linux/errno.h>" directly before the first include.
5.) compiled the ati-drivers-package with "ebuild ati-drivers-8.552-r2.ebuild compile".
But here I get the following (seems to be a different error? same cause?):

make[1]: Entering directory `/usr/src/linux-2.6.27-gentoo-r3'
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c: In Funktion »KCL_IOCTL_RegisterConversion32«:
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:174: Fehler: Implizite Deklaration der Funktion »register_ioctl32_conversion«
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:174: Fehler: »ioctl_trans_handler_t« nicht deklariert (erste Benutzung in dieser Funktion)
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:174: Fehler: (Jeder nicht deklarierte Bezeichner wird nur einmal aufgeführt
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:174: Fehler: für jede Funktion in der er auftritt.)
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:174: Fehler: expected »)« before »handler«
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c: In Funktion »KCL_IOCTL_UnregisterConversion32«:
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:186: Fehler: Implizite Deklaration der Funktion »unregister_ioctl32_conversion«
make[2]: *** [/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o] Fehler 1
make[1]: *** [_module_/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x] Fehler 2
make[1]: Leaving directory `/usr/src/linux-2.6.27-gentoo-r3'
make: *** [kmod_build] Fehler 2

When I google on the "register_ioctl32_conversion" thing, it seems it is a amd64-related issue. There are patches available for very outdated versions of the kernel and the ati-drivers. I don't understand why this comes back here, I red it is solved on decent kernel versions.

(In reply to comment #2)
> Same problem for me, with both 2.6.26-r2 and 2.6.27-r2.
> 
> I found out that the problem isn't from fglrx itself but from these files:
> /usr/src/linux-2.6.26-gentoo-r2/include/linux/sysrq.h
> /usr/src/linux-2.6.27-gentoo-r2/include/linux/sysrq.h
> /usr/src/linux-2.6.27-gentoo-r3/include/linux/sysrq.h
> 
> The problem is that sysrq.h uses EINVAL without including <linux/errno.h>
> 
> So the best thing to do would be fixing that header file in the gentoo-sources
> packages, adding a simple   #include <linux/errno.h>   at the beginning of
> sysrq.h.
> 
> At the same time, a simple   #include <linux/errno.h>   in kcl_debug.c lets
> ati-drivers compile, so I think it'd be good to add it too.
> 
> 
> P.S.: change Summary to:
> x11-drivers/ati-drivers-8.552-r2 fails to emerge due to missing #include
> <linux/errno.h> in <linux/sysrq.h>
> 

(In reply to comment #2)
> Same problem for me, with both 2.6.26-r2 and 2.6.27-r2.
> 
> I found out that the problem isn't from fglrx itself but from these files:
> /usr/src/linux-2.6.26-gentoo-r2/include/linux/sysrq.h
> /usr/src/linux-2.6.27-gentoo-r2/include/linux/sysrq.h
> /usr/src/linux-2.6.27-gentoo-r3/include/linux/sysrq.h
> 
> The problem is that sysrq.h uses EINVAL without including <linux/errno.h>
> 
> So the best thing to do would be fixing that header file in the gentoo-sources
> packages, adding a simple   #include <linux/errno.h>   at the beginning of
> sysrq.h.
> 
> At the same time, a simple   #include <linux/errno.h>   in kcl_debug.c lets
> ati-drivers compile, so I think it'd be good to add it too.
Comment 4 Matteo Modesti 2008-11-21 01:15:30 UTC
(In reply to comment #3)

It's important to remove the temporary compile directory that Portage creates. Did you? I mean:
rm -r /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2

Anyway, I correctly compiled ati-drivers-8.552-r2 just adding
#include <linux/errno.h>   in   /usr/src/linux/include/linux/sysrq.h.
Here's what I mean:


#ifndef _LINUX_SYSRQ_H
#define _LINUX_SYSRQ_H

#include <linux/errno.h>

struct pt_regs;
struct tty_struct;


I'm going to attach my "build.log" to both prove that I really compiled it and that now I have a file collision issue between ati-drivers-8.552-r2 and xorg-server-1.4.2
Comment 5 Matteo Modesti 2008-11-21 01:18:35 UTC
Created attachment 172593 [details]
build.log to prove that it compiles after including <linux/errno.h> in <linux/sysrq.h>
Comment 6 Matteo Modesti 2008-11-21 01:25:36 UTC
Created attachment 172595 [details, diff]
My "patch" to fix <linux/sysrq.h> in gentoo-sources
Comment 7 Matteo Modesti 2008-11-21 01:33:24 UTC
Finally, here's my   emerge --info   output: maybe can be useful somehow.


Portage 2.2_rc14 (default/linux/amd64/2008.0, gcc-4.2.4, glibc-2.6.1-r0, 2.6.26-gentoo-r2 x86_64)
=================================================================
System uname: Linux-2.6.26-gentoo-r2-x86_64-AMD_Phenom-tm-_9850_Quad-Core_Processor-with-glibc2.2.5
Timestamp of tree: Thu, 20 Nov 2008 23:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r7
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.4.8
sys-apps/baselayout: 1.12.11.1
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-r1
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.26
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
LANG="it_IT.UTF-8"
LC_ALL="it_IT.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="it"
MAKEOPTS="-j4"
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"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 3ds 64bit 7zip X Xaw3d a52 aac ace acl acpi additions aio akode alsa amd64 ao apache2 audacious audiofile autoreplace bash-completion berkdb branding bzip2 cairo cal3d caps ccache cdda cddb cdio cdparanoia cdr chardet chroot cli cpudetection cracklib crypt css cups curl dbus dga dirac directfb divx dmi double-precision dri dts dv dvb dvd dvdr dvdread ecc emovix enca encode exif expat fam fame fbcon fbdev ffmpeg fftw firefox flac flash fontconfig fortran fpx ftp gd gdbm ggi gif gimp glib glitz glut gmedia gmp gnutls gpm graphviz gs gtk gtkhtml guile gzip hal hdri history iconv id3 id3tag idea imagemagick imlib isdnlog jabber java5 java6 javascript jbig jingle jpeg jpeg2k justify kde kdrive ladspa lame lcms libcaca libnotify libsamplerate lm_sensors loop-aes lzo mad matroska md5sum messenger midi mikmod mime mjpeg mmap mmx mmxext mng modplug mono motif mozdom mp2 mp3 mp4 mpeg mpeg2 mplayer msn mudflap multilib musepack musicbrainz mysql ncurses networking nls nokia6600 nptl nptlonly nsplugin ntlm nuv oav objc objc++ objc-gc offensive ogg openal openexr opengl openmp openssl pam paste64 pch pcre pdf perl physfs png ppds pppd pth python qt3 qt3support qt4 quicktime radio rar readline realmedia reflection replytolist rtc rtsp samba schroedinger sdl sdl-image sdl-sound sdlaudio sensord session shout slang slp smp sms sndfile sockets speex spell spl sql srp srt sse sse2 sse3 ssl statistics stream svg sysfs syslog szip t1lib tcpd tetex tga theora threads tidy tiff toolbar truetype tta type1 unicode unzip usb utempter v4l v4l2 vcd vdr vorbis wav wavpack wifi winbind wma wmf wmp x264 xanim xcomposite xforms xine xml xorg xpm xprint xsl xulrunner xv xvid xvmc zip zlib" ALSA_CARDS="ca0106" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul 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 ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" DVB_CARDS="bcm3510 dibusb-usb1 dibusb-usb2 nxt2002 nxt200x or51132 or51211 tda10045 tda10046 ttpci ttusb-dec usb-a800 usb-bluebird usb-dib0700 usb-dtt200u usb-umt usb-vp702x usb-vp7045 usb-wt220u" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="it" USERLAND="GNU" VIDEO_CARDS="fglrx radeon vesa vga fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 8 Nikos Chantziaras 2008-11-21 01:43:12 UTC
This can be fixed without patching any files by enabling MAGIC_SYSRQ in the kernel (Kernel Hacking->[*] Magic SysRq key).
Comment 9 Dominik Kozaczko 2008-11-21 05:59:21 UTC
(In reply to comment #8)
> This can be fixed without patching any files by enabling MAGIC_SYSRQ in the
> kernel (Kernel Hacking->[*] Magic SysRq key).
> 

Doesn't work for me. I still get the same error. Please post your kernel config.
Comment 10 Nikos Chantziaras 2008-11-21 06:08:12 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > This can be fixed without patching any files by enabling MAGIC_SYSRQ in the
> > kernel (Kernel Hacking->[*] Magic SysRq key).
> > 
> 
> Doesn't work for me. I still get the same error. Please post your kernel
> config.

I am attaching my 2.6.26-gentoo-r3 and 2.6.27-gentoo-r3 configs (ati-drivers builds on both here.)  This is AMD64.
Comment 11 Nikos Chantziaras 2008-11-21 06:08:54 UTC
Created attachment 172625 [details]
config-2.6.27-gentoo-r3
Comment 12 Nikos Chantziaras 2008-11-21 06:09:18 UTC
Created attachment 172627 [details]
config-2.6.26-gentoo-r3
Comment 13 Jan Boros 2008-11-21 08:02:40 UTC
enabling MAGIC_SYSRQ in the > > kernel (Kernel Hacking->[*] Magic SysRq key).

that help me to solve that problem with EINVAL ...
Comment 14 Andreas Piening 2008-11-21 13:39:21 UTC
@Matteo: you was right, I had not removed the build-directory. But as I did, it doesn't change my error.

I think I have another problem. I get no "EINVAL"-error, since I have enabled "(Kernel Hacking->[*] Magic SysRq key)" right from the start.
To make sure that I have no self-made problem, I re-emerged gentoo-sources, deleted any portage-build-directoies, copied the attached config from this bug-report over my kernel-config and reemerged ati-drivers. Since my last output had german parts, I copied the one from the build.log:

  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c: In function ‘KCL_IOCTL_RegisterConversion32’:
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:174: error: implicit declaration of function ‘register_ioctl32_conversion’
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:174: error: ‘ioctl_trans_handler_t’ undeclared (first use in this function)
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:174: error: (Each undeclared identifier is reported only once
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:174: error: for each function it appears in.)
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:174: error: expected ‘)’ before ‘handler’
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c: In function ‘KCL_IOCTL_UnregisterConversion32’:
/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:186: error: implicit declaration of function ‘unregister_ioctl32_conversion’
make[2]: *** [/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o] Error 1
make[1]: *** [_module_/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.27-gentoo-r3'
make: *** [kmod_build] Error 2

Here is my emerge --info:
Portage 2.2_rc14 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.27-gentoo-r3_AndreasPiening x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r3_AndreasPiening-x86_64-Intel-R-_Core-TM-2_CPU_6600_@_2.40GHz-with-glibc2.2.5
Timestamp of tree: Fri, 21 Nov 2008 12:34:01 +0000
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-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.6.2
sys-apps/baselayout: 1.12.11.1
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-r1
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.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="de en"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 bash-completion berkdb binfilter branding bzip2 cdda cddb cdr cli cracklib crypt cups dbus divx dri dvd dvdr eds encode esd fortran gcdmaster gdbm glitz gnome gpm gstreamer gtk hal iconv imagemagick ipv6 isdnlog java jpeg jpeg2k kde ldap midi mmx mpeg mpeg2 mudflap multilib mysql nautilus ncurses nls nptl nptlonly nsplugin nxclient odk opengl openmp pam pcre perl php pppd python qt4 rdesktop readline reflection samba sdl sdl-image server session spl sse sse2 ssl sysfs tcpd templates threads tiff truetype unicode vim vim-syntax vnc x264 xcomposite xorg xrandr xscreensaver xvid zeroconf zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers 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="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="vesa radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Maybe I should open another bug, since the errors are different?
Comment 15 kevstar.31 2008-11-22 17:42:57 UTC
Someone else is having the same problem using 2.6.25-gentoo-r7 but they are having trouble with the bug tracker.
http://forums.gentoo.org/viewtopic-p-5288271.html

...
>>> Unpacking ./../common/usr/src/ati/fglrx_sample_source.tgz to /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/extra
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work ...
 * Preparing fglrx module
make -C /usr/src/linux M=/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Entering directory `/usr/src/linux-2.6.25-gentoo-r7'
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o
In file included from /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.c:35:
include/linux/sysrq.h: In function ‘__reterr’:
include/linux/sysrq.h:66: error: ‘EINVAL’ undeclared (first use in this function)
include/linux/sysrq.h:66: error: (Each undeclared identifier is reported only once
include/linux/sysrq.h:66: error: for each function it appears in.)
make[2]: *** [/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.25-gentoo-r7'
make: *** [kmod_build] Error 2
Comment 16 Matteo Modesti 2008-11-22 23:36:34 UTC
Ok, the ebuild has been fixed: now it requires MAGIC_SYSRQ to emerge and enabling it works for me.
Anyway, now there's a file collision between ati-drivers and xorg-server, but another bug's already been opened:
https://bugs.gentoo.org/show_bug.cgi?id=247685
Comment 17 C.P. Banks 2008-11-23 12:38:57 UTC
Created attachment 172931 [details, diff]
MAGIC SYSRQ patch for when USE=-debug

This chunk of code i added an else block to, where I patch MAGIC SYSRQ out of existence in the USE=-debug mode merge

if use debug; then
	# Enable debug mode in the Source Code.
	sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
		"${MODULE_DIR}/firegl_public.c" \
		|| die "Failed to enable debug output."
else
	epatch "${FILESDIR}"/sysrq-patch	
fi
Comment 18 kevstar.31 2008-11-23 18:01:24 UTC
Emerge --info

Portage 2.1.4.5 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.25-gentoo-r7 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 6400+
Timestamp of tree: Sat, 22 Nov 2008 02:04:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.4.6-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.4_p6, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
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.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=athlon64"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-I/home/roland/progs/testing/include"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.mirror.solnet.ch http://mirror.switch.ch/mirror/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-L/home/roland/progs/testing/lib"
LINGUAS="en de"
MAKEOPTS="-j3"
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"
SYNC="rsync://server:880/portage"
USE="X aac acl alsa amd64 arts audiofile berkdb browserplugin bzip2 cdr cli cracklib crypt cups dbus dri dssi dvd encode expat firefox fortran gdbm gif gimp gimpprint gpm gtk hal iconv ipv6 isdnlog jack java javascript jpeg kde ladspa libnotify libsamplerate live lua midi mmx modplug mp3 mudflap multilib ncurses network nls noamazon nptl nptlonly nsplugin ogg openexr opengl openmp pam pcre pdf perl php png pppd python qt3 readline reflection ruby sane sdl session sndfile spl sql sse sse2 ssl subversion svg sysfs tcpd theora tiff timidity truetype unicode usb visualization vorbis wma xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers 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="evdev joystick keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" USERLAND="GNU" VIDEO_CARDS="fglrx vesa radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 19 Jeffrey Gardner (RETIRED) gentoo-dev 2009-02-03 06:34:11 UTC
Fixed in newer ebuilds.
Comment 20 Kevin F. Quinn 2009-04-10 19:15:47 UTC
Yuck - requiring the running kernel to have MAGIC_SYSRQ enabled is hideous.

C.P. Banks' patch, which simply removes the kernel driver's capability to dump debug info on syskey 'g' 'l' etc,  is a far superior solution.

Could be conditional on USE=magicsysrq or something (in general ebuilds shouldn't patch conditionally according to the host kernel configuration, since the target machine may not be the same as the host).
Comment 21 Paul Thompson 2009-04-25 02:17:39 UTC
(In reply to comment #3)
> Hi Matteo,
> 
> I tried what you discribed, but without luck. To track down if I've done a
> mistake or missed something, I'll write down step by step what I did:
> 1.) emerged, configured (with "kernel hacking/export unused symbols" enabled, I
> red this is neccessary), compiled and bootet into gentoo-sources-2.6.27-r3. I
> am on amd64.
> 2.) edited "/usr/src/linux-2.6.27-gentoo-r3/include/linux/sysrq.h" and added
> "#include <linux/errno.h>" just before the first "#ifndef" (right after the
> file-versioning comments).
> 3.) unpacked the ati-drivers-package with "ebuild ati-drivers-8.552-r2.ebuild
> unpack".
> 4.) edited
> "/var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.c"
> and added "#include <linux/errno.h>" directly before the first include.
> 5.) compiled the ati-drivers-package with "ebuild ati-drivers-8.552-r2.ebuild
> compile".
> But here I get the following (seems to be a different error? same cause?):
> 
> make[1]: Entering directory `/usr/src/linux-2.6.27-gentoo-r3'
>   CC [M] 
> /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o
> /var/tmp/portage/x11-drivers/ati-drivers-8.552-r2/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:
> In Funktion »KCL_IOCTL_RegisterConversion32«:
> 

Hi;

the problem with the register_ioctl32_conversion, is that it doesnt exist
in newer kernels. (as far as I can see) That reference will get get fixed
if you have the CONFIG_IA32_EMULATION setting in your kernel config
under the executable fileformats/emulations section. Then the driver should
build.