atar-axis / xpadneo

Advanced Linux Driver for Xbox One Wireless Controller (shipped with Xbox One S)
https://atar-axis.github.io/xpadneo/
GNU General Public License v3.0
1.87k stars 110 forks source link

Build error on Archlinux kernel version 6.5.4 (Cannot found `generated/autoconf.h`) #440

Closed pe200012 closed 9 months ago

pe200012 commented 9 months ago

Version of xpadneo

v0.9-144-g9b3b696

Controller Model

Connection mode

Installed Software

Protocol Information

Please help us identify at which layer the problem can be found if you want to report mapping errors or if the controller fails to be detected:

Please describe how it is failing below in the next sections.

Severity / Impact

Describe the Bug

During building dkms module, make complains about not finding generated/autoconf.h

Steps to Reproduce

git clone https://github.com/atar-axis/xpadneo.git
cd xpadneo
sudo ./install.sh

Expected Behavior

No issue should happen.

Screenshots / GIFs / Videos

> sudo ./install.sh                                    
* creating dkms.conf
* adding hid-xpadneo-v0.9-144-g9b3b696 folder to /usr/src
* installing module (using DKMS)
Sign command: /usr/lib/modules/6.5.4-zen2-1-zen/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Creating symlink /var/lib/dkms/hid-xpadneo/v0.9-144-g9b3b696/source -> /usr/src/hid-xpadneo-v0.9-144-g9b3b696

Building module:
Cleaning build area...
make -j12 KERNELRELEASE=6.5.4-zen2-1-zen -C /usr/lib/modules/6.5.4-zen2-1-zen/build M=/var/lib/dkms/hid-xpadneo/v0.9-144-g9b3b696/build/src VERSION=v0.9-144-g9b3b696 modules...(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.5.4-zen2-1-zen (x86_64)
Consult /var/lib/dkms/hid-xpadneo/v0.9-144-g9b3b696/build/make.log for more information.

> cat /var/lib/dkms/hid-xpadneo/v0.9-144-g9b3b696/build/make.log
DKMS make.log for hid-xpadneo-v0.9-144-g9b3b696 for kernel 6.5.4-zen2-1-zen (x86_64)
2023年  9月 27日 水曜日 10:56:58 CST
make: ディレクトリ '/usr/lib/modules/6.5.4-zen2-1-zen/build' に入ります
cp /var/lib/dkms/hid-xpadneo/v0.9-144-g9b3b696/build/src/hid-xpadneo.c /var/lib/dkms/hid-xpadneo/v0.9-144-g9b3b696/build/src/xpadneo.c
  CC [M]  /var/lib/dkms/hid-xpadneo/v0.9-144-g9b3b696/build/src/xpadneo/core.o
  CC [M]  /var/lib/dkms/hid-xpadneo/v0.9-144-g9b3b696/build/src/xpadneo/consumer.o
  CC [M]  /var/lib/dkms/hid-xpadneo/v0.9-144-g9b3b696/build/src/xpadneo/keyboard.o
  CC [M]  /var/lib/dkms/hid-xpadneo/v0.9-144-g9b3b696/build/src/xpadneo.o
次のファイルから読み込み:  <コマンドライン>:
././include/linux/kconfig.h:5:10: 致命的エラー: generated/autoconf.h: そのようなファイルやディレクトリはありません
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
次のファイルから読み込み:  <コマンドライン>:
././include/linux/kconfig.h:5:10: 致命的エラー: generated/autoconf.h: そのようなファイルやディレクトリはありません
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
次のファイルから読み込み:  <コマンドライン>:
././include/linux/kconfig.h:5:10: 致命的エラー: generated/autoconf.h: そのようなファイルやディレクトリはありません
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
コンパイルを停止しました。
コンパイルを停止しました。
コンパイルを停止しました。
make[2]: *** [scripts/Makefile.build:243: /var/lib/dkms/hid-xpadneo/v0.9-144-g9b3b696/build/src/xpadneo/consumer.o] エラー 1
make[2]: *** 未完了のジョブを待っています....
make[2]: *** [scripts/Makefile.build:243: /var/lib/dkms/hid-xpadneo/v0.9-144-g9b3b696/build/src/xpadneo/keyboard.o] エラー 1
make[2]: *** [scripts/Makefile.build:243: /var/lib/dkms/hid-xpadneo/v0.9-144-g9b3b696/build/src/xpadneo/core.o] エラー 1
次のファイルから読み込み:  <コマンドライン>:
././include/linux/kconfig.h:5:10: 致命的エラー: generated/autoconf.h: そのようなファイルやディレクトリはありません
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
コンパイルを停止しました。
make[2]: *** [scripts/Makefile.build:243: /var/lib/dkms/hid-xpadneo/v0.9-144-g9b3b696/build/src/xpadneo.o] エラー 1
make[1]: *** [/usr/lib/modules/6.5.4-zen2-1-zen/build/Makefile:2032: /var/lib/dkms/hid-xpadneo/v0.9-144-g9b3b696/build/src] エラー 2
make: *** [Makefile:234: __sub-make] エラー 2
make: ディレクトリ '/usr/lib/modules/6.5.4-zen2-1-zen/build' から出ます

System Information

image

# uname -a
Linux pecomputer 6.5.4-zen2-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Thu, 21 Sep 2023 12:54:31 +0000 x86_64 GNU/Linux

Controller and Bluetooth Information

Additional Context

kakra commented 9 months ago

This looks like a problem outside of xpadneo: include/kconfig.h includes generated/autoconfig.h which does not exist. Do you have the matching kernel include sources properly installed?

pe200012 commented 9 months ago

@kakra You are correct. I somehow messed up my kernel source(probably because of some previously installed dkms modules). Closing.