Bug 2208

Summary: FTBFS against 3.2.9-1.fc16 for catalyst
Product: Fedora Reporter: Nicolas Chauvet <kwizart>
Component: catalyst-kmodAssignee: Stewart Adam <s.adam>
Status: RESOLVED FIXED    
Severity: normal CC: ben.lewis, jan.public, kendrew71, kwizart, lubek, nikkej, pierre-bugzilla, rpmfusion, sharp, stotty, thomas.frick
Priority: P5    
Version: 16   
Hardware: i386   
OS: GNU/Linux   
namespace:
Attachments: the possible fix for catalyst-kmod-12-2 and kernel >= 3.2.9
the possible fix for catalyst-kmod-12-2 and kernel >= 3.2.9.ix86
build patch

Description Nicolas Chauvet 2012-03-02 13:31:39 CET
+ pushd _kmod_build_3.2.9-1.fc16.i686/lib/modules/fglrx/build_mod/2.6.x
~/build/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-1.fc16.i686/lib/modules/fglrx/build_mod/2.6.x ~/build/BUILD/catalyst-kmod-12.1
+ make CC=gcc PAGE_ATTR_FIX=0 KVER=3.2.9-1.fc16.i686 KDIR=/usr/src/kernels/3.2.9-1.fc16.i686
make -C /usr/src/kernels/3.2.9-1.fc16.i686 SUBDIRS=/builddir/build/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-1.fc16.i686/lib/modules/fglrx/build_mod/2.6.x modules
make[1]: Entering directory `/usr/src/kernels/3.2.9-1.fc16.i686'
  CC [M]  /builddir/build/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-1.fc16.i686/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o
In file included from /builddir/build/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-1.fc16.i686/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:192:0:
/builddir/build/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-1.fc16.i686/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.h:202:5: warning: "_DEBUG" is not defined [-Wundef]
/builddir/build/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-1.fc16.i686/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function 'KCL_fpu_begin':
/builddir/build/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-1.fc16.i686/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:5802:28: error: 'TS_USEDFPU' undeclared (first use in this function)
/builddir/build/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-1.fc16.i686/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:5802:28: note: each undeclared identifier is reported only once for each function it appears in
/builddir/build/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-1.fc16.i686/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: At top level:
/builddir/build/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-1.fc16.i686/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.h:162:16: warning: 'module_log_map' defined but not used [-Wunused-variable]
/builddir/build/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-1.fc16.i686/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.h:175:19: warning: 'module_type_map' defined but not used [-Wunused-variable]
make[2]: *** [/builddir/build/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-1.fc16.i686/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o] Error 1
make[1]: Leaving directory `/usr/src/kernels/3.2.9-1.fc16.i686'
make[1]: *** [_module_/builddir/build/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-1.fc16.i686/lib/modules/fglrx/build_mod/2.6.x] Error 2



Found several infos over lkml for a potential fix (see kvm.c) :
https://lkml.org/lkml/2012/2/22/426
https://lkml.org/lkml/2012/2/23/523
Comment 1 Nicolas Chauvet 2012-03-07 14:06:50 CET
*** Bug 2214 has been marked as a duplicate of this bug. ***
Comment 2 Lubos Stanek 2012-03-13 12:32:40 CET
Created attachment 827 [details]
the possible fix for catalyst-kmod-12-2 and kernel >= 3.2.9

I cannot test it currently without a required hardware.

The catalyst-kmod-12-2 package builds cleanly with this fix for F16.
Apply it similarly like the compat_alloc patch.
Comment 3 Lubos Stanek 2012-03-13 12:42:51 CET
Oops!
It does not solve the missing FP identifier.
Going back to work. :-)
Comment 4 Lubos Stanek 2012-03-13 12:56:46 CET
Created attachment 828 [details]
the possible fix for catalyst-kmod-12-2 and kernel >= 3.2.9.ix86

See http://forums.opensuse.org/forums/english/other-forums/development/programming-scripting/449058-upgrading-ati-driver-atiupgrade-14.html

Both patches are required for the successful build.
Comment 5 Nicolas Chauvet 2012-03-13 13:39:48 CET
1/ I'm not interested to ear anyone that cannot do runtime tests.
2/ I would like to avoid using crap found in over the web.

As I said ALREADY! please look at kvm/vmx.c that looks to have the right way to fix the situation.
Comment 6 Nicolas Chauvet 2012-03-13 15:10:36 CET
OK, I've read the patch again and it seems to use the same kind of fix as kvm/vmx.c. I thought it was different because of + preempt_disable(); but it is disabled in both cases.

