# ati-drivers-8.573-r1 not compiling

## unstoppable_chi

just got a new video card, wanted to support open source, so i got an ATI 4850 but i am having install issues =/

anyway this is the build log after doing an emerge ati-drivers.

```
 

 ^[[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.28-gentoo-r2/build

 ^[[32;01m*^[[0m Found sources for kernel version:

 ^[[32;01m*^[[0m     2.6.28-gentoo-r2

>>> Unpacking source...

Warning: target directory exists /var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work

Verifying archive integrity... All good.

Uncompressing ATI Proprietary Linux Driver-8.573... (mod edit -- took off dots that broke phpbb, pilla)

 ^[[32;01m*^[[0m Applying ati-drivers-xen-8.552.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-8.573-r1/work/extra

>>> Source unpacked in /var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work

>>> Compiling source in /var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/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.28-gentoo-r2 KDIR=/usr/src/linux kmod_build

make -C /usr/src/linux M=/var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x modules

make[1]: Entering directory `/usr/src/linux-2.6.28-gentoo-r2'

  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o

  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o

  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.o

  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.o

  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.o

  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o

/var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function 'KCL_MEM_VM_GetRegionPhysAddrStr':

/var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3266: warning: return makes pointer from integer without a cast

/var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3267: warning: return makes pointer from integer without a cast

/var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3268: warning: return makes pointer from integer without a cast

/var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:3270: warning: return makes pointer from integer without a cast

  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_io.o

  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_pci.o

  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_str.o

  CC [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_wait.o

  LD [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/fglrx.o

  Building modules, stage 2.

  MODPOST 1 modules

  CC      /var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/fglrx.mod.o

  LD [M]  /var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/lib/modules/fglrx/build_mod/2.6.x/fglrx.ko

make[1]: Leaving directory `/usr/src/linux-2.6.28-gentoo-r2'

 ^[[32;01m*^[[0m Building fgl_glxgears

In file included from fgl_glxgears.c:70:

/var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/work/common/usr/include/GL/glATI.h:3597:1: warning: "GL_ATI_texture_env_combine3" redefined

In file included from /usr/include/GL/gl.h:2150,

                 from /usr/include/GL/glu.h:38,

                 from fgl_glxgears.c:59:

/usr/include/GL/glext.h:6606:1: warning: this is the location of the previous definition

/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lGL

collect2: ld returned 1 exit status

 ^[[31;01m*^[[0m

 ^[[31;01m*^[[0m ERROR: x11-drivers/ati-drivers-8.573-r1 failed.

 ^[[31;01m*^[[0m Call stack:

 ^[[31;01m*^[[0m               ebuild.sh, line   49:  Called src_compile

 ^[[31;01m*^[[0m             environment, line 3327:  Called die

 ^[[31;01m*^[[0m The specific snippet of code:

 ^[[31;01m*^[[0m       "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU -I"${S}"/common/usr/include fgl_glxgears.c -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed";

 ^[[31;01m*^[[0m  The die message:

 ^[[31;01m*^[[0m   fgl_glxgears build failed

 ^[[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-8.573-r1/temp/build.log'.

 ^[[31;01m*^[[0m The ebuild environment file is located at '/var/tmp/portage/x11-drivers/ati-drivers-8.573-r1/temp/environment'.

 ^[[31;01m*^[[0m

```

lspci

```

00:00.0 Host bridge: VIA Technologies, Inc. K8M890CE Host Bridge

00:00.1 Host bridge: VIA Technologies, Inc. K8M890CE Host Bridge

00:00.2 Host bridge: VIA Technologies, Inc. K8M890CE Host Bridge

00:00.3 Host bridge: VIA Technologies, Inc. K8M890CE Host Bridge

00:00.4 Host bridge: VIA Technologies, Inc. K8M890CE Host Bridge

00:00.5 PIC: VIA Technologies, Inc. K8M890CE I/O APIC Interrupt Controller

00:00.6 Host bridge: VIA Technologies, Inc. Device 6290

00:00.7 Host bridge: VIA Technologies, Inc. K8M890CE Host Bridge

00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI bridge [K8T800/K8T890 South]

00:02.0 PCI bridge: VIA Technologies, Inc. K8T890 PCI to PCI Bridge Controller

00:03.0 PCI bridge: VIA Technologies, Inc. K8T890 PCI to PCI Bridge Controller

00:0f.0 IDE interface: VIA Technologies, Inc. VT8237A SATA 2-Port Controller (rev 80)

00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 07)

00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)

00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)

00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)

00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev a0)

00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)

00:11.0 ISA bridge: VIA Technologies, Inc. VT8237A PCI to ISA Bridge

00:11.7 Host bridge: VIA Technologies, Inc. VT8251 Ultra VLINK Controller

00:13.0 PCI bridge: VIA Technologies, Inc. VT8237A Host Bridge

00:13.1 PCI bridge: VIA Technologies, Inc. VT8237A PCI to PCI Bridge

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

02:00.0 VGA compatible controller: ATI Technologies Inc RV770 [Radeon HD 4850]

02:00.1 Audio device: ATI Technologies Inc HD48x0 audio

04:01.0 Audio device: VIA Technologies, Inc. VT1708/A [Azalia HDAC] (VIA High Definition Audio Controller) (rev 10)

05:09.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

```

i'm stuck =(

----------

## audiodef

Do you have the right use flags set and is the kernel configured properly?

----------

## unstoppable_chi

i used genkernel all.  these are my useflags

```

CFLAGS="-march=athlon64 -O2 -pipe -msse3 "

CXXFLAGS="${CFLAFS}"

CHOST="x86_64-pc-linux-gnu"

MAKEOPTS="-j3"

INPUT_DEVICES="keyboard mouse"

VIDEO_CARDS="fglrx"

USE="sse sse2 sse3 john -wifi -ldap mpeg mikmod -savedconfig \

 -glitz -svg gecko-sdk dbus vorbis mad ogg mp3 \

 aac -nls visualization aalib alsa truetype qt3 symlink -esd threads \

 ipod xine -xinerama gif jpeg png ldap real a52 crypt libcaca -apache2 \

 mono jabber msn openssl oscar yahoo pic live bzip2 nsplugin \

 hal howl ati dri win32codecs xvid quicktime ppds -bindist \

 cups -doc -ipv6 -nfs -dlloader pam opengl xv gtk -gnome -qt \

 -kde dvd dvdr dvdread -arts cdr mmx mmx2 bitmap-fonts truetype-fonts \=

 type1-fonts X java bash-completion pdf 3dnow 3dnow2"

```

----------

## audiodef

I'll have to defer to a genkernel whiz, then, as I compile all my kernels. Hope ya nab it!

----------

## lithen

is there some kind of ati option available with genkernel? it would be so easy then just "genkernel -ati all" or something  :Very Happy: 

----------

## quis3.50

 *Quote:*   

> 
> 
> ```
>   ...MODPOST 1 modules
> 
> ...

 

Try to review your current OpenGL profile with

```
eselect opengl list
```

If you do not have an ati-driver installed, but the current active profile is still set to "ati" the above behavior may accure.

Try to

```
eselect opengl set xorg-x11
```

and emerge ati-drivers. This solved the issue on my box.

Good luck!Last edited by quis3.50 on Sun Mar 08, 2009 8:45 pm; edited 1 time in total

----------

## Leon_UK

 *quis3.50 wrote:*   

> 
> 
> Try to
> 
> ```
> ...

 

I believe that should be 

```
eselect opengl set xorg-x11
```

----------

## quis3.50

 *Leon_UK wrote:*   

> 
> 
> I believe that should be 
> 
> ```
> ...

 

of course your right  :Wink: 

----------

