Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280218 - x11-drivers/ati-drivers-9.7 failed to compile with patches and kernel 2.6.30-r4
Summary: x11-drivers/ati-drivers-9.7 failed to compile with patches and kernel 2.6.30-r4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 277944
  Show dependency tree
 
Reported: 2009-08-03 20:57 UTC by Astarot
Modified: 2009-08-30 13:14 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Astarot 2009-08-03 20:57:35 UTC
Portage downloads whole patchset for this driver and for kernel in version 2.6.30 but after all it fails during compilation here is build.log:

 [32;01m*[0m Determining the location of the kernel source code
 [32;01m*[0m Found kernel source directory:
 [32;01m*[0m     /usr/src/linux
 [32;01m*[0m Found kernel object directory:
 [32;01m*[0m     /lib/modules/2.6.30-gentoo-r4/build
 [32;01m*[0m Found sources for kernel version:
 [32;01m*[0m     2.6.30-gentoo-r4
 [33;01m*[0m Kernels newer then 2.6.28 are heavily patched and might result in runtime failitures.
 [33;01m*[0m Consider them as unsupported by us.
 [33;01m*[0m All bug reports are needed to be tested with 2.6.28 kernel
 [32;01m*[0m 
 [32;01m*[0m Please note that this driver supports only graphic cards based on
 [32;01m*[0m r600 chipset and newer.
 [32;01m*[0m This represent the ATI Radeon HD series at this moment.
 [32;01m*[0m 
 [32;01m*[0m If your card is older then usage of x11-drivers/xf86-video-ati
 [32;01m*[0m as replacement is highly recommended. Rather than staying with
 [32;01m*[0m old versions of this driver.
 [32;01m*[0m For migration informations please reffer to:
 [32;01m*[0m http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml
 [32;01m*[0m 
>>> Unpacking source...
>>> Source unpacked in /var/tmp/portage/x11-drivers/ati-drivers-9.7/work
>>> Preparing source in /var/tmp/portage/x11-drivers/ati-drivers-9.7/work ...
 [32;01m*[0m Applying ati-drivers-xen.patch ...
[A[72C  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Applying 9.7-smp.patch ...
[A[72C  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Applying 9.7-x86_32b.patch ...
[A[72C  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Applying 2.6.29.patch ...
[A[72C  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Applying 2.6.30-enable_msi.patch ...
[A[72C  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Applying 2.6.30-irqreturn_t.patch ...
[A[72C  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Applying 2.6.30-rt_compat.patch ...
[A[72C  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Applying 2.6.30-tlb_flush.patch ...
[A[72C  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Applying ati-powermode-opt-path-2.patch ...
[A[72C  [34;01m[ [32;01mok[34;01m ][0m
 [32;01m*[0m Converting 2.6.x/Makefile to use M= instead of SUBDIRS= ...
[A[72C  [34;01m[ [32;01mok[34;01m ][0m
>>> Unpacking ./../common/usr/src/ati/fglrx_sample_source.tgz to /var/tmp/portage/x11-drivers/ati-drivers-9.7/work/extra
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/x11-drivers/ati-drivers-9.7/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/x11-drivers/ati-drivers-9.7/work ...
 [32;01m*[0m Preparing fglrx module
make -j3 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= GCC_VER_MAJ=4 KVER=2.6.30-gentoo-r4 KDIR=/usr/src/linux kmod_build 
make -C /usr/src/linux M=/var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Entering directory `/usr/src/linux-2.6.30-gentoo-r4'
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o
/var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:33:1: warning: "CONFIG_SMP" redefined
In file included from /var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:31:
include/linux/autoconf.h:1292:1: warning: this is the location of the previous definition
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.o
In file included from include/linux/mmdebug.h:4,
                 from include/linux/mm.h:10,
                 from /usr/src/linux-2.6.30-gentoo-r4/arch/x86/include/asm/pci.h:4,
                 from include/linux/pci.h:1098,
                 from /var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:109:
include/linux/autoconf.h:1292:1: warning: "CONFIG_SMP" redefined
/var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:33:1: warning: this is the location of the previous definition
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.o
/var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.c: In function 'KCL_DEBUG_Print':
/var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.c:96: warning: format not a string literal and no format arguments
/var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.c: In function '__ke_printk':
/var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.c:157: warning: format not a string literal and no format arguments
  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o
In file included from /var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:442:
/var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/drm_proc.h: In function 'FGLDRM__vma_info':
/var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/drm_proc.h:497: warning: format '%08lx' expects type 'long unsigned int', but argument 5 has type 'phys_addr_t'
/var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function 'KCL_SetPageCache_Array':
/var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1241: warning: unused variable 'ret'
/var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1240: warning: unused variable 'i'
/var/tmp/portage/x11-drivers/ati-drivers-9.7/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-9.7/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-9.7/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-9.7/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-9.7/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-9.7/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-9.7/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-9.7/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-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [_module_/var/tmp/portage/x11-drivers/ati-drivers-9.7/work/common/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.30-gentoo-r4'
make: *** [kmod_build] Error 2
 [31;01m*[0m 
 [31;01m*[0m ERROR: x11-drivers/ati-drivers-9.7 failed.
 [31;01m*[0m Call stack:
 [31;01m*[0m               ebuild.sh, line   49:  Called src_compile
 [31;01m*[0m             environment, line 3437:  Called linux-mod_src_compile
 [31;01m*[0m             environment, line 2643:  Called die
 [31;01m*[0m The specific snippet of code:
 [31;01m*[0m               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}";
 [31;01m*[0m  The die message:
 [31;01m*[0m   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.30-gentoo-r4 KDIR=/usr/src/linux kmod_build
 [31;01m*[0m 
 [31;01m*[0m If you need support, post the topmost build error, and the call stack if relevant.
 [31;01m*[0m A complete build log is located at '/var/tmp/portage/x11-drivers/ati-drivers-9.7/temp/build.log'.
 [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/x11-drivers/ati-drivers-9.7/temp/environment'.
 [31;01m*[0m 

Reproducible: Always

Steps to Reproduce:
1. emerge -av ati-drivers
2.
3.
Comment 1 James Earl Spahlinger 2009-08-06 02:22:40 UTC
Please paste the output of 'emerge --info' into a bugzilla comment to assist the maintainers in resolving this issue

Also did you ever have it working on this system?
Comment 2 Astarot 2009-08-06 18:57:11 UTC
(In reply to comment #1)
> Please paste the output of 'emerge --info' into a bugzilla comment to assist
> the maintainers in resolving this issue
> 
> Also did you ever have it working on this system?
> 

Here is my emerge --info:
Portage 2.1.6.13 (default/linux/amd64/2008.0/desktop, gcc-4.3.3, glibc-2.10.1-r0, 2.6.30-gentoo-r4 x86_64)
=================================================================
System uname: Linux-2.6.30-gentoo-r4-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T6400_@_2.00GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 06 Aug 2009 15:00:01 +0000
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.5.4-r3, 2.6.2-r1, 3.1
dev-util/cmake:      2.6.4-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.0
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages 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"
LDFLAGS="-Wl,-O1"
LINGUAS="en pl"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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/layman/wrobel /usr/local/portage/layman/sunrise /usr/local/portage/layman/kde /usr/local/portage/layman/zen-overlay /usr/local/portage/layman/x11"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa amd64 avi bash-completion berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt dbus djvu dri dvd dvdr dvdread eds emboss encode esd evo fam ffmpeg firefox flac fortran gadu gdbm gif gimp git glx gpm gstreamer hal iconv ipv6 isdnlog java jpeg kde lame laptop ldap libnotify mad mikmod mmx mnt mp3 mpeg mudflap multilib mysql ncurses nls nptl nptlonly nsplugin ogg oggvorbis opengl openmp pam pcre pdf perl phonon png ppds pppd python qt3 qt3support qt4 quicktime readline reflection samba sdl session spell spl sql sse sse2 sse4 ssl ssse3 startup-notification subversion svg sysfs tcpd threads thumbnail tiff truetype unicode usb v4l vim-syntax vorbis webkit wifi x264 xine xml xorg xulrunner 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 synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en pl" USERLAND="GNU" VIDEO_CARDS="fglrx"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

uname -a:
Linux localhost 2.6.30-gentoo-r4 #6 SMP Wed Aug 5 16:10:01 CEST 2009 x86_64 Intel(R) Core(TM)2 Duo CPU T6400 @ 2.00GHz GenuineIntel GNU/Linux

I guess on x86 this ebuild is working very well but there are troubles on amd64, as you can see. I think everything is due to ioctl32.h header C file from linux source look at the code  (kcl_ioctl.c from ati-drivers code):

#ifdef __x86_64__
#   include "asm/compat.h"
#   if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
#       if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
#           include "linux/ioctl32.h"
#       else
#           include "asm/ioctl32.h"
#       endif
#   endif
#endif
So if kernels is (mathematical notation :) ) <2.6.12, 2.6.22) include additional linux/ioctl32.h header file, if below that 2.6.12 include "asm/ioctl32.h". There should be definitions of function register_ioctl32_conversion and friends but those files are missing on my kernel (deprecated by developers, I guess). Here is output from find:

#find . -name "compat.h" -print
./fs/btrfs/compat.h
./arch/arm/kernel/compat.h
./arch/x86/include/asm/compat.h
./arch/ia64/include/asm/compat.h
./arch/mips/include/asm/compat.h
./arch/s390/include/asm/compat.h
./arch/sparc/include/asm/compat.h
./arch/parisc/include/asm/compat.h
./arch/powerpc/include/asm/compat.h
./include/net/compat.h
./include/linux/compat.h
./include/config/nf/conntrack/proc/compat.h
./include/config/video/v4l1/compat.h
./include/config/sonypi/compat.h

And I can`t find register_ioctl32_conversion anywhere. I`m wondering if it is possible to change this "fine" function to another code...
Comment 3 Tomáš Chvátal (RETIRED) gentoo-dev 2009-08-20 09:36:40 UTC
fixed in 9.8
Comment 4 Dániel Varga 2009-08-30 13:14:16 UTC
No it isn't fixed, I had the same problem with ati-drivers-9.8.
On amd64 unregister_ioctl32_conversion is unavailable when you turn off 32 bit support.
The solution is to set CONFIG_IA32_EMULATION=y in kernel config, then recompile the kernel.