 |
 |
 |
 |
| Hardware & Laptops Help with your hardware, including laptop issues |

13th March 2012, 02:18 AM
|
|
Registered User
|
|
Join Date: Mar 2012
Location: Montreal
Posts: 5

|
|
|
F16 ATI Catalyst module build problem
Hello, I've just come to Fedora from Debian a few days ago and find myself in a bit of trouble with building a kernel module for the ATI Catalyst driver (for HD 5800). Various posts suggest that akmods (similar to Debian's DKMS) is the best way to go so that's where I started. After installing akmod-catalyst and realizing that no module was generated, I tried:
Code:
% sudo akmods --force
/usr/sbin/akmods: line 145: ulimit: core file size: cannot modify limit: Invalid argument
Checking kmods exist for 3.2.9-2.fc16.x86_64 [ OK ]
Building and installing catalyst-kmod [FAILED]
Building rpms failed; see /var/cache/akmods/catalyst/12.1-1-for-3.2.9-2.fc16.x86_64.failed.log for details
Hint: Some kmods were ignored or failed to build or install.
You can try to rebuild and install them by by calling
'/usr/sbin/akmods --force' as root.
Checking the specified log file, the highlights seem to be:
Code:
12 Mar 20:59:06 akmods: Building RPM using the command '/usr/bin/akmodsbuild --target x86_64 --kernels 3.2.9-2.fc16.x86_64 /usr/src/akmods/catalyst-kmod.latest'
/tmp/akmodsbuild.0JR0K814/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-2.fc16.x86_64/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.h:202:5: warning: "_DEBUG" is not defined [-Wundef]
/tmp/akmodsbuild.0JR0K814/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-2.fc16.x86_64/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.h:162:16: warning: 'module_log_map' defined but not used [-Wunused-variable]
/tmp/akmodsbuild.0JR0K814/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-2.fc16.x86_64/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.h:175:19: warning: 'module_type_map' defined but not used [-Wunused-variable]
CC [M] /tmp/akmodsbuild.0JR0K814/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-2.fc16.x86_64/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o
In file included from /tmp/akmodsbuild.0JR0K814/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-2.fc16.x86_64/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.c:33:0:
/tmp/akmodsbuild.0JR0K814/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-2.fc16.x86_64/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.h:202:5: warning: "_DEBUG" is not defined [-Wundef]
In file included from /usr/src/kernels/3.2.9-2.fc16.x86_64/arch/x86/include/asm/uaccess.h:575:0,
from include/asm-generic/termios.h:51,
from /usr/src/kernels/3.2.9-2.fc16.x86_64/arch/x86/include/asm/termios.h:1,
from include/linux/termios.h:5,
from include/linux/tty.h:41,
from include/linux/vt_kern.h:11,
from /tmp/akmodsbuild.0JR0K814/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-2.fc16.x86_64/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.c:35:
/usr/src/kernels/3.2.9-2.fc16.x86_64/arch/x86/include/asm/uaccess_64.h: In function 'copy_from_user':
/usr/src/kernels/3.2.9-2.fc16.x86_64/arch/x86/include/asm/uaccess_64.h:57:7: error: called object '2' is not a function
/tmp/akmodsbuild.0JR0K814/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-2.fc16.x86_64/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.c: At top level:
/tmp/akmodsbuild.0JR0K814/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-2.fc16.x86_64/lib/modules/fglrx/build_mod/2.6.x/kcl_debug.h:162:16: warning: 'module_log_map' defined but not used [-Wunused-variable]
/tmp/akmodsbuild.0JR0K814/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-2.fc16.x86_64/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]: *** [/tmp/akmodsbuild.0JR0K814/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-2.fc16.x86_64/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.o] Error 1
make[1]: *** [_module_/tmp/akmodsbuild.0JR0K814/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-2.fc16.x86_64/lib/modules/fglrx/build_mod/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.2.9-2.fc16.x86_64'
make: *** [kmod_build] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.hKSYWC (%build)
...
...
...
12 Mar 20:59:10 akmodsbuild: from /tmp/akmodsbuild.0JR0K814/BUILD/catalyst-kmod-12.1/_kmod_build_3.2.9-2.fc16.x86_64/lib/modules/fglrx/build_mod/2.6.x/kcl_acpi.c:35:
12 Mar 20:59:10 akmodsbuild: /usr/src/kernels/3.2.9-2.fc16.x86_64/arch/x86/include/asm/uaccess_64.h: In function 'copy_from_user':
12 Mar 20:59:10 akmodsbuild: /usr/src/kernels/3.2.9-2.fc16.x86_64/arch/x86/include/asm/uaccess_64.h:57:7: error: called object '2' is not a function
...
Poking around the internet, I don't find much reference to the same problem aside from a few build.log files that look similar (with no background or resolution nearby). I then tried to install the Catalyst drivers directly from AMD and was notified of an error in building the module with a log dumped in /usr/share/ati/fglrx-install.log. In this file was the exact same error...
Does anyone have any idea what may be going on here?
Thanks,
bnahill
Last edited by bnahill; 13th March 2012 at 02:20 AM.
Reason: Typo...
|

13th March 2012, 03:02 AM
|
|
Registered User
|
|
Join Date: Mar 2012
Location: Spain
Posts: 1

|
|
|
Re: F16 ATI Catalyst module build problem
I'm in the same situation... ati 5850
PHP Code:
Errors during DKMS module removal
Uninstall fglrx driver complete.
For detailed log of uninstall, please see /etc/ati/fglrx-uninstall.log
System must be rebooted to avoid system instability and potential data loss.
/usr/share/ati/amd-uninstall.sh completed with 0
Creating symlink /var/lib/dkms/fglrx/8.95/source ->
/usr/src/fglrx-8.95
DKMS: add completed.
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area....
cd /var/lib/dkms/fglrx/8.95/build; sh make.sh --nohints --uname_r=3.2.10-1.fc16.x86_64 --norootcheck....(bad exit status: 1)
[Error] Kernel Module : Failed to build fglrx-8.95 with DKMS
[Error] Kernel Module : Removing fglrx-8.95 from DKMS
------------------------------
Deleting module version: 8.95
completely from the DKMS tree.
------------------------------
Done.
[Reboot] Kernel Module : dracut
any solution? my os is x64
I found this: http://phoronix.com/forums/showthrea...86-32-bit-arch
but is for 32bit...
|

13th March 2012, 10:21 AM
|
|
Registered User
|
|
Join Date: Apr 2010
Location: Earth
Posts: 858

|
|
|
Re: F16 ATI Catalyst module build problem
the catalyst packages on rpmfusion are still based on Catalyst 12.1. IMHO it makes sense to either use the default radeon driver or if this is not good enough install Catalyst 12.2 from the ati.amd.com site.
Catalyst 12.1 has some annoying bugs with xv video driver output, when the xorg version of Fedora 16 is used.
I prefer the driver from ati.amd.com and the kmod-catalyst to the akmod-catalyst. akmod-catalyst often fails and hardly anyone can say why. If you install the driver from ati.amd.com, make sure that you also uninstall the already installed *catalyst* packages. You will also need kernel-devel and kernel-headers, fontconfig, gcc, etc.
Currently under Fedora 17 pre-release I don't use the Catalyst, because it doesn't work with this xorg version and kernel. A way would be to downgrade these versions, but it's to much work and could maybe fail. So I use the default driver now.
|

13th March 2012, 12:49 PM
|
|
Registered User
|
|
Join Date: Mar 2012
Location: Montreal
Posts: 5

|
|
|
Re: F16 ATI Catalyst module build problem
Thanks, Fenrin. I failed to mention that the package that I tried to install from the ATI site was 12.2. As such, I have failed to build a module for either 12.1 or 12.2 and the failure is not in any fglrx-specific code, but rather a common header file, leading me to believe that I messed up some sort of configuration on this end but I haven't made much progress at all in diagnosing the problem.
Thanks,
bnahill
|

14th March 2012, 09:14 PM
|
|
Registered User
|
|
Join Date: Mar 2012
Location: Vd
Posts: 1

|
|
|
Re: F16 ATI Catalyst module build problem
as a workaround, in "/usr/src/kernels/3.2.9-2.fc16.x86_64/arch/x86/include/asm/uaccess_64.h"
line 56/57 there is
else
WARN(1, "Buffer overflow detected!\n");
if you comment out both, it works:
// else
// WARN(1, "Buffer overflow detected!\n");
|

14th March 2012, 09:22 PM
|
|
Registered User
|
|
Join Date: Mar 2012
Location: Montreal
Posts: 5

|
|
|
Re: F16 ATI Catalyst module build problem
Heh, I hadn't even thought to do that since I figured it was a larger problem that wouldn't be fixed directly by cleaning up the superficial error behind it... I guess it may be a problem with this specific kernel release. Has anybody had the same problem with different kernel releases?
I'll try this fix out when I get home.
Thanks,
bnahill
|

15th March 2012, 12:56 AM
|
|
Guest
|
|
Posts: n/a

|
|
|
Re: F16 ATI Catalyst module build problem
I would hazard a guess it is something to do with this commit:
* Fri Mar 2 12:00:00 2012 Dave Jones <davej@redhat.com>
- Enable VM debugging in non-debug kernels too.
yum changelog 03/01/2012 kernel-headers-3.2.9-2.fc16.x86_64
|

15th March 2012, 01:12 AM
|
|
Registered User
|
|
Join Date: Mar 2012
Location: Montreal
Posts: 5

|
|
|
Re: F16 ATI Catalyst module build problem
Ah yes... I was thinking of checking the commit log on that one but have just been too busy.
|

15th March 2012, 04:09 AM
|
|
Registered User
|
|
Join Date: Aug 2007
Posts: 18

|
|
|
Re: F16 ATI Catalyst module build problem
Thanks Carlokok, I edited that header file and could install akmod 12.1 from rpmfusion and do an akmod --force , worked fine under newly installed f16 (plus updates) so new kernel etc.
|

15th March 2012, 04:35 AM
|
|
Registered User
|
|
Join Date: Mar 2012
Location: Montreal
Posts: 5

|
|
|
Re: F16 ATI Catalyst module build problem
Indeed, thanks for the tip, carlokok! Everything's working perfectly now. I just figured there was something I was doing wrong with Fedora and akmod since this appeared on my first day using it...
|

15th March 2012, 03:54 PM
|
|
Registered User
|
|
Join Date: Jul 2005
Age: 52
Posts: 1,013

|
|
|
Re: F16 ATI Catalyst module build problem
Thanks for the heads up on the build problem.
|

24th March 2012, 10:32 AM
|
|
Registered User
|
|
Join Date: May 2008
Posts: 3

|
|
|
Re: F16 ATI Catalyst module build problem
Quote:
Originally Posted by carlokok
as a workaround, in "/usr/src/kernels/3.2.9-2.fc16.x86_64/arch/x86/include/asm/uaccess_64.h"
line 56/57 there is
else
WARN(1, "Buffer overflow detected!\n");
if you comment out both, it works:
// else
// WARN(1, "Buffer overflow detected!\n");
|
same error for FC15 2.6.42.9-2.fc15.x86_64..
thanks to carlokok, his fix works for me
|

25th March 2012, 12:08 PM
|
|
Registered User
|
|
Join Date: Mar 2012
Location: Finland
Posts: 1

|
|
|
Re: F16 ATI Catalyst module build problem
Actually, this problem comes from Catalyst open source part of codes as there is kind of a namespace collision. I.e. macro WARN from kernel bug.h collides enumeration that is declared in ATI's kcl_debug.h and used in kcl_debug.c. And this collision is there with both 12.1 and 12.2 Catalyst drivers.
Enabling VM debug in kernels from 3.2.9 just reveals this collision. Proper fix would be to patch kcl_debug*[c|h] like:
Code:
--- lib/modules/fglrx/build_mod/kcl_debug.h 2012-02-29 22:34:52.000000000 +0200
+++ lib/modules/fglrx/build_mod/kcl_debug.h 2012-03-22 13:56:37.441824720 +0200
@@ -85,8 +85,8 @@
#ifdef ERROR
#undef ERROR
#endif
-#ifdef WARN
-#undef WARN
+#ifdef KCL_WARN
+#undef KCL_WARN
#endif
#ifdef INFO
#undef INFO
@@ -122,7 +122,7 @@
{
SPECIAL = 0,
ERROR ,
- WARN ,
+ KCL_WARN ,
INFO ,
INFOEX,
TRACE,
@@ -160,7 +160,7 @@
}log_map;
-#define DEFAULT_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX) |___BIT(ERROR) |___BIT(WARN) | ___BIT(TRACE)| ___BIT(SPECIAL) ))
+#define DEFAULT_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX) |___BIT(ERROR) |___BIT(KCL_WARN) | ___BIT(TRACE)| ___BIT(SPECIAL) ))
#define INFO_LOG_LEVEL ((U08)(___BIT(INFO) | ___BIT(INFOEX)))
extern const log_map module_log_map[];
extern const module_map module_type_map[];
and
Code:
--- lib/modules/fglrx/build_mod/kcl_debug.c 2012-02-29 22:34:52.000000000 +0200
+++ lib/modules/fglrx/build_mod/kcl_debug.c 2012-03-22 13:56:21.594823600 +0200
@@ -69,7 +69,7 @@
{
{SPECIAL , 'S'},
{ERROR , 'E'},
- {WARN , 'W'},
+ {KCL_WARN , 'W'},
{INFO , 'I'},
{INFOEX , 'X'},
{TRACE , 'T'},
This is a bit ugly since all those enumeration entries shall have same prefix of course. But anyway, idea is expressed and I see if there is no bug filed at Rpmfusion, I file one
Last edited by nikkej; 26th March 2012 at 09:38 AM.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 03:47 (Thursday, 23-05-2013)
|
|
 |
 |
 |
 |
|
|