BeardOverflow / msi-ec

GNU General Public License v2.0
145 stars 45 forks source link

install #42

Open rw-bowman opened 1 year ago

rw-bowman commented 1 year ago

Not compatable?

I am getting this on install:

robert@robert-Titan-GT77-12UGS:~$ cd msi-ec robert@robert-Titan-GT77-12UGS:~/msi-ec$ sudo make [sudo] password for robert: make[1]: Entering directory '/usr/src/linux-headers-6.2.0-20-generic' warning: the compiler differs from the one used to build the kernel The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.2.0-17ubuntu1) 12.2.0 You are using: gcc-12 (Ubuntu 12.2.0-17ubuntu1) 12.2.0 CC [M] /home/robert/msi-ec/msi-ec.o /home/robert/msi-ec/msi-ec.c:1248:24: error: initialization of ‘int ()(struct power_supply , struct acpi_battery_hook )’ from incompatible pointer type ‘int ()(struct power_supply )’ [-Werror=incompatible-pointer-types] 1248 | .add_battery = msi_battery_add, | ^~~~~~~ /home/robert/msi-ec/msi-ec.c:1248:24: note: (near initialization for ‘battery_hook.add_battery’) /home/robert/msi-ec/msi-ec.c:1249:27: error: initialization of ‘int ()(struct power_supply , struct acpi_battery_hook )’ from incompatible pointer type ‘int ()(struct power_supply )’ [-Werror=incompatible-pointer-types] 1249 | .remove_battery = msi_battery_remove, | ^~~~~~ /home/robert/msi-ec/msi-ec.c:1249:27: note: (near initialization for ‘battery_hook.remove_battery’) cc1: some warnings being treated as errors make[2]: [scripts/Makefile.build:260: /home/robert/msi-ec/msi-ec.o] Error 1 make[1]: [Makefile:2026: /home/robert/msi-ec] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-6.2.0-20-generic' make: [Makefile:12: modules] Error 2 robert@robert-Titan-GT77-12UGS:~/msi-ec$ sudo make install mkdir -p /lib/modules/6.2.0-20-generic/extra cp msi-ec.ko /lib/modules/6.2.0-20-generic/extra cp: cannot stat 'msi-ec.ko': No such file or directory make: [Makefile:27: install] Error 1 robert@robert-Titan-GT77-12UGS:~/msi-ec$ ^C robert@robert-Titan-GT77-12UGS:~/msi-ec$

glpnk commented 1 year ago

You are using 6.2 kernel that have some changes in data structure, so you need to make little patch like this https://github.com/teackot/msi-ec/commit/9f6c765fff0b9b67c5915fa31a6500a33c1ec841

glpnk commented 1 year ago

@rw-bowman Fixed?