# [SOLVED] LIBDRM does not build for Radeon

## jos1

EDIT: I solved this issue already. This error is produced when VIDEO_CARDS="radeon", the disable-radeons are from r300, r600, so if i set this to VIDEO_CARDS="radeon r300 r600". For me this looks like a bug. 

Hi,

Can someone help me with this:

I have 'radeon' in my VIDEO_CARDS-var in make.conf I use xf86-video-ati as driver together with the radeon-ucode firmware, and KMS-enabled in the kernel.

When I run emerge libdrm this Radeon is recognized:

```
USE:        amd64 elibc_glibc kernel_linux libkms multilib userland_GNU video_cards_radeon
```

This is also passed as --enable-radeon BUT also --disable-radeon and --disable-radeon. 

```

/var/tmp/portage/x11-libs/libdrm-2.4.26/work/libdrm-2.4.26/configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --disable-dependency -dependency-tracking --enable-shared --disable-static --disable-dependency-tracking --enable-udev --disable-intel --disable-nouveau-experimental-api --enable-radeon --disable-radeon --disable-radeon --disable-vmwgfx-experimental-api --enable-libkms

```

So I will end up with libdrm WITHOUT radeon support

```

libdrm 2.4.26 will be compiled with:

  libkms         yes

  Intel API      no

  vmwgfx API     no

  Radeon API     no

  Nouveau API    no

```

How to solve?

Thanks Jos

Full start until Configure

```

^[[32;01m * ^[[39;49;00mPackage:    x11-libs/libdrm-2.4.26

^[[32;01m * ^[[39;49;00mRepository: gentoo

^[[32;01m * ^[[39;49;00mMaintainer: x11@gentoo.org

^[[32;01m * ^[[39;49;00mUSE:        amd64 elibc_glibc kernel_linux libkms multilib userland_GNU video_cards_radeon

^[[32;01m * ^[[39;49;00mFEATURES:   ccache preserve-libs sandbox

>>> Unpacking source...

>>> Unpacking libdrm-2.4.26.tar.bz2 to /var/tmp/portage/x11-libs/libdrm-2.4.26/work

>>> Source unpacked in /var/tmp/portage/x11-libs/libdrm-2.4.26/work

>>> Preparing source in /var/tmp/portage/x11-libs/libdrm-2.4.26/work/libdrm-2.4.26 ...

 ^[[33;01m*^[[0m QA Notice: The 'hasq' function is deprecated (replaced by 'has')

 ^[[32;01m*^[[0m Applying libdrm-2.4.23-solaris.patch ...

^[[A^[[88C ^[[34;01m[ ^[[32;01mok^[[34;01m ]^[[0m

 ^[[32;01m*^[[0m Running elibtoolize in: libdrm-2.4.26/

 ^[[32;01m*^[[0m   Applying portage/2.2 patch ...

 ^[[32;01m*^[[0m   Applying sed/1.5.6 patch ...

 ^[[32;01m*^[[0m   Applying as-needed/2.2.6 patch ...

 ^[[32;01m*^[[0m Running elibtoolize in: libdrm-2.4.26/build-aux/

 ^[[32;01m*^[[0m   Applying portage/2.2 patch ...

 ^[[32;01m*^[[0m   Applying sed/1.5.6 patch ...

 ^[[32;01m*^[[0m   Applying as-needed/2.2.6 patch ...

>>> Source prepared.

>>> Configuring source in /var/tmp/portage/x11-libs/libdrm-2.4.26/work/libdrm-2.4.26 ...

>>> Working in BUILD_DIR: "/var/tmp/portage/x11-libs/libdrm-2.4.26/work/libdrm-2.4.26_build"

 * econf: updating libdrm-2.4.26/build-aux/config.sub with /usr/share/gnuconfig/config.sub

 * econf: updating libdrm-2.4.26/build-aux/config.guess with /usr/share/gnuconfig/config.guess

 * econf: updating libdrm-2.4.26/config.sub with /usr/share/gnuconfig/config.sub

 * econf: updating libdrm-2.4.26/config.guess with /usr/share/gnuconfig/config.guess

/var/tmp/portage/x11-libs/libdrm-2.4.26/work/libdrm-2.4.26/configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --disable-dependency -dependency-tracking --enable-shared --disable-static --disable-dependency-tracking --enable-udev --disable-intel --disable-nouveau-experimental-api --enable-radeon --disable-radeon --disable-radeon --disable-vmwgfx-experimental-api --enable-libkms

libdir=/usr/lib64 --disable-dependency$

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

(etc) (etc)

```

----------

