Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 344775 - x11-drivers/ati-drivers-10.10 fails to build on vserver-sources
Summary: x11-drivers/ati-drivers-10.10 fails to build on vserver-sources
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Luca Barbato
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 342267
  Show dependency tree
 
Reported: 2010-11-09 07:30 UTC by kiorky
Modified: 2010-11-09 20:07 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 kiorky 2010-11-09 07:30:55 UTC
make -j1 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= GCC_VER_MAJ=4 KVER=2.6.35-vs2.3.0.36.32-gentoo KDIR=/usr/src/linux kmod_build
make -C /usr/src/linux M=/usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: entrant dans le répertoire « /usr/src/linux-2.6.35-vserver-2.3.0.36.32 »
  CC [M]  /usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
/usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘KCL_MapPageToPfn’:
/usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1646: attention : unused variable ‘bus_addr’
  CC [M]  /usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o
  CC [M]  /usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.o
  CC [M]  /usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.o
  CC [M]  /usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o
/usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c: In function ‘KCL_IOCTL_AllocUserSpace32’:
/usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:196: erreur: implicit declaration of function ‘COMPAT_ALLOC_USER_SPACE’
/usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:196: attention : initialization makes pointer from integer without a cast
make[2]: *** [/usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o] Erreur 1
make[1]: *** [_module_/usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x] Erreur 2
make[1]: quittant le répertoire « /usr/src/linux-2.6.35-vserver-2.3.0.36.32 »
make: *** [kmod_build] Erreur 2
emake failed
Comment 1 kiorky 2010-11-09 07:31:21 UTC
First traceback is the one i get with the intree ebuild
Comment 2 kiorky 2010-11-09 07:33:42 UTC
now if i take the ebuild in my overlay:
http://hg.cryptelium.net/hg/system/gentoo/overlay/

with making the 2.6.36 patch applying on 2.5.35 too, it goes further but fails also without the CVE fix:

make -j1 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= GCC_VER_MAJ=4 KVER=2.6.35-vs2.3.0.36.32-gentoo KDIR=/usr/src/linux kmod_build 
make -C /usr/src/linux M=/usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: entrant dans le répertoire « /usr/src/linux-2.6.35-vserver-2.3.0.36.32 »
  CC [M]  /usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
/usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘KCL_MapPageToPfn’:
/usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:1646: attention : unused variable ‘bus_addr’
  CC [M]  /usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o
  CC [M]  /usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_agp.o
  CC [M]  /usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.o
  CC [M]  /usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o
/usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c: In function ‘KCL_IOCTL_AllocUserSpace32’:
/usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:196: erreur: implicit declaration of function ‘COMPAT_ALLOC_USER_SPACE’
/usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.c:196: attention : initialization makes pointer from integer without a cast
make[2]: *** [/usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x/kcl_ioctl.o] Erreur 1
make[1]: *** [_module_/usr/local/tmp/portage/x11-drivers/ati-drivers-10.10/work/common/lib/modules/fglrx/build_mod/2.6.x] Erreur 2
make[1]: quittant le répertoire « /usr/src/linux-2.6.35-vserver-2.3.0.36.32 »
make: *** [kmod_build] Erreur 2
emake failed
 * ERROR: x11-dri
Comment 3 kiorky 2010-11-09 07:35:51 UTC
To reproduce, take my 'vserver' kernel config here :

http://hg.cryptelium.net/hg/system/config/kernels/file/tip/linux

then, make and !!!boot!!! on that kernel.

From there, you should be able to reproduce.
Comment 4 kiorky 2010-11-09 08:34:13 UTC
Note to myself: never do a bugreport next to waking up.
So, the 2.6.36 patch editing to make it run on 2.6.35+ is useless i think.
However, on vserver sources at least for now, we need the CVE patch bits in case of a 64 bits kernel where the 32 compat fmag is enabled.
Unless, it will fail will the given traceback
Comment 5 Enrico Tagliavini 2010-11-09 12:30:14 UTC
(In reply to comment #0)
> make -j1 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu-
> LDFLAGS= GCC_VER_MAJ=4 KVER=2.6.35-vs2.3.0.36.32-gentoo KDIR=/usr/src/linux
> kmod_build

There is something really odd here. Are you sure you are using the portage tree ebuild? It should look like

make -j3 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= GCC_VER_MAJ=4 KVER=2.6.35-gentoo-r8 KDIR=/usr/src/linux 'CFLAGS_MODULE+=-DMODULE -DATI -DFGL' CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space kmod_build

i really can't understand what's happening here. the ebuild code is gives no choice about those options. see http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-10.10.ebuild?view=markup lines 256-262
Comment 6 kiorky 2010-11-09 15:19:24 UTC
Read the bug report and you ll see i'm using my ebuild.
Comment 7 kiorky 2010-11-09 15:28:29 UTC
On the other hand, you ll see that the module Makefile calls another makefile while wiping the environment, that's why my ebuild do 

if grep -q compat_alloc_user_space ${KV_DIR}/include/linux/compat.h ; then
    epatch "${FILESDIR}"/ati-drivers-CVE-2010-3081-fix.patch || \
    die "epatch ati-drivers-CVE-2010-3081-fix.patch failed"
fi

instead of exporting things into the environment BECAUSE it is ignored by the final makefile building the module resulting in a #fail.
Comment 8 kiorky 2010-11-09 15:29:36 UTC
Im thinking also that you didn't check my overlay at first, so check also the updated patches in files/.
Comment 9 Enrico Tagliavini 2010-11-09 16:01:00 UTC
i checked it carefully, but still this makes no sense for me. when needed the ebuild feeds BUILD_PARAMS with CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" and this reaches the kernel Makefile here -> COMPAT_ALLOC_USER_SPACE is defined -> it compiles with no problems. 
This code was inspired by the ati-drivers installer script (make.sh) boundled with the driver itself. it does exactly the same thing (except it uses MODFLAGS istead of CFLAGS_MODULE).
Comment 10 kiorky 2010-11-09 20:07:45 UTC
Fine...
I have the skill to handle it myself.

It will just be dropped in my overlay ...

All technical details are now on the bug reports, specially the makefile call subtility which wipes your params that are maybe feeded in the env. at first but wiped afterall during the second make call.

I ve spent too much time & energy now to get this fixed.

Sad for other users in same case which will just use 'radeon' or just take things from my overlay if they are bitten by this bug.

Good evening.