davidjo/snd_hda_macbookpro

Build Error: /home/jerry/snd_hda_macbookpro/build/hda-5.15.0/patch_cs8409.h:15:10: fatal error: sound/cs42l42.h: No such file or directory

Opened this issue · 2 comments

I am not linux beginner, I got below error when I build, what should I do?

sudo bash install.cirrus.driver.sh
linux-source-5.15.0/sound/pci/hda/
linux-source-5.15.0/sound/pci/hda/thinkpad_helper.c
linux-source-5.15.0/sound/pci/hda/hda_hwdep.c
linux-source-5.15.0/sound/pci/hda/hda_controller.c
linux-source-5.15.0/sound/pci/hda/hda_generic.c
linux-source-5.15.0/sound/pci/hda/hda_intel.h
linux-source-5.15.0/sound/pci/hda/patch_conexant.c
linux-source-5.15.0/sound/pci/hda/patch_si3054.c
linux-source-5.15.0/sound/pci/hda/hda_jack.h
linux-source-5.15.0/sound/pci/hda/patch_analog.c
linux-source-5.15.0/sound/pci/hda/Makefile
linux-source-5.15.0/sound/pci/hda/patch_cmedia.c
linux-source-5.15.0/sound/pci/hda/cs35l41_hda.c
linux-source-5.15.0/sound/pci/hda/hda_beep.c
linux-source-5.15.0/sound/pci/hda/cs35l41_hda_i2c.c
linux-source-5.15.0/sound/pci/hda/hda_beep.h
linux-source-5.15.0/sound/pci/hda/hda_controller.h
linux-source-5.15.0/sound/pci/hda/hda_generic.h
linux-source-5.15.0/sound/pci/hda/hda_auto_parser.c
linux-source-5.15.0/sound/pci/hda/hda_controller_trace.h
linux-source-5.15.0/sound/pci/hda/hda_codec.c
linux-source-5.15.0/sound/pci/hda/patch_cirrus.c
linux-source-5.15.0/sound/pci/hda/cs35l41_hda.h
linux-source-5.15.0/sound/pci/hda/Kconfig
linux-source-5.15.0/sound/pci/hda/cs35l41_hda_spi.c
linux-source-5.15.0/sound/pci/hda/hda_eld.c
linux-source-5.15.0/sound/pci/hda/hda_intel.c
linux-source-5.15.0/sound/pci/hda/patch_cs8409-tables.c
linux-source-5.15.0/sound/pci/hda/ideapad_s740_helper.c
linux-source-5.15.0/sound/pci/hda/patch_ca0132.c
linux-source-5.15.0/sound/pci/hda/hda_proc.c
linux-source-5.15.0/sound/pci/hda/patch_sigmatel.c
linux-source-5.15.0/sound/pci/hda/hda_local.h
linux-source-5.15.0/sound/pci/hda/patch_ca0110.c
linux-source-5.15.0/sound/pci/hda/hda_jack.c
linux-source-5.15.0/sound/pci/hda/hda_intel_trace.h
linux-source-5.15.0/sound/pci/hda/hda_auto_parser.h
linux-source-5.15.0/sound/pci/hda/hda_bind.c
linux-source-5.15.0/sound/pci/hda/patch_via.c
linux-source-5.15.0/sound/pci/hda/patch_cs8409.h
linux-source-5.15.0/sound/pci/hda/hp_x360_helper.c
linux-source-5.15.0/sound/pci/hda/hda_component.h
linux-source-5.15.0/sound/pci/hda/patch_realtek.c
linux-source-5.15.0/sound/pci/hda/ca0132_regs.h
linux-source-5.15.0/sound/pci/hda/hda_tegra.c
linux-source-5.15.0/sound/pci/hda/patch_cs8409.c
linux-source-5.15.0/sound/pci/hda/patch_hdmi.c
linux-source-5.15.0/sound/pci/hda/hda_sysfs.c
patching file patch_cs8409.c
Hunk #1 succeeded at 1442 (offset 172 lines).
Hunk #2 succeeded at 1451 (offset 172 lines).
Hunk #3 succeeded at 1480 (offset 172 lines).
patching file patch_cs8409.h
Hunk #1 succeeded at 19 (offset 1 line).
Hunk #2 succeeded at 302 (offset 1 line).
Hunk #3 succeeded at 329 with fuzz 1 (offset 1 line).
Hunk #4 succeeded at 365 (offset 2 lines).
make -C /lib/modules/5.15.0-43-generic/build CFLAGS_MODULE="-DAPPLE_PINSENSE_FIXUP -DAPPLE_CODECS -DCONFIG_SND_HDA_RECONFIG=1 -Wno-unused-variable -Wno-unused-function" M=/home/jerry/snd_hda_macbookpro/build/hda-5.15.0 modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-43-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
You are using: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
CC [M] /home/jerry/snd_hda_macbookpro/build/hda-5.15.0/patch_cs8409.o
In file included from /home/jerry/snd_hda_macbookpro/build/hda-5.15.0/patch_cs8409.c:16:
/home/jerry/snd_hda_macbookpro/build/hda-5.15.0/patch_cs8409.h:15:10: fatal error: sound/cs42l42.h: No such file or directory
15 | #include <sound/cs42l42.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:285: /home/jerry/snd_hda_macbookpro/build/hda-5.15.0/patch_cs8409.o] Error 1
make[1]: *** [Makefile:1875: /home/jerry/snd_hda_macbookpro/build/hda-5.15.0] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-43-generic'
make: *** [Makefile:22: all] Error 2
#cp snd-hda-codec-cs8409.ko /lib/modules/5.15.0-43-generic/updates
make INSTALL_MOD_DIR=updates -C /lib/modules/5.15.0-43-generic/build M=/home/jerry/snd_hda_macbookpro/build/hda-5.15.0 modules_install
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-43-generic'
arch/x86/Makefile:142: CONFIG_X86_X32 enabled but no binutils support
cat: /home/jerry/snd_hda_macbookpro/build/hda-5.15.0/modules.order: No such file or directory
DEPMOD /lib/modules/5.15.0-43-generic
Warning: modules_install: missing 'System.map' file. Skipping depmod.
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-43-generic'
depmod -a

