Fatal Error: Asm/Linkage. H: No Such File or Directory, C/C++ Problem

I am trying to compile code that I downloaded from this GitHub repository on Eclipse CDT 3.8.1 and using Ubuntu 16.04 and kernel version 4.13.0-041300-lowlatency (because this project works on Xenomai Kernel). I'm getting this error:

fatal error: asm/linkage.h: No such file or directory, 
external location: /usr/src/linux-headers-4.13.0-041300-lowlatency/include/linux/linkage.h  C/C++ Problem

and unresolved inclusion for the header files:

#include <asm/uaccess.h>
#include <asm/io.h>

I searched for this error on various website, and I came to know that I have to make some changes to the Makefile and there is no asm directory in /usr/src/linux-headers-4.13.0-041300/include, instead there is a directory named asm-generic.

Can someone help me to resolve this error and the unresolved inclusions?

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article