LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-25-2013, 04:57 PM   #1
1337_powerslacker
Member
 
Registered: Nov 2009
Location: Kansas, USA
Distribution: Slackware64-15.0
Posts: 862
Blog Entries: 9

Rep: Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592
Catalyst 13.12 driver refuses to compile on 3.10.25 kernel


I hope everyone is having a Merry Christmas!

I have a slight problem I'm hoping someone can help me with. I recently downloaded the latest AMD Catalyst driver (13.12) and the latest 3.10.x kernel from kernel.org (as of this posting it is 3.10.25). When I compiled the -generic version of the kernel, it booted fine, but when I ran the .run script, it refused to compile. The exact error message(s) is as follows:

Code:
AMD kernel module generator version 2.1
doing Makefile based build for kernel 2.6.x and higher
rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
make -C /lib/modules/3.11.0-14-generic/build SUBDIRS=/var/lib/dkms/fglrx/13.251/build/2.6.x modules
make[1]: Entering directory `/usr/src/linux-headers-3.11.0-14-generic'
  CC [M]  /var/lib/dkms/fglrx/13.251/build/2.6.x/firegl_public.o
  CC [M]  /var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.o
/var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.c: In function ‘KCL_ACPI_ParseTable’:
/var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.c:999:5: warning: passing argument 1 of ‘(acpi_status (*)(u32,  void *, void *))handler’ makes integer from pointer without a cast [enabled by default]
     ((acpi_table_handler)handler)(hdr);
     ^
/var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.c:999:5: note: expected ‘u32’ but argument is of type ‘struct acpi_table_header *’
/var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.c:999:5: error: too few arguments to function ‘(acpi_status (*)(u32,  void *, void *))handler’
make[2]: *** [/var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.o] Error 1
make[1]: *** [_module_/var/lib/dkms/fglrx/13.251/build/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-14-generic'
make: *** [kmod_build] Error 2
build failed with return value 2
I've checked on Phoronix's forums, but I'm unclear on exactly how to patch which file, and from then to install the driver.

Any help would be appreciated.

Regards,

Matt
 
Old 12-25-2013, 09:52 PM   #2
larryhaja
Member
 
Registered: Jul 2008
Distribution: Slackware 13.1
Posts: 305

Rep: Reputation: 80
Quote:
Originally Posted by mattallmill View Post
Code:
AMD kernel module generator version 2.1
doing Makefile based build for kernel 2.6.x and higher
rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
make -C /lib/modules/3.11.0-14-generic/build SUBDIRS=/var/lib/dkms/fglrx/13.251/build/2.6.x modules
make[1]: Entering directory `/usr/src/linux-headers-3.11.0-14-generic'
  CC [M]  /var/lib/dkms/fglrx/13.251/build/2.6.x/firegl_public.o
  CC [M]  /var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.o
/var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.c: In function ‘KCL_ACPI_ParseTable’:
/var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.c:999:5: warning: passing argument 1 of ‘(acpi_status (*)(u32,  void *, void *))handler’ makes integer from pointer without a cast [enabled by default]
     ((acpi_table_handler)handler)(hdr);
     ^
/var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.c:999:5: note: expected ‘u32’ but argument is of type ‘struct acpi_table_header *’
/var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.c:999:5: error: too few arguments to function ‘(acpi_status (*)(u32,  void *, void *))handler’
make[2]: *** [/var/lib/dkms/fglrx/13.251/build/2.6.x/kcl_acpi.o] Error 1
make[1]: *** [_module_/var/lib/dkms/fglrx/13.251/build/2.6.x] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-14-generic'
make: *** [kmod_build] Error 2
build failed with return value 2
It actually looks like you are building with kernel 3.11.0-14, which isn't the stock slackware 14.1 kernel of 3.10.17. Anyways, I also got the same error with kernel 3.10.17.

I actually found this forum post and this forum post helpful with the following instructions. Download the driver from amd.com, which you've already done.
Code:
# unzip amd-catalyst-13.12-linux-x86.x86_64.zip
# chmod +x amd-catalyst-13.12-linux-x86.x86_64.run
# vi kernel-3.9.1.patch
Code:
--- 13.12/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2013-12-17 20:05:35.000000000 +0100
+++ 13.12/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2013-12-19 18:40:18.386568588 +0100
@@ -995,7 +995,11 @@
 #endif
     {
         return KCL_ACPI_ERROR;
-    }    
+    }
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,1)
+    ((acpi_tbl_table_handler)handler)(hdr);
+#else
     ((acpi_table_handler)handler)(hdr);
