为什么在安装acpi-call-dkms的时候提示编译失败
Tofloor
poster avatar
Creeper_LKF
deepin
2018-07-02 07:28
Author

电脑是ThinkPad的,然后一开始在Windows下设定了85%的阈值,然后没想到换到Deepin还有这个阈值控制。
现在想改,但是发现在tlp没效果,tlp提示没有安装acpi-call或者是tp-smapi,于是去安装了一下acpi-call-dkms,然后发现到最后编译失败并且tlp依然检测不到
  1. Preparing to unpack .../acpi-call-dkms_1.1.0-3_all.deb ...
  2. Unpacking acpi-call-dkms (1.1.0-3) ...
  3. Setting up acpi-call-dkms (1.1.0-3) ...
  4. Loading new acpi-call-1.1.0 DKMS files...
  5. Building for 4.15.0-21deepin-generic
  6. Building initial module for 4.15.0-21deepin-generic
  7. Error! Bad return status for module build on kernel: 4.15.0-21deepin-generic (x86_64)
  8. Consult /var/lib/dkms/acpi-call/1.1.0/build/make.log for more information.
Copy the Code
然后打开这个文件就是
  1. DKMS make.log for acpi-call-1.1.0 for kernel 4.15.0-21deepin-generic (x86_64)
  2. Sun Jul  1 23:14:07 CST 2018
  3. make: Entering directory '/usr/src/linux-headers-4.15.0-21deepin-generic'
  4.   CC [M]  /var/lib/dkms/acpi-call/1.1.0/build/acpi_call.o
  5. /var/lib/dkms/acpi-call/1.1.0/build/acpi_call.c: In function ‘acpi_proc_write’:
  6. /var/lib/dkms/acpi-call/1.1.0/build/acpi_call.c:277:9: error: implicit declaration of function ‘copy_from_user’; did you mean ‘raw_copy_from_user’? [-Werror=implicit-function-declaration]
  7.      if (copy_from_user( input, buff, len )) {
  8.          ^~~~~~~~~~~~~~
  9.          raw_copy_from_user
  10. cc1: some warnings being treated as errors
  11. scripts/Makefile.build:339: recipe for target '/var/lib/dkms/acpi-call/1.1.0/build/acpi_call.o' failed
  12. make[1]: *** [/var/lib/dkms/acpi-call/1.1.0/build/acpi_call.o] Error 1
  13. Makefile:1552: recipe for target '_module_/var/lib/dkms/acpi-call/1.1.0/build' failed
  14. make: *** [_module_/var/lib/dkms/acpi-call/1.1.0/build] Error 2
  15. make: Leaving directory '/usr/src/linux-headers-4.15.0-21deepin-generic'
Copy the Code
然后查了一下raw_copy_from_user发现都查不到这个函数,反而copy_from_user倒还有......
Reply Favorite View the author
All Replies
186******51
deepin
2018-07-02 08:25
#1
从Debian仓库里下载一个新版的安装包就能解决问题http://ftp.cn.debian.org/debian/ ... kms_1.1.0-4_all.deb
Reply View the author
Creeper_LKF
deepin
2018-07-02 09:31
#2
https://bbs.deepin.org/post/159739
从Debian仓库里下载一个新版的安装包就能解决问题http://ftp.cn.debian.org/debian/pool/main/a/acpi-call/ ...

谢谢,成功了
但是似乎Deepin官方源内有不少软件更新得很慢,有些Debian的包也没有冲突问题,也不会有被依赖关系,但是为什么也更新的非常慢啊
Reply View the author
Oaklight
deepin
2022-04-14 17:10
#3

这个版本的代码有些地方和5.6+的linux kernel不配合,你可以看一下编译log:

cat /var/lib/dkms/acpi-call/1.1.0/build/make.log

里面大概率会有个地方告诉你有个指针类型不对

nix-community的这版本修了不少bug:https://github.com/nix-community/acpi_call

git clone https://github.com/nix-community/acpi_call

cd acpi_call

make

sudo make install

sudo make dkms-add

sudo make dkms-build

sudo make dkms-install

sudo make modprobe-install

等到kernel升级到5.17之后这个就可以卸载了:

cd acpi_call

sudo make modprobe-remove

sudo make dkms-remove

祝好

Reply View the author