Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 780069

Summary: net-misc/dahdi-3.1.0-r3 - /.../dahdi_echocan_oslec.c: fatal error: /.../oslec.h: No such file or directory
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Distribution Kernel Project <dist-kernel>
Status: RESOLVED OBSOLETE    
Severity: normal CC: jaco, proxy-maint
Priority: Normal Keywords: PMASKED
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 914477    
Bug Blocks:    
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tar.bz2
net-misc:dahdi-3.1.0-r3:20210404-191155.log
temp.tar.bz2

Description Toralf Förster gentoo-dev 2021-04-04 19:43:19 UTC
/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"
Comment 1 Toralf Förster gentoo-dev 2021-04-04 19:43:20 UTC
Created attachment 697467 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-04-04 19:43:22 UTC
Created attachment 697470 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2021-04-04 19:43:23 UTC
Created attachment 697473 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2021-04-04 19:43:24 UTC
Created attachment 697476 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2021-04-04 19:43:26 UTC
Created attachment 697479 [details]
net-misc:dahdi-3.1.0-r3:20210404-191155.log
Comment 6 Toralf Förster gentoo-dev 2021-04-04 19:43:27 UTC
Created attachment 697482 [details]
temp.tar.bz2
Comment 7 Jaco Kroon 2021-04-17 04:04:55 UTC
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.
Comment 8 Georgy Yakovlev archtester gentoo-dev 2021-04-17 10:15:58 UTC
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.
Comment 9 Jaco Kroon 2021-04-17 13:21:24 UTC
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.
Comment 10 Joonas Niilola gentoo-dev 2023-09-21 08:20:19 UTC
Last-rited, please see bug #914477.