<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - clang++ fails to find libstdc++"
   href="https://bugs.llvm.org/show_bug.cgi?id=32786">32786</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang++ fails to find libstdc++
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>csaba_22@yahoo.co.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ clang++ -v -Wno-error-null-dereference -pipe -fsanitize=address
-fno-omit-frame-pointer -std=c++11 -fPIC -g -Wall -pedantic -Wextra -Wformat=2
-Wshadow -Werror -Wmissing-include-dirs -Wuninitialized -Wfloat-equal
-Wcast-align -Wcast-qual -Wwrite-strings -Wno-error=pragmas -O0
-fstrict-aliasing -Iapi -I/home/me/workspace/haha
-I/home/me/workspace/haha/prog -Isdk -isystem cps -isystem
cps/__build-clang++-compat -isystem cps/booster -isystem
cps/__build-clang++-compat/booster -isystem lmc -isystem
lmc/__build-clang++-compat -isystem au -isystem rj
-I/home/me/workspace/haha/logger/src -isystem
/home/me/workspace/haha/third_party/gmock -isystem /usr/include/libxml2
-isystem /usr/include/glibmm-2.4 -isystem
/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -isystem /usr/include/sigc++-2.0
-isystem /usr/lib/x86_64-linux-gnu/sigc++-2.0/include -isystem
/usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include
-isystem /usr/include/libxml++-2.6 -isystem /usr/lib/libxml++-2.6/include -MMD
-MP -DRAPIDJSON_HAS_STDSTRING -DCUSTOM_MEMORY_MANAGEMENT=0 -D_FORTIFY_SOURCE=2 
 -c -MT dhu.o -MT dhu.d -MT ../doc/doxygen/html/error_list.html -MF dhu.Td -o
dhu.o /home/me/workspace/haha/prog/proj/src/worker/dhu.cc  && mv -f dhu.Td
dhu.d


clang version 5.0.0 (trunk 301182)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.2.0
Found candidate GCC installation:
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.1.0
Found candidate GCC installation:
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.2.0
Found candidate GCC installation:
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/6.3.0
Found candidate GCC installation:
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.0-superseded
Found candidate GCC installation:
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/7.0.1
Found candidate GCC installation:
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/8.0.0
Found candidate GCC installation:
/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.0
Found candidate GCC installation:
/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.9.2
Found candidate GCC installation:
/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.1.0
Found candidate GCC installation:
/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.2.0
Found candidate GCC installation:
/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0
Selected GCC installation: /usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/8.0.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
 "/usr/local/bin/clang-3.6" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj
-mrelax-all -disable-free -main-file-name dhu.cc -mrelocation-model pic
-pic-level 2 -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -v
-dwarf-column-info -debug-info-kind=limited -dwarf-version=4
-debugger-tuning=gdb -coverage-notes-file
/home/me/workspace/haha/__build-clang++-compat/dhu.gcno -resource-dir
/usr/local/lib/clang/5.0.0 -dependency-file dhu.Td -MP -MT dhu.o -MT dhu.d -MT
../doc/doxygen/html/error_list.html -isystem cps -isystem
cps/__build-clang++-compat -isystem cps/booster -isystem
cps/__build-clang++-compat/booster -isystem lmc -isystem
lmc/__build-clang++-compat -isystem au -isystem rj -isystem
/home/me/workspace/haha/third_party/gmock -isystem /usr/include/libxml2
-isystem /usr/include/glibmm-2.4 -isystem
/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -isystem /usr/include/sigc++-2.0
-isystem /usr/lib/x86_64-linux-gnu/sigc++-2.0/include -isystem
/usr/include/glib-2.0 -isystem /usr/lib/x86_64-linux-gnu/glib-2.0/include
-isystem /usr/include/libxml++-2.6 -isystem /usr/lib/libxml++-2.6/include -D
_GLIBCXX_USE_CXX11_ABI=0 -I api -I /home/me/workspace/haha -I
/home/me/workspace/haha/prog -I sdk -I /home/me/workspace/haha/logger/src -D
RAPIDJSON_HAS_STDSTRING -D CUSTOM_MEMORY_MANAGEMENT=0 -D _FORTIFY_SOURCE=2
-internal-isystem
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/8.0.0/../../../../include/c++
-internal-isystem
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/8.0.0/../../../../include/c++/x86_64-pc-linux-gnu
-internal-isystem
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/8.0.0/../../../../include/c++/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/local/lib/clang/5.0.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -O0 -Wno-error-null-dereference -Wall
-Wextra -Wformat=2 -Wshadow -Werror -Wmissing-include-dirs -Wuninitialized
-Wfloat-equal -Wcast-align -Wcast-qual -Wwrite-strings -Wno-error=pragmas
-pedantic -std=c++11 -fdeprecated-macro -fdebug-compilation-dir
/home/me/workspace/haha/__build-clang++-compat -ferror-limit 19
-fmessage-length 211 -fsanitize=address
-fsanitize-blacklist=/usr/local/lib/clang/5.0.0/asan_blacklist.txt
-fsanitize-address-use-after-scope -fno-assume-sane-operator-new
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o dhu.o -x c++
/home/me/workspace/haha/prog/proj/src/worker/dhu.cc
clang -cc1 version 5.0.0 based upon LLVM 5.0.0svn default target
x86_64-unknown-linux-gnu
ignoring nonexistent directory
"/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/8.0.0/../../../../include/c++/x86_64-pc-linux-gnu"
ignoring nonexistent directory
"/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/8.0.0/../../../../include/c++/backward"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
 api
 /home/me/workspace/haha
 /home/me/workspace/haha/prog
 sdk
 /home/me/workspace/haha/logger/src
 cps
 cps/__build-clang++-compat
 cps/booster
 cps/__build-clang++-compat/booster
 lmc
 lmc/__build-clang++-compat
 au
 rj
 /home/me/workspace/haha/third_party/gmock
 /usr/include/libxml2
 /usr/include/glibmm-2.4
 /usr/lib/x86_64-linux-gnu/glibmm-2.4/include
 /usr/include/sigc++-2.0
 /usr/lib/x86_64-linux-gnu/sigc++-2.0/include
 /usr/include/glib-2.0
 /usr/lib/x86_64-linux-gnu/glib-2.0/include
 /usr/include/libxml++-2.6
 /usr/lib/libxml++-2.6/include
 /usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/8.0.0/../../../../include/c++
 /usr/local/include
 /usr/local/lib/clang/5.0.0/include
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
In file included from /home/me/workspace/haha/prog/proj/src/worker/dhu.cc:8:
In file included from
/home/me/workspace/haha/prog/proj/src/worker/dns_lookup_work_item.h:12:
/home/me/workspace/haha/prog/proj/src/worker/awi.h:14:10: fatal error: 'chrono'
file not found
#include <chrono>
         ^~~~~~~~
1 error generated.

There are many GCC versions on my system, usually configured with
--enable-version-specific-runtime-libs.
It was finding them fine until recently.

It seems to me that too many ".."s are the problem in
/usr/local/bin/../lib/gcc/x86_64-pc-linux-gnu/8.0.0/../../../../include/c++
(which resolves to /usr/local/include/c++). The correct location is 
/usr/local/lib/gcc/x86_64-pc-linux-gnu/8.0.0/include/c++</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>