+#endif
     return KCL_ACPI_OK;
-}
+}
Code:
# ./amd-catalyst-13.12-linux-x86.x86_64.run --extract NewDirectory
# cd NewDirectory
# patch -p1 < ../kernel-3.9.1.patch
# su -c "./ati-installer.sh 13.251 --buildpkg Slackware/Slackware"
The final package should come out one directory above labeled as fglrx-13.251-x86_64-1.tgz (or the 32bit version, whichever fits your architecture). Install like any other Slackware package (eg. sudo /sbin/installpkg fglrx-13.251-x86_64-1.tgz).

Last edited by larryhaja; 12-25-2013 at 09:55 PM.
 
Old 12-25-2013, 10:22 PM   #3
1337_powerslacker
Member
 
Registered: Nov 2009
Location: Kansas, USA
Distribution: Slackware64-15.0
Posts: 862

Original Poster
Blog Entries: 9

Rep: Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592Reputation: 592
Quote:
Originally Posted by larryhaja View Post
It actually looks like you are building with kernel 3.11.0-14, which isn't the stock slackware 14.1 kernel of 3.10.17. Anyways, I also got the same error with kernel 3.10.17.

I actually found this forum post and this forum post helpful with the following instructions. Download the driver from amd.com, which you've already done.
Code:
# unzip amd-catalyst-13.12-linux-x86.x86_64.zip
# chmod +x amd-catalyst-13.12-linux-x86.x86_64.run
# vi kernel-3.9.1.patch
Code:
--- 13.12/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2013-12-17 20:05:35.000000000 +0100
+++ 13.12/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2013-12-19 18:40:18.386568588 +0100
@@ -995,7 +995,11 @@
 #endif
     {
         return KCL_ACPI_ERROR;
-    }    
+    }
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,1)
+    ((acpi_tbl_table_handler)handler)(hdr);
+#else
     ((acpi_table_handler)handler)(hdr);
+#endif
     return KCL_ACPI_OK;
-}
+}
Code:
# ./amd-catalyst-13.12-linux-x86.x86_64.run --extract NewDirectory
# cd NewDirectory
# patch -p1 < ../kernel-3.9.1.patch
# su -c "./ati-installer.sh 13.251 --buildpkg Slackware/Slackware"
The final package should come out one directory above labeled as fglrx-13.251-x86_64-1.tgz (or the 32bit version, whichever fits your architecture). Install like any other Slackware package (eg. sudo /sbin/installpkg fglrx-13.251-x86_64-1.tgz).
I actually posted the error code from one of the posters on Phoronix's forum, since I couldn't find an exact copy of the error message in my log file, and I think the poster was using Ubuntu. However, the rest of your post was spot-on. Thanks a million for your advice. It was most helpful.

Matt

Note: I use the -generic kernel, and after installing the package, it would not load the fglrx.ko module. I found this odd because in the past, when I would install the Catalyst driver, the module would automatically load. However, now I had to explicitly delineate that the fglrx module be loaded in addition to the usual suspects in the 'mkinitrd' command. Other than that, the package worked as intended.

Last edited by 1337_powerslacker; 12-25-2013 at 11:09 PM. Reason: Added note for later reference
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using an alternate kernel video driver (radeon in place of catalyst) mk27 Linux - General 3 05-03-2011 05:25 AM
Catalyst 10.3 won't compile spudgunner Slackware 5 03-31-2010 12:55 PM
[SOLVED] catalyst 9.11 and 9.12 driver --buildpkg fails on new kernel doomey Slackware 3 01-12-2010 01:15 PM
ndiswrapper refuses to compile against kernel 2.6.19-1.2288 lavie Linux - Wireless Networking 7 02-25-2007 09:52 AM
Driver won't compile on Kernel 2.6 - works fine on Kernel 2.4 c@sey Linux - Software 4 01-08-2005 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration