Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 780069 - net-misc/dahdi-3.1.0-r3 - /.../dahdi_echocan_oslec.c: fatal error: /.../oslec.h: No such file or directory
Summary: net-misc/dahdi-3.1.0-r3 - /.../dahdi_echocan_oslec.c: fatal error: /.../oslec...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Distribution Kernel Project
Depends on:
Reported: 2021-04-04 19:43 UTC by Toralf Förster
Modified: 2021-04-17 13:21 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

emerge-info.txt (emerge-info.txt,16.77 KB, text/plain)
2021-04-04 19:43 UTC, Toralf Förster
emerge-history.txt (emerge-history.txt,228.34 KB, text/plain)
2021-04-04 19:43 UTC, Toralf Förster
environment (environment,109.68 KB, text/plain)
2021-04-04 19:43 UTC, Toralf Förster
etc.portage.tar.bz2 (etc.portage.tar.bz2,23.00 KB, application/x-bzip)
2021-04-04 19:43 UTC, Toralf Förster
net-misc:dahdi-3.1.0-r3:20210404-191155.log (net-misc:dahdi-3.1.0-r3:20210404-191155.log,247.01 KB, text/plain)
2021-04-04 19:43 UTC, Toralf Förster
temp.tar.bz2 (temp.tar.bz2,33.46 KB, application/x-bzip)
2021-04-04 19:43 UTC, Toralf Förster

Note You need to log in before you can comment on or make changes to this bug.
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
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]
Comment 2 Toralf Förster gentoo-dev 2021-04-04 19:43:22 UTC
Created attachment 697470 [details]
Comment 3 Toralf Förster gentoo-dev 2021-04-04 19:43:23 UTC
Created attachment 697473 [details]
Comment 4 Toralf Förster gentoo-dev 2021-04-04 19:43:24 UTC
Created attachment 697476 [details]
Comment 5 Toralf Förster gentoo-dev 2021-04-04 19:43:26 UTC
Created attachment 697479 [details]
Comment 6 Toralf Förster gentoo-dev 2021-04-04 19:43:27 UTC
Created attachment 697482 [details]
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.