isotp.h header missing on Ubuntu 20.04.4

Asked by Alexander Hölzl

I am trying to compile a software using the CAN ISO-TP driver which has been part of the mainline Linux kernel since version 5.10.
The compilation fails due to the isotp.h header not being available. However the can_isotp module is available, it can be loaded without a problem and also appears in the list of loaded kernel modules.

$lsmod
Module Size Used by
can_isotp 24576 0

All other CAN related headers such as bcm.h, raw.h, j1939.h are present in /usr/include/linux/can, only isotp.h is missing.

I am using Ubuntu 20.04.4 LTS.

Am I doing something wrong or is this Ubuntu's fault?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

/usr/include/linux/can/isotp.h is provided in the package linux-libc-dev, but probably only in version 5.10 and higher.
Which kernel version and which version of linux-libc-dev do you have installed on your system?

Revision history for this message
Alexander Hölzl (xile273) said :
#2

Thank you for your help!

My kernel version is 5.13.0-48-generic and my linux-libc-dev version is 5.4.0-117.132 amd64.

The Ubuntu installation I'm using is fresh, I just installed it yesterday, so it should be in a clean state.

The isotp.h header is also present in my kernel source files under /usr/src.

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#3

This seems to be a general problem when you install a kernel in a later version than the initial one for a certain Ubuntu release (e.g. with hwe packages).

I have no solution for that, except maybe manually installing the linux-libc-dev package in a version similar to your kernel version (in this case from impish-updates). No clue whether that helps or if that completely breaks the system.

Revision history for this message
Alexander Hölzl (xile273) said :
#4

Ok, that's good to know, then I'll probably just switch to a newer Ubuntu version.

For now as a stopgap measure I just copied the isotp.h header manually from my kernel sources to the include files, which seems to
work flawlessly.

Thank you for your help.

Revision history for this message
Alexander Hölzl (xile273) said :
#5

Thanks Manfred Hampl, that solved my question.