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

Build errors in Ubuntu 19.10 #84

Open
srlowe opened this issue Oct 31, 2019 · 2 comments
Open

Build errors in Ubuntu 19.10 #84

srlowe opened this issue Oct 31, 2019 · 2 comments

Comments

@srlowe
Copy link

srlowe commented Oct 31, 2019

OS: Ubuntu 19.10
Kernel: 5.3.0-20-generic

$ make && sudo make install
make -C /lib/modules/5.3.0-20-generic/build M=/home/xxx/osmods/acpi_call modules
make[1]: Entering directory '/usr/src/linux-headers-5.3.0-20-generic'
  CC [M]  /home/xxx/osmods/acpi_call/acpi_call.o
In file included from ./include/acpi/platform/acenv.h:152,
                 from ./include/acpi/acpi.h:22,
                 from /home/xxx/osmods/acpi_call/acpi_call.c:9:
./include/acpi/platform/aclinux.h:18:2: error: #error "Please don't include <acpi/acpi.h> directly, include <linux/acpi.h> instead."
   18 | #error "Please don't include <acpi/acpi.h> directly, include <linux/acpi.h> instead."
      |  ^~~~~
/home/xxx/osmods/acpi_call/acpi_call.c: In function ‘acpi_proc_write’:
/home/xxx/osmods/acpi_call/acpi_call.c:277:9: error: implicit declaration of function ‘copy_from_user’; did you mean ‘raw_copy_from_user’? [-Werror=implicit-function-declaration]
  277 |     if (copy_from_user( input, buff, len )) {
      |         ^~~~~~~~~~~~~~
      |         raw_copy_from_user
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:290: /home/xxx/osmods/acpi_call/acpi_call.o] Error 1
make[1]: *** [Makefile:1655: _module_/home/xxx/osmods/acpi_call] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-20-generic'
make: *** [Makefile:8: default] Error 2
@paaland
Copy link

paaland commented Nov 10, 2019

Fixed by changing the apci/acpi.h include to the suggested linux/acpi.h and chagning copy_from_user to raw_copy_from_user. It will then build, but make install failes further:

$ sudo make install
make -C /lib/modules/5.3.0-19-generic/build M=/home/paaland/src/acpi_call modules_install
make[1]: Entering directory '/usr/src/linux-headers-5.3.0-19-generic'
  INSTALL /home/paaland/src/acpi_call/acpi_call.ko
At main.c:160:
- SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:72
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:79
sign-file: certs/signing_key.pem: No such file or directory
  DEPMOD  5.3.0-19-generic
Warning: modules_install: missing 'System.map' file. Skipping depmod.
make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-19-generic'

@nikitosiusis
Copy link

You can add module manually if make install fails
just type
insmod ./acpi_call.ko

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

3 participants