contents of /lib/modules/5.15.0-43-generic/updates
total 1
drwxr-xr-x 2 root root 6 11月 2 16:41 dkms

Sorry been busy - this seems to be a problem with the kernel header packages.
Im assuming this is Ubuntu.
There are 2 kernel header packages to be installed, linux-headers-5.15.0-52-generic and linux-headers-5.15.0-52 (in my case - replace 5.15.0-52 with 5.15.0-43 for yours).
These create directories in /usr/src with the same names.
The include directory is in these directories (there are a lot of symbolic links pointing things around) which should have a sound folder which includes the cs42l42.h (in my case actual explicit path /usr/src/linux-headers-5.15.0-52/include/sound/cs42l42.h - redirected from /usr/src/linux-headers-5.15.0-52-generic/include/sound).
This is all part of the standard kernel building procedures - not something Ive modified.

Sorry been busy - this seems to be a problem with the kernel header packages.
Im assuming this is Ubuntu.
There are 2 kernel header packages to be installed, linux-headers-5.15.0-52-generic and linux-headers-5.15.0-52 (in my case - replace 5.15.0-52 with 5.15.0-43 for yours).
These create directories in /usr/src with the same names.
The include directory is in these directories (there are a lot of symbolic links pointing things around) which should have a sound folder which includes the cs42l42.h (in my case actual explicit path /usr/src/linux-headers-5.15.0-52/include/sound/cs42l42.h - redirected from /usr/src/linux-headers-5.15.0-52-generic/include/sound).
This is all part of the standard kernel building procedures - not something Ive modified.

Thank you Sir, thank you for your quick response, appreciated! my problem is solved by your reply!