BeardOverflow / msi-ec

GNU General Public License v2.0
134 stars 41 forks source link

Build failing #54

Closed A-Koderr closed 1 year ago

A-Koderr commented 1 year ago

Build is failing showing error -Werror=incompatible-pointer-types

` CC [M] /home/user/.cache/yay/msi-ec-git/src/msi-ec/msi-ec.o

/home/user/.cache/yay/msi-ec-git/src/msi-ec/msi-ec.c:1251:24: error: initialization of ‘int ()(struct power_supply )’ from incompatible pointer type ‘int ()(struct power_supply , struct acpi_battery_hook *)’ [-Werror=incompatible-pointer-types]

1251 | .add_battery = msi_battery_add, | ^~~~~~~

/home/user/.cache/yay/msi-ec-git/src/msi-ec/msi-ec.c:1251:24: note: (near initialization for ‘battery_hook.add_battery’)

/home/user/.cache/yay/msi-ec-git/src/msi-ec/msi-ec.c:1252:27: error: initialization of ‘int ()(struct power_supply )’ from incompatible pointer type ‘int ()(struct power_supply , struct acpi_battery_hook *)’ [-Werror=incompatible-pointer-types]

1252 | .remove_battery = msi_battery_remove, | ^~~~~~

/home/user/.cache/yay/msi-ec-git/src/msi-ec/msi-ec.c:1252:27: note: (near initialization for ‘battery_hook.remove_battery’)

cc1: some warnings being treated as errors

make[2]: *** [scripts/Makefile.build:250: /home/ars/.cache/yay/msi-ec-git/src/msi-ec/msi-ec.o] Error 1

make[1]: [Makefile:2012: /home/ars/.cache/yay/msi-ec-git/src/msi-ec] Error 2 make: [Makefile:15: modules] Error 2

==> ERROR: A failure occurred in build(). Aborting... -> error making: msi-ec-git-exit status 4 -> Failed to install the following packages. Manual intervention is required: msi-ec-git - exit status 4 `

glpnk commented 1 year ago

what is your kernel version? If you on kernel <6.2 this step could help

  1. (Linux < 6.2 only) Run make patch-pre-6.2

If you using AUR package and your kernel is 6.2+ - AUR package may be outdated, use Github version instead

A-Koderr commented 1 year ago

Sorry my bad

A-Koderr commented 1 year ago

needed to use make older-kernel-patch instead of make patch-pre-6.2