On 2019/10/09 10:38, Christopher Zimmermann wrote: > But this is _really_ unexpected: > > $ CPATH= echo '#include<bzlib.h>' |cc -E -Wp,-v - >/dev/null > clang -cc1 version 8.0.1 based upon LLVM 8.0.1 default target > amd64-unknown-openbsd6.6 > #include "..." search starts here: > #include <...> search starts here: > /usr/local/include > /usr/X11R6/include > /usr/lib/clang/8.0.1/include > /usr/include > End of search list.nd of search list
I guess you have set CPATH in the environment (the command line you show does not reset it for cc, only for echo). cc is not expected to know anything about /usr/local/include or /usr/X11R6/include unless specifically told to look there. This is intentional.