1

https://stackoverflow.com/questions/17939930/finding-out-what-the-gcc-include-path-is output:

ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/11/include-fixed"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-linux-gnu/11/include
 /usr/local/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
# 0 "<stdin>"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "<stdin>"

while I am learning c. I found out that the canonicalized path for /usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include is: /usr/x86_64-linux-gnu/include

So i wonder what is this directory: "/usr/lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include"?

1 Answer 1

1

So I wonder what is this directory

It doesn't exist, so it's not anything :) Seriously, don't worry about that, unless you're fixing an installation script for your own build about GCC. This is just a path that was (possibly inadvertedly) added to the list of directories your compiler looks into for header files.

As the output shows, its nonexistence has no negative effect – it's simply ignored.

As for whether that directory somehow following a convention: Not that I'm aware of. That's why I presume it's been inadvertedly added, though I have seen such /usr/architecture/include paths in both debianoid and redhatoid distributions' builds of GCC. So, I think it's part of GCC's built-in defaults.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .