Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
snakeroot opened this issue Sep 17, 2014 · 9 comments

Comments

@snakeroot
Copy link

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

@JohnDoe42
Copy link

Same issue here. Please fix this

@waterfoul
Copy link

you can fix this by adding

#define BUILDING_ACPICA

on line 2

@Earnestly
Copy link

This issue is still present

@biji
Copy link

biji commented Jun 6, 2016

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

damadmai pushed a commit to damadmai/acpi_call that referenced this issue Jan 3, 2017
@archenroot
Copy link

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

@biji
Copy link

biji commented Jul 22, 2017

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

@archenroot
Copy link

archenroot commented Jul 22, 2017

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.

@Zibri
Copy link

Zibri commented Jan 8, 2018

see #71

@kopax
Copy link

kopax commented Oct 28, 2019

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants