One Compiler Per OS

I clone a fresh math repo, here’s my Ubuntu:

krzysztof@sph-3s9bjl2linu:~/packages/math$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"

I tried the specific clang+±6.0 you have failing and it works:

krzysztof@sph-3s9bjl2linu:~/packages/math$ clang++-6.0 -Wall -I . -isystem lib/eigen_3.3.3 -isystem lib/boost_1.66.0 -isystem lib/sundials_3.1.0/include -std=c++1y -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -Wno-unused-function -Wno-uninitialized -DGTEST_USE_OWN_TR1_TUPLE -DGTEST_HAS_PTHREAD=0 -isystem lib/gtest_1.7.0/include -isystem lib/gtest_1.7.0 -O3 -DGTEST_USE_OWN_TR1_TUPLE -DGTEST_HAS_PTHREAD=0 -isystem lib/gtest_1.7.0/include -isystem lib/gtest_1.7.0 -O3 -DNO_FPRINTF_OUTPUT -pipe  -c -o lib/gtest_1.7.0/src/gtest-all.o lib/gtest_1.7.0/src/gtest-all.cc

If I add --stdlib=libc++ I get:

lib/gtest_1.7.0/include/gtest/gtest.h:54:10: fatal error: 'limits' file not
      found
#include <limits>
         ^~~~~~~~
1 error generated.

If I add --stdlib=libstdc++ it works again. If I run with the default and -H I get that the limits file is available from:

/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/limits
/usr/include/clang/6.0.0/include/limits.h

If I run with --stdlib=libstdc++ I get the above plus /usr/include/limits.h.

If I run with --stdlib=libc++ and -H I get:

/usr/include/clang/6.0.0/include/limits.h
/usr/include/limits.h

So… it should find the file… (which does in fact exist on my system and contain the right thing…) This is an include-ordering problem because if I add -isystem /usr/include (which has limits.h all of a sudden it compiles… so… does anybody remember why we have all these -isystem options? :/