Change:
I was given a tip by vcunat to upgrade the kernel to see if my GPU requires a newer kernel version (AMD has done a lot of adding to the linux kernel lately). But I received the same error when I tried upgrading to linuxPackages314 and linuxPackageslatest: /tmp/nix-build-ati-drivers-13.12- In function 'KCLACPIGetHandles': /tmp/nix-build-ati-drivers-13.12- error: 'struct acpidevnode' has no member named 'handle' pInfo-videohandle = pInfo-pcidev-; Can someone reproduce this? Suggested fix?
These are common problems. AMD's proprietary drivers have problems compiling with newer kernels. On gentoo they have patches , and they have multiple versions working, probably even with 3.14. The build process is a terrible mess though, so it won't be straightforward to port. Anyway, I'd think that the AMD work in kernel mostly only affects the free drivers.
True enough, and they might migrate completely to open source - but that time is not now :/ With the open source ATI drivers I'm seeing screen tears and all kinds of strange screen corruptions when, for instance, suspending to disk. I'm not sure this would be remedied by them releasing patches any time soon.
Try
This issue remains for 3.19 and 4.0. I'm still running 3.18 because of this. I hope there is some progress going on?
Driver needs an update to 15.5, which might fix your compilation issues? (I'll swap across to an ati card and test the update sometime in the coming week if nobody beats me to it) It's unlikely that your issues with 3.19 and 4.0 are the same compilation issues that this thread had initially, which were fixed in one of the ati driver updates.
Do you had any success?
I have a fix for this which fixes compilation issues and also upgrades to 15.07. Pull request incoming shortly as soon I get it properly merged into the tree rather than implemented as an override.
Thanks for getting to this dfoxfranke. I normally use my ati card for vga passthrough to a windows vm so this fell to the bottom of the priority list for me.

Discussion:
die(){ echo $@; exit 1; } # custom unpack: <ins> mkdir fglrx cd fglrx </ins> unzip $src <del> run_file=$(echo fglrx-*/amd-driver-installer-*) </del> <ins> cd .. run_file=$(echo fglrx/amd-driver-installer-*) </ins> sh $run_file --extract . eval "$patchPhase"

with stdenv.lib; stdenv.mkDerivation { <del> name = "ati-drivers-14.12" + (optionalString (!libsOnly) "-${kernel.version}"); </del> <ins> name = "ati-drivers-15.7" + (optionalString (!libsOnly) "-${kernel.version}"); </ins> builder = ./builder.sh;

gcc = stdenv.cc.cc; src = fetchurl { <del> url = http://www2.ati.com/drivers/linux/amd-catalyst-omega-14.12-linux-run-installers.zip; sha256 = "0jd2scrdlyapynxfjdrarnwcdzxjqrk5fg5i10g3bm0ay8v9hrk8"; </del> <ins> url = "http://www2.ati.com/drivers/linux/amd-driver-installer-15.20.1046-x86.x86_64.zip"; sha256 = "ffde64203f49d9288eaa25f4d744187b6f4f14a87a444bab6a001d822b327a9d"; </ins> curlOpts = "--referer http://support.amd.com/en-us/download/desktop?os=Linux%20x86_64"; }; <del> patchPhase = "patch -p1 < ${./fglrx_3.17rc6-no_hotplug.patch}"; </del> <ins> patchPhase = "patch -p1 < ${./kernel-api-fixes.patch}"; </ins> patchPhaseSamples = "patch -p2 < ${./patch-samples.patch}"; buildInputs =

<del> source: https://aur.archlinux.org/packages/catalyst/ diff -uNr 14.9/common/lib/modules/fglrx/build_mod/firegl_public.c 14.9/common/lib/modules/fglrx/build_mod/firegl_public.c --- 14.9/common/lib/modules/fglrx/build_mod/firegl_public.c	2014-09-09 16:10:17.000000000 +0200 +++ 14.9/common/lib/modules/fglrx/build_mod/firegl_public.c	2014-09-26 19:01:44.000000000 +0200 @@ -1093,6 +1093,9 @@ // directly here to allow suspend/resume without X server start. firegl_pci_save_state((KCL_PCI_DevHandle)pdev, privdev); pci_disable_device(pdev); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0) +	pci_ignore_hotplug(pdev); +#endif PMSG_EVENT(pdev->dev.power.power_state) = state; } else diff -uNr 14.9/common/lib/modules/fglrx/build_mod/kcl_acpi.c 14.9/common/lib/modules/fglrx/build_mod/kcl_acpi.c --- 14.9/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2014-09-09 16:10:17.000000000 +0200 +++ 14.9/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2014-09-26 18:57:27.000000000 +0200 @@ -840,10 +840,12 @@ if(tdev != NULL) { device = (acpi_device_adr(tdev) >> 16) & 0xffff; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0) if(PCI_SLOT(pdev->devfn) == device) { tdev->flags.no_hotplug = true; } +#endif } #endif return 0; </del>

<ins> diff -Nru 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c 15.7.new/common/lib/modules/fglrx/build_mod/firegl_public.c --- 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-07-04 10:31:23.000000000 -0400 +++ 15.7.new/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-08-03 21:21:13.893211082 -0400 @@ -242,6 +242,14 @@ #endif // ============================================================ + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) +#define __read_cr4 read_cr4 +#define __write_cr4 write_cr4 +#endif + +// ============================================================ + /* globals */ char* firegl = NULL; @@ -3495,10 +3503,12 @@ KCL_PUB_InterruptHandlerWrap, #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) ((useMSI) ? (SA_INTERRUPT) : (SA_SHIRQ)), -#else +#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) //when MSI enabled. keep irq disabled when calling the action handler, //exclude this IRQ from irq balancing (only on one CPU) ((useMSI) ? (IRQF_DISABLED) : (IRQF_SHARED)), +#else +        ((useMSI) ? 0 : IRQF_SHARED), #endif dev_name, context); @@ -4498,8 +4508,8 @@ if (cpu_has_pge) { -        cr4 = read_cr4(); -        write_cr4(cr4 & ~X86_CR4_PGE); +        cr4 = __read_cr4(); +        __write_cr4(cr4 & ~X86_CR4_PGE); } __flush_tlb(); @@ -4512,7 +4522,7 @@ write_cr0(cr0 & 0xbfffffff); if (cpu_has_pge) { -        write_cr4(cr4); +        __write_cr4(cr4); } local_irq_restore(flags); @@ -4539,8 +4549,8 @@ if (cpu_has_pge) { -        cr4 = read_cr4(); -        write_cr4(cr4 & ~X86_CR4_PGE); +        cr4 = __read_cr4(); +        __write_cr4(cr4 & ~X86_CR4_PGE); } __flush_tlb(); @@ -4552,7 +4562,7 @@ write_cr0(cr0 & 0xbfffffff); if (cpu_has_pge) { -        write_cr4(cr4); +        __write_cr4(cr4); } local_irq_restore(flags); diff -Nru 15.7/common/lib/modules/fglrx/build_mod/kcl_acpi.c 15.7.new/common/lib/modules/fglrx/build_mod/kcl_acpi.c --- 15.7/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2015-07-04 10:31:23.000000000 -0400 +++ 15.7.new/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2015-08-02 19:59:54.797911610 -0400 @@ -861,7 +861,10 @@ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0) if(pdev) { -       pci_ignore_hotplug(pdev); +      struct pci_dev *bridge = pdev->bus->self; + +      pdev->ignore_hotplug = 1; +      if(bridge) bridge->ignore_hotplug = 1; } #endif } diff -Nru 15.7/common/lib/modules/fglrx/build_mod/kcl_str.c 15.7.new/common/lib/modules/fglrx/build_mod/kcl_str.c --- 15.7/common/lib/modules/fglrx/build_mod/kcl_str.c	2015-07-04 10:31:23.000000000 -0400 +++ 15.7.new/common/lib/modules/fglrx/build_mod/kcl_str.c	2015-08-03 00:35:25.938410435 -0400 @@ -169,7 +169,7 @@ const char* s2, KCL_TYPE_SizeSigned count) { -    return strnicmp(s1, s2, count); +    return strncasecmp(s1, s2, count); } /** brief Locate character in string </ins>