Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 276893 - [patch] x11-drivers/ati-drivers-9.6 optional modules build
Summary: [patch] x11-drivers/ati-drivers-9.6 optional modules build
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High enhancement (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2009-07-07 09:17 UTC by Rene Meier
Modified: 2009-07-16 09:25 UTC (History)
4 users (show)

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


Attachments
the kernel module only (ati-modules-9.6.ebuild,5.11 KB, text/plain)
2009-07-07 20:53 UTC, Rene Meier
Details
the kernel module only; small cleanups (ati-modules-9.6.ebuild,4.95 KB, text/plain)
2009-07-10 07:19 UTC, Rene Meier
Details
driver libraries and programs (ati-drivers-9.6.ebuild,11.73 KB, text/plain)
2009-07-10 07:32 UTC, Rene Meier
Details
ebuild with module use flag (ati-drivers-9.6.ebuild,16.11 KB, text/plain)
2009-07-13 07:28 UTC, Rene Meier
Details
the patch to the ebuild in the tree (patch,9.78 KB, patch)
2009-07-13 07:29 UTC, Rene Meier
Details | Diff
fixes (patch,677 bytes, patch)
2009-07-15 13:36 UTC, Rene Meier
Details | Diff
patch (patch,874 bytes, text/plain)
2009-07-16 07:40 UTC, Rene Meier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rene Meier 2009-07-07 09:17:40 UTC
with the current release of x11-drivers/ati-drivers its possible to install them on amd64 no-multilib profile. all the programs and libraries are native 64 bit. To get it working i put x11-drivers/ati-drivers in package.unmask and removed the line:
amd64? ( app-emulation/emul-linux-x86-xlibs )
from RDEPEND.
The driver and module was working on no-multilib profile before as stated in bug #234631. now all the programs are also available in 64 bit.

Reproducible: Always




emerge --info
Portage 2.2_rc33 (default/linux/amd64/2008.0/no-multilib, gcc-4.3.3, glibc-2.10.1-r0, 2.6.30-gentoo-r2 x86_64)
=================================================================                                             
System uname: Linux-2.6.30-gentoo-r2-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9550_@_2.66GHz-with-gentoo-2.0.1      
Timestamp of tree: Tue, 07 Jul 2009 06:30:01 +0000                                                            
app-shells/bash:     4.0_p24                                                                                  
dev-java/java-config: 2.1.8-r1                                                                                
dev-lang/python:     2.6.2-r1                                                                                 
dev-util/cmake:      2.6.4                                                                                    
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.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                                                                                   
ACCEPT_KEYWORDS="amd64 ~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 /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/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="collision-protect 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"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl acpi alsa amd64 apm avahi berkdb bluetooth bzip2 cairo cdr cli consolekit cracklib crypt cups dbus dri dvd dvdr encode fam fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kde libnotify lm_sensors mad midi mmx mng mp3 mpeg mpi mudflap mysql ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcl tcpd threads tiff tk truetype unicode usb vorbis webkit xine xml xorg xulrunner 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="synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="fglrx radeon radeonhd"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

all binarys are 64 bit!
for x in `equery f ati-drivers ` ; do file $x | grep ELF ; done
/lib/modules/2.6.30-gentoo-r2/video/fglrx.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
/opt/bin/amdcccle: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.4.3, stripped
/opt/bin/aticonfig: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.4.3, stripped
/opt/bin/atiodcli: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.4.3, stripped
/opt/bin/atiode: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.4.3, stripped
/opt/bin/fglrxinfo: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.4.3, stripped
/opt/sbin/atieventsd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.4.3, stripped
/usr/bin/fgl_glxgears: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
/usr/bin/fglrx_xgamma: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
/usr/lib64/dri/fglrx_dri.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/usr/lib64/libAMDXvBA.so.1.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/usr/lib64/libXvBAW.so.1.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/usr/lib64/libatiadlxx.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/usr/lib64/libaticalcl.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/usr/lib64/libaticaldd.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/usr/lib64/libaticalrt.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/usr/lib64/libfglrx_dm.so.1.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/usr/lib64/libfglrx_gamma.so.1.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/usr/lib64/libfglrx_pp.so.1.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/usr/lib64/libfglrx_tvout.so.1.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/usr/lib64/opengl/ati/extensions/libdri.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/usr/lib64/opengl/ati/extensions/libglx.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/usr/lib64/opengl/ati/lib/libGL.so.1.2: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, for GNU/Linux 2.4.20, stripped
/usr/lib64/xorg/modules/amdxmm.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/usr/lib64/xorg/modules/drivers/fglrx_drv.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/usr/lib64/xorg/modules/glesx.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
/usr/lib64/xorg/modules/linux/libfglrxdrm.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
Comment 1 Rene Meier 2009-07-07 09:29:01 UTC
so im asking for removing the package mask from x11-drivers/ati-drivers-9.6 on no-multilib profile.

One more thing is left to do and i would volunteer to provide the necessary  ebuilds if the responsible gentoo dev agree on this and is willing to put this on the tree. Im using a 32bit chroot to run the few left 32bit programs im using and a few propriatary programs in 32 bit. to enable direct rendering in my chroot i need the driver libraries from ati-drivers in my chroot, but no the kernel module. unfortionaly its not possible to install ati-drivers without the kernel module. the installation of the kernel module in turn requires a full and proper set up kernel source tree.

Thats why i propose to split ati-drivers in ati-drivers and ati-modules. What are you thinking about this?
Comment 2 Tomáš Chvátal (RETIRED) gentoo-dev 2009-07-07 09:44:06 UTC
As i ussualy say:
"Patches weclomed :]"
Comment 3 Rene Meier 2009-07-07 20:53:05 UTC
Created attachment 197119 [details]
the kernel module only

as promised, i finished the first part. this ebuild is for the fglrx kernel module only. i took the relevant code from the ati-drivers ebuild. i suggest to put this in x11-drivers/ati-modules. Please note that i can test the kernel module only on amd64. hopefully i will add the ebuild for ati-drivers (libs and programs ) tomorrow. i suggest to move the patches for the kernel to ${FILESDIR}. my ${FILESDIR} contains:
2.6.29.patch
2.6.30-enable_msi.patch
2.6.30-irqreturn_t.patch
2.6.30-rt_compat.patch
2.6.30-tlb_flush.patch
ati-drivers-xen.patch
Comment 4 Rene Meier 2009-07-10 07:19:39 UTC
Created attachment 197436 [details]
the kernel module only; small cleanups
Comment 5 Rene Meier 2009-07-10 07:32:28 UTC
Created attachment 197438 [details]
driver libraries and programs

i introduced a new useflag "modules" in the ebuild. its turned on by default. this solution is similar to app-emulation/kvm. with "modules" set ati-drivers depend on ati-modules. now i can emerge ati-drivers in my chroot with modules use flag turned of and it will not try to emerge kernel sources and it does not depend on a full configured source tree any more. i have tested ati-modules and ati drivers in amd64 no-multilib profile and ati-drivers in x86(my chroot environment). i can not test this in a amd64 multilib profile, but i hope it will work. i have not changed the code of the ebuild, but only splited it in two pieces. i would be happy, if this could find a way into the offical tree.
Comment 6 Jory A. Pratt gentoo-dev 2009-07-12 05:11:54 UTC
(In reply to comment #5)
> Created an attachment (id=197438) [edit]
> driver libraries and programs
> 
> i introduced a new useflag "modules" in the ebuild. its turned on by default.
> this solution is similar to app-emulation/kvm. with "modules" set ati-drivers
> depend on ati-modules. now i can emerge ati-drivers in my chroot with modules
> use flag turned of and it will not try to emerge kernel sources and it does not
> depend on a full configured source tree any more. i have tested ati-modules and
> ati drivers in amd64 no-multilib profile and ati-drivers in x86(my chroot
> environment). i can not test this in a amd64 multilib profile, but i hope it
> will work. i have not changed the code of the ebuild, but only splited it in
> two pieces. i would be happy, if this could find a way into the offical tree.
> 

This is a bit crazy to split the ebuild, causes nothing more then a headache to manage the ebuilds. I do agree with you that it should be fixed to work on no-multilib setup. 
Comment 7 Jory A. Pratt gentoo-dev 2009-07-12 05:49:59 UTC
--- /usr/portage/x11-drivers/ati-drivers/ati-drivers-9.6.ebuild	2009-07-06 06:36:59.000000000 -0500
+++ /home/gentoo/x11-drivers/ati-drivers/ati-drivers-9.6.ebuild	2009-07-12 00:45:07.708508528 -0500
@@ -25,7 +25,7 @@
 	>=x11-base/xorg-server-1.5.3-r7
 	x11-libs/libXinerama
 	x11-libs/libXrandr
-	amd64? ( app-emulation/emul-linux-x86-xlibs )
+	amd64? ( multilib? ( app-emulation/emul-linux-x86-xlibs ))
 	acpi? (
 		sys-power/acpid
 		x11-apps/xauth


This is the only change that actually has to be made to make the ebuild ready for no-multilib installs. 
Comment 8 Rene Meier 2009-07-12 11:31:14 UTC
(In reply to comment #7)
> --- /usr/portage/x11-drivers/ati-drivers/ati-drivers-9.6.ebuild 2009-07-06
> 06:36:59.000000000 -0500
> +++ /home/gentoo/x11-drivers/ati-drivers/ati-drivers-9.6.ebuild 2009-07-12
> 00:45:07.708508528 -0500
> @@ -25,7 +25,7 @@
>         >=x11-base/xorg-server-1.5.3-r7
>         x11-libs/libXinerama
>         x11-libs/libXrandr
> -       amd64? ( app-emulation/emul-linux-x86-xlibs )
> +       amd64? ( multilib? ( app-emulation/emul-linux-x86-xlibs ))
>         acpi? (
>                 sys-power/acpid
>                 x11-apps/xauth
> 
> 
> This is the only change that actually has to be made to make the ebuild ready
> for no-multilib installs. 
> 

Thats true for no-multilib install. So this should be fixed at least. Please also remove the package mask! But it does not help much if you want to install the driver libraries in a 32 bit chroot. !ou will need a fully configured kernel source tree in your chroot. But it is not really needed. Thats why i (and everyone else who wants to run 3D apps in a 32 bit chroot) needs the splited ebuilds. It is not much more work compared to a single ebuild, because the code is exactly the same! Other packages do this as well.

Unfortunally it is not possible to solve this with a use flag because its not possible to conditional inherit a eclass (linux-mod in this case).
Comment 9 Rene Meier 2009-07-13 07:28:22 UTC
Created attachment 197757 [details]
ebuild with module use flag

ok, so if no one thinks this is a good idea i propose the following solution. we introduce a use flag modules and execute the module related stuff only if the use flag is set. to not bother the normal user the use flag will be activated by default. the no-multilib issue is alse fixed in this ebuild. this gives at least the possibility to build the libs without a fully configured source tree in a chroot environment.
Comment 10 Rene Meier 2009-07-13 07:29:45 UTC
Created attachment 197758 [details, diff]
the patch to the ebuild in the tree

because the devs always like these patches... ;)
Comment 11 Tomáš Chvátal (RETIRED) gentoo-dev 2009-07-13 08:44:44 UTC
Actualy it should work without those emul-libs on -multilib profile.

(just slight note :})

Otherwise patch looks good so when i get it tested here it will be added (i give it 1-2 days cause i was bit away and there is .... of bugs for meh :])
Comment 12 Tomáš Chvátal (RETIRED) gentoo-dev 2009-07-15 09:58:09 UTC
Thanks for patch. I adjusted it a bit and commited without revbump. So enjoy :]
Comment 13 Rene Meier 2009-07-15 13:36:18 UTC
Created attachment 198050 [details, diff]
fixes

sorry i need to reopen this bug, because the ebuild in portage does not work any more. dont know exactly whats wrong, but to make it work we need to swap two lines (see patch). futhermore i found a minor issue. the function linux-mod_pkg_prerm does not exist in the eclass. i think it can be deleted.
Comment 14 Rene Meier 2009-07-15 13:39:36 UTC
the error message:
>>> Emerging (1 of 1) x11-drivers/ati-drivers-9.6
 * ati-driver-installer-9-6-x86.x86_64.run RMD160 SHA1 SHA256 size ;-) ... [ ok ]
 * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/2.6.30-gentoo-r2/build
 * Found sources for kernel version:
 *     2.6.30-gentoo-r2
 * Kernels newer then 2.6.28 are heavily patched and might result in runtime failitures.
 * Consider them as unsupported by us.
 * All bug reports are needed to be tested with 2.6.28 kernel
 *
 * Please note that this driver supports only graphic cards based on
 * r600 chipset and newer.
 * This represent the ATI Radeon HD series at this moment.
 *
 * If your card is older then usage of x11-drivers/xf86-video-ati
 * as replacement is highly recommended. Rather than staying with
 * old versions of this driver.
 * For migration informations please reffer to:
 * http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml
 *
>>> Unpacking source...
>>> Source unpacked in /var/tmp/portage/x11-drivers/ati-drivers-9.6/work
>>> Preparing source in /var/tmp/portage/x11-drivers/ati-drivers-9.6/work ...
 ^[[32;01m*^[[0m Applying ati-drivers-xen.patch ...
^[[A^[[196C  ^[[34;01m[ ^[[32;01mok^[[34;01m ]^[[0m
 ^[[32;01m*^[[0m Applying 2.6.29.patch ...
^[[A^[[196C  ^[[34;01m[ ^[[32;01mok^[[34;01m ]^[[0m
 ^[[32;01m*^[[0m Applying 2.6.30-enable_msi.patch ...
^[[A^[[196C  ^[[34;01m[ ^[[32;01mok^[[34;01m ]^[[0m
 ^[[32;01m*^[[0m Applying 2.6.30-irqreturn_t.patch ...
^[[A^[[196C  ^[[34;01m[ ^[[32;01mok^[[34;01m ]^[[0m
 ^[[32;01m*^[[0m Applying 2.6.30-rt_compat.patch ...
^[[A^[[196C  ^[[34;01m[ ^[[32;01mok^[[34;01m ]^[[0m
 ^[[32;01m*^[[0m Applying 2.6.30-tlb_flush.patch ...
^[[A^[[196C  ^[[34;01m[ ^[[32;01mok^[[34;01m ]^[[0m
 ^[[32;01m*^[[0m Applying ati-powermode-opt-path-2.patch ...
^[[A^[[196C  ^[[34;01m[ ^[[32;01mok^[[34;01m ]^[[0m
 ^[[32;01m*^[[0m Converting 2.6.x/Makefile to use M= instead of SUBDIRS= ...
^[[A^[[196C  ^[[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.6/work/extra
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/x11-drivers/ati-drivers-9.6/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/x11-drivers/ati-drivers-9.6/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= KDIR= kmod_build
make -C  M=/var/tmp/portage/x11-drivers/ati-drivers-9.6/work/common/lib/modules/fglrx/build_mod/2.6.x modules
make: *** M=/var/tmp/portage/x11-drivers/ati-drivers-9.6/work/common/lib/modules/fglrx/build_mod/2.6.x: Datei oder Verzeichnis nicht gefunden.  Schluss.
make: *** [kmod_build] Fehler 2
 ^[[31;01m*^[[0m
 ^[[31;01m*^[[0m ERROR: x11-drivers/ati-drivers-9.6 failed.
 ^[[31;01m*^[[0m Call stack:
 ^[[31;01m*^[[0m               ebuild.sh, line   49:  Called src_compile
 ^[[31;01m*^[[0m             environment, line 3491:  Called linux-mod_src_compile
 ^[[31;01m*^[[0m             environment, line 2697:  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= KDIR= 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.6/temp/build.log'.
 ^[[31;01m*^[[0m The ebuild environment file is located at '/var/tmp/portage/x11-drivers/ati-drivers-9.6/temp/environment'.
 ^[[31;01m*^[[0m
Comment 15 Jouni Rinne 2009-07-15 18:32:54 UTC
Same error here, on x86_64 with 2.6.28 kernel. Please do _not_ make this kind of changes to ebuilds without creating a new revision.
Comment 16 Lance Lassetter 2009-07-15 19:29:18 UTC
on a amd64 system this doesn't compile.

emerge -uDN world pulled in %modules use flag.

die message is: 

make -C  M=/var/tmp/portage/x11-drivers/ati-drivers-9.6/work/common/lib/modules/fglrx/build_mod/2.6.x modules
make: *** M=/var/tmp/portage/x11-drivers/ati-drivers-9.6/work/common/lib/modules/fglrx/build_mod/2.6.x: No such file or directory.  Stop.
make: *** [kmod_build] Error 2
 * 
 * ERROR: x11-drivers/ati-drivers-9.6 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3453:  Called linux-mod_src_compile
 *             environment, line 2659:  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= KDIR= 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-9.6/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/ati-drivers-9.6/temp/environment'.
 * 

>>> Failed to emerge x11-drivers/ati-drivers-9.6, Log file:

>>>  '/var/tmp/portage/x11-drivers/ati-drivers-9.6/temp/build.log'

emerge --info:

# emerge --info
Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r2 x86_64)
=================================================================
System uname: Linux-2.6.30-gentoo-r2-x86_64-AMD_Phenom-tm-_II_X4_940_Processor-with-glibc2.2.5
Timestamp of tree: Wed, 15 Jul 2009 18:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.5.4-r3
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
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/sandbox.d /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ ftp://ftp.gtlib.gatech.edu/pub/gentoo http://www.gtlib.gatech.edu/pub/gentoo ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://cudlug.cudenver.edu/gentoo/ http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/ http://gentoo.mirrors.tds.net/gentoo ftp://gentoo.mirrors.tds.net/gentoo http://gentoo.netnitco.net ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ http://open-systems.ufl.edu/mirrors/gentoo http://gentoo.llarian.net/ ftp://gentoo.llarian.net/pub/gentoo http://gentoo.binarycompass.org http://mirror.datapipe.net/gentoo ftp://mirror.datapipe.net/gentoo http://mirrors.cs.wmich.edu/gentoo http://mirror.usu.edu/mirrors/gentoo/ http://mirror.mcs.anl.gov/pub/gentoo/ ftp://mirror.mcs.anl.gov/pub/gentoo/ http://gentoo.mirrors.easynews.com/linux/gentoo/ http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://ftp.wallawalla.edu/pub/mirrors/ftp.gentoo.org http://gentoo.chem.wisc.edu/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/ http://lug.mtu.edu/gentoo/ ftp://lug.mtu.edu/gentoo/ http://gentoo.mirrors.hoobly.com/ http://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ ftp://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ http://mirror.its.uidaho.edu/pub/gentoo/ ftp://mirror.its.uidaho.edu/gentoo/ http://www.cyberuse.com/gentoo/ "
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j5"
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=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac acl acpi alsa amd64 apache2 artworkextra autoipd automount avahi bash-completion berkdb bittorrent branding bzip2 cairo cdinstall clamav cleartype cli consolekit cracklib crypt cups dbus dovecot-sasl dri dvb dvd dvdr encode fam ffmpeg flac fontconfig fontforge fortran games gdbm gif git gnome gnome-keyring gnutls gpm gstreamer gtk gtkhtml hal hash hddtemp iconv ipv6 isdnlog jpeg ladspa libnotify libsexy mad mbox mdnsresponder-compat midi mmx mp3 mpeg mudflap multilib musicbrainz mysql nautilus ncurses nls nptl nptlonly nsplugin ogg openal opengl openmp pam pcre perl php png pppd pulseuadio python readline reflection sasl sdl session speex spell spl sse sse2 ssl startup-notification subversion svg sysfs syslog tcpd theora tiff tk truetype unicode vim-syntax vorbis xml xorg xulrunner 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 evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="fglrx"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 17 Paul Tobias 2009-07-15 22:45:45 UTC
I have made an emerge world today, and this package fails to build with the same problem as in comments #14 and #16. The patch in comment #15 fixes the the issue.
The problem is, you need to call linux-mod_pkg_setup before using ${KV_FULL} or ${KV_DIR}, otherwise they will be empty variables.

But since some dependencies were removed, revdep-rebuild finds the following problems (on amd64):
broken /usr/lib32/dri/fglrx_dri.so (requires libX11.so.6 libXext.so.6)
broken /usr/lib32/libaticalcl.so (requires libX11.so.6 libXext.so.6)
broken /usr/lib32/libaticaldd.so (requires libX11.so.6 libXext.so.6)
broken /usr/lib32/libaticalrt.so (requires libX11.so.6 libXext.so.6)
broken /usr/lib32/opengl/ati/extensions/libdri.so (requires libdrm.so.2)
broken /usr/lib32/opengl/ati/lib/libGL.so.1.2 (requires libXext.so.6)
broken /usr/lib64/libAMDXvBA.so.1.0 (requires libstdc++.so.5)
Comment 18 Rene Meier 2009-07-16 07:23:25 UTC
(In reply to comment #17)
> But since some dependencies were removed, revdep-rebuild finds the following
> problems (on amd64):
Thank you for pointing that out. Tomáš, these two lines are still needed in RDEPEND:

sys-libs/libstdc++-v3
amd64? ( multilib? ( app-emulation/emul-linux-x86-xlibs ) )

please add them
Comment 19 Rene Meier 2009-07-16 07:40:20 UTC
Created attachment 198134 [details]
patch

you can also apply this patch. it should fix all issues mentioned here.
Comment 20 Paul Tobias 2009-07-16 08:22:54 UTC
I can confirm, that the patch from Rene in comment #19 fixes both the build and the revdep-rebuild issues for me.
Comment 21 Tomáš Chvátal (RETIRED) gentoo-dev 2009-07-16 09:25:19 UTC
Okey,
Thanks for spotting.
Applied again :]