Now I wonder if this would apply on 12.2 and If it won't be better to wait for 12.3 instead to avoid applying a patch that would possibly brick any hardware.
(remembering the nvidia update that was bricking laptop from a given vendor).
Comment 7 Nicolas Chauvet 2012-03-17 14:54:45 CET
*** Bug 2230 has been marked as a duplicate of this bug. ***
Comment 8 Nicolas Chauvet 2012-03-17 15:00:18 CET
Ok, So now I need someone to volunteer to take over maintainance of catalyst
(along with stewart, the current maintainer). 
With taking the responsability to apply the patch, I would like someone to update to the lastest catalyst to date. (12.02) same as a review process.

Please reminds that I have no care for this package personnaly. so don't ask me to blindly apply anything. Again, I'm only seeking for a responsible for the package.
Comment 9 Stewart Adam 2012-03-17 21:31:01 CET
(In reply to comment #8)
> Ok, So now I need someone to volunteer to take over maintainance of catalyst
> (along with stewart, the current maintainer). 
> With taking the responsability to apply the patch, I would like someone to
> update to the lastest catalyst to date. (12.02) same as a review process.
> 
> Please reminds that I have no care for this package personnaly. so don't ask me
> to blindly apply anything. Again, I'm only seeking for a responsible for the
> package.
I got a change to look at this briefly today, but I realized that during my OS reinstallation I accidentally installed from my i686 LiveUSB key instead of x86_64. I don't have the time to reinstall x86_64 and test if it works there (the last few posts in  OpenSuSE forum claim problems patching on x86_64) so if someone wants to look into this it would be much appreciated.
Comment 10 Nicolas Chauvet 2012-03-19 23:02:28 CET
I think the last build failed on x86_64 also for F-15
http://buildsys.rpmfusion.org/logs/fedora-15-rpmfusion_nonfree/12436-catalyst-kmod-11.11-1.fc15.17/x86_64/build.log
Comment 11 Stewart Adam 2012-03-21 19:18:16 CET
*** Bug 2238 has been marked as a duplicate of this bug. ***
Comment 12 Stewart Adam 2012-03-22 16:09:15 CET
*** Bug 2241 has been marked as a duplicate of this bug. ***
Comment 13 Stewart Adam 2012-03-23 05:47:31 CET
*** Bug 2247 has been marked as a duplicate of this bug. ***
Comment 14 Juha Nikkanen 2012-03-26 10:59:53 CEST
As a comment for attachment 827 [details], I think it is not programmatic-ally correct to tie pair #ifdef WARN #undef WARN to Linux kernel version because it doesn't really depend on it. Instead, Macro WARN from bug.h is colliding with kcl_debug.h when CONFIG_DEBUG_VM is defined so #undef WARN should depend on CONFIG_DEBUG_VM. But even then, enumeration elements kcl_debug.h shall not have overlapping names so they should be prefixed properly. See http://forums.fedoraforum.org/showthread.php?t=277547
Comment 15 leigh scott 2012-03-27 13:50:28 CEST
Created attachment 844 [details]
build patch

(In reply to comment #14)
> As a comment for attachment 827 [details], I think it is not programmatic-ally correct to
> tie pair #ifdef WARN #undef WARN to Linux kernel version because it doesn't
> really depend on it. Instead, Macro WARN from bug.h is colliding with
> kcl_debug.h when CONFIG_DEBUG_VM is defined so #undef WARN should depend on
> CONFIG_DEBUG_VM. But even then, enumeration elements kcl_debug.h shall not have
> overlapping names so they should be prefixed properly. See
> http://forums.fedoraforum.org/showthread.php?t=277547

Your patch addresses the build issue.

Processing files: catalyst-kmod-debuginfo-12.2-1.fc16.x86_64
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/leigh/rpmbuild/BUILDROOT/catalyst-kmod-12.2-1.fc16.x86_64
Wrote: /home/leigh/rpmbuild/RPMS/x86_64/akmod-catalyst-12.2-1.fc16.x86_64.rpm
Wrote: /home/leigh/rpmbuild/RPMS/x86_64/kmod-catalyst-12.2-1.fc16.x86_64.rpm
Wrote: /home/leigh/rpmbuild/RPMS/x86_64/kmod-catalyst-3.3.0-4.fc16.x86_64-12.2-1.fc16.x86_64.rpm
Wrote: /home/leigh/rpmbuild/RPMS/x86_64/catalyst-kmod-debuginfo-12.2-1.fc16.x86_64.rpm