Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest /usr/local/include instead of /usr/include #133

Closed
mattfbacon opened this issue Oct 30, 2023 · 3 comments
Closed

Suggest /usr/local/include instead of /usr/include #133

mattfbacon opened this issue Oct 30, 2023 · 3 comments

Comments

@mattfbacon
Copy link

The section in the readme which suggests manually installing the header to /usr/include should really suggest using /usr/local/include for this instead, because it is meant for this kind of manual installation of files.

@sharkdp
Copy link
Owner

sharkdp commented Nov 2, 2023

Sounds good. Is /usr/local/include in the standard include path for gcc, clang, …?

@mattfbacon
Copy link
Author

mattfbacon commented Nov 2, 2023

$ echo | gcc -E -Wp,-v -
ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include
 /usr/local/include
 /usr/lib/gcc/x86_64-pc-linux-gnu/13.2.1/include-fixed
 /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>"
$ echo | clang -E -Wp,-v -
clang -cc1 version 16.0.6 based upon LLVM 16.0.6 default target x86_64-pc-linux-gnu
ignoring nonexistent directory "/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../x86_64-pc-linux-gnu/include"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/clang/16/include
 /usr/local/include
 /usr/include
End of search list.
# 1 "<stdin>"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 375 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "<stdin>" 2

Yes. It even comes before /usr/include, to allow overriding system stuff with local stuff.

@sharkdp sharkdp closed this as completed in dce8011 Nov 2, 2023
@sharkdp
Copy link
Owner

sharkdp commented Nov 2, 2023

Thank you. Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants