acpi_call icon indicating copy to clipboard operation
acpi_call copied to clipboard

#error "Please don't include <acpi/acpi.h> directly, include <linux/acpi.h> instead.

Open snakeroot opened this issue 11 years ago • 9 comments

Kernel: 3.17-rc5

Issue: Compilation terminates with the following error message:

make -C /usr/lib/modules/3.17.0-rc5-zenbook/build M=/tmp/makepkg/acpi_call-git/src/acpi_call-build modules make[1]: Entering directory '/usr/src/3.17.0-rc5-zenbook' CC [M] /tmp/makepkg/acpi_call-git/src/acpi_call-build/acpi_call.o In file included from include/acpi/platform/acenv.h:172:0, from include/acpi/acpi.h:56, from /tmp/makepkg/acpi_call-git/src/acpi_call-build/acpi_call.c:9: include/acpi/platform/aclinux.h:52:2: error: #error "Please don't include <acpi/acpi.h> directly, include <linux/acpi.h> instead." #error "Please don't include <acpi/acpi.h> directly, include <linux/acpi.h> instead." ^ scripts/Makefile.build:263: recipe for target '/tmp/makepkg/acpi_call-git/src/acpi_call-build/acpi_call.o' failed make[2]: *** [/tmp/makepkg/acpi_call-git/src/acpi_call-build/acpi_call.o] Error 1 Makefile:1373: recipe for target 'module/tmp/makepkg/acpi_call-git/src/acpi_call-build' failed make[1]: *** [module/tmp/makepkg/acpi_call-git/src/acpi_call-build] Error 2 make[1]: Leaving directory '/usr/src/3.17.0-rc5-zenbook' Makefile:8: recipe for target 'default' failed make: *** [default] Error 2

Apparent solution:

Replace '#include <acpi/acpi.h>' with '#include <linux/acpi.h>': sed -i -e 's:<acpi/acpi.h>:<linux/acpi.h>:' acpi_call.c

module then builds, installs, loads and seems to work

snakeroot avatar Sep 17 '14 14:09 snakeroot

Same issue here. Please fix this

JohnDoe42 avatar Oct 06 '14 19:10 JohnDoe42

you can fix this by adding

#define BUILDING_ACPICA

on line 2

waterfoul avatar Dec 26 '14 08:12 waterfoul

This issue is still present

Earnestly avatar Apr 13 '16 18:04 Earnestly

get same error, compiling on fedora 24 Kernel: 4.5.6-300.fc24.x86_64

biji avatar Jun 06 '16 08:06 biji

Can you pull this fix into upstream repo, so others can benefit?

archenroot avatar Jul 21 '17 17:07 archenroot

You can checkout my fork: https://github.com/biji/acpi_call

biji avatar Jul 22 '17 13:07 biji

I will, I used the damadmai fork and finally I was able to compile, but unfortunately when executed turn_off_gpu.sh script all failed on my Dell XPS 15 9550 with Nvidia 960M. Probably the project is not updated with all relevant addresses for my hardware...

However I found workaround with bbswich project, after loaded, I issue bbswitch load_state=0

And card is OFF finally.

archenroot avatar Jul 22 '17 14:07 archenroot

see https://github.com/mkottman/acpi_call/pull/71

Zibri avatar Jan 08 '18 09:01 Zibri

Thanks for the fork @biji, it seems to fix an error but then with Debian 10 I have Warning: modules_install: missing 'System.map' file. Skipping depmod., this warning succeed but sudo make install produce nothing, Any idea what to do ?

kopax avatar Oct 28 '19 23:10 kopax