Problem with linux header files
Marfot - over 3 years ago -
I migrated my system from Arch linux. I am getting an error related to linux header files when trying to compile with g++ or clang++ (anything else probably wont work either). I have never had this problem before. I even tried to compile a simple hello world program, doesn't work. I attached the error in a file.
There is no linux folder in /usr/include/bits. Could linux-libre-headers not be doing something right? How can i fix this?
Edit: I reinstalled linux libre api headers (with dashes instead of spaces but it's not letting me post with dashes) and now it works, weird
Replies (2)
RE: Problem with linux header files - Marfot - over 3 years ago -
Still doesn't work here are the outputs. The compilation error is the same. Here are outputs
syyuu_out (613 Bytes) syyuu_out | pacman -Syyuu output | ||
grepve_out (286 Bytes) grepve_out | grep output |
RE: Problem with linux header files - bill-auger - over 3 years ago -
sry, i mis-read the OP - there is not supposed to be any directory /usr/include/bits/linux - the file names inside angle brackets in the #include directive is relative to the system default include directory '/usr/include'
/usr/include/bits/errno.h:26:11: fatal error: linux/errno.h: No such file or directory 26 | # include <linux/errno.h>
so, the error that you presented indicates that '/usr/include/linux/errno.h' is missing - that file is in the 'linux-libre-api-headers' package
$ sudo pacman -S linux-libre-api-headers
an unrelated note: your pacman.conf is not in a supported configuration - you should not re-order the repos - [pcr] should be below all others which you have enabled, as it is in the default pacman.conf:
/usr/share/pacman/defaults/pacman.conf.x86_64