/var/tmp/portage/net-misc/dahdi-3.1.0-r3/work/dahdi-linux-3.1.0/drivers/dahdi/dahdi_echocan_oslec.c:34:10: fatal error: /usr/src/linux/drivers/misc/echo/oslec.h: No such file or directory 34 | #include "/usr/src/linux/drivers/misc/echo/oslec.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 17.1_no-multilib-20210331-001544 ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-gnu-7.3.1 [2] x86_64-pc-linux-gnu-10.2.0 * clang version 11.1.0 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/lib/llvm/11/bin /usr/lib/llvm/11 11.1.0 Python 3.8.9 Available Ruby profiles: (none found) Available Rust versions: [1] rust-bin-1.51.0 [2] rust-1.51.0 * The following VMs are available for generation-2: *) AdoptOpenJDK 8.282_p08 [openjdk-bin-8] Available Java Virtual Machines: [1] openjdk-bin-8 system-vm The Glorious Glasgow Haskell Compilation System, version 8.10.4 timestamp(s) of HEAD at this tinderbox image: /var/db/repos/gentoo Sun Apr 4 18:50:51 UTC 2021 emerge -qpvO net-misc/dahdi [ebuild N ] net-misc/dahdi-3.1.0-r3 USE="flash oslec -dist-kernel"
Created attachment 697467 [details] emerge-info.txt
Created attachment 697470 [details] emerge-history.txt
Created attachment 697473 [details] environment
Created attachment 697476 [details] etc.portage.tar.bz2
Created attachment 697479 [details] net-misc:dahdi-3.1.0-r3:20210404-191155.log
Created attachment 697482 [details] temp.tar.bz2
gentoo-kernel isn't installing full kernel sources: jkroon@plastiekpoot /usr/src/linux-5.11.14-gentoo-dist/drivers/misc/echo $ ls -lah total 16K drwxr-xr-x 2 root root 4.0K Apr 17 04:20 . drwxr-xr-x 21 root root 4.0K Apr 17 04:20 .. -rw-r--r-- 1 root root 274 Feb 15 00:32 Kconfig -rw-r--r-- 1 root root 69 Feb 15 00:32 Makefile Compared to linux/master: jkroon@plastiekpoot ~/projects/linux/drivers/misc/echo (master) $ ls -lah total 52K drwxr-xr-x 2 jkroon jkroon 4.0K Jan 24 22:38 . drwxr-xr-x 23 jkroon jkroon 4.0K Apr 17 05:59 .. -rw-r--r-- 1 jkroon jkroon 17K Jan 24 22:38 echo.c -rw-r--r-- 1 jkroon jkroon 6.6K Jan 24 22:38 echo.h -rw-r--r-- 1 jkroon jkroon 3.6K Jan 24 22:38 fir.h -rw-r--r-- 1 jkroon jkroon 274 Jan 24 22:38 Kconfig -rw-r--r-- 1 jkroon jkroon 69 Jan 24 22:38 Makefile -rw-r--r-- 1 jkroon jkroon 2.3K Jan 24 22:38 oslec.h This is a bug in gentoo-kernel, not dahdi.
I would say not installing source is a feature, not a bug. but if some files are legitemately missing then we can add, I think.
I hear you re feature, to a degree it makes sense. net-misc/dahdi is a kernel module, so at the very least I require the ability to include the missing oslec.h (it has no further #include's) - which doesn't form part of the standard linux-headers since it's an internal only header. Is there some dependency that I need to depend on to indicate that I require the actual source including headers? Looking at the kernel-build eclass it seems that it's explicit to only install Makefile* and Kconfig* ... is this good enough to actually build any other kernel modules? In which case, can we possibly include oslec.h into that? Quite happy to hack the dahdi-source to be a little less specific about the full path and add additional -I arguments for the compiler. However, it seems kernel-2 (which controls linux-headers) use the kernel's on make headers_install in order to deal with the stuff that needs to be installed, afaik, this is primarily stuff that userspace needs, not kernel modules. This only affects USE=oslec ... which also requires kernel config to have CONFIG_ECHO set (Which I'm not sure gentoo-kernel has). Looking at the code here, the #include should be fixed up anyway, using a full path here is just wrong on so many levels, but even fixing it up, in the gentoo-kernel case, there is no oslec.h to fix things up to.
Last-rited, please see bug #914477.