<div dir="ltr">Hi folks,<div><br></div><div>So, after a clean install of compiler-rt on my x86_64 box, I managed to isolate the error I was getting, and it seems to be related to how Clang adds the default include paths.</div>
<div><br></div><div>This is the error:</div><div><br></div><div><div>... while compiling "allocator_test.cc":</div><div>In file included from /home/rengolin/devel/llvm/src/compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc:21:<br>
</div><div>In file included from /home/rengolin/devel/llvm/src/llvm/utils/unittest/googletest/include/gtest/gtest.h:54:</div><div>/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/limits:42:10: fatal error: 'bits/c++config.h' file not found</div>
<div>#include <bits/c++config.h></div><div> ^</div><div>1 error generated.</div></div><div><br></div><div>As it turns out, Linux Mint stores the c++config.h file at:</div><div><br></div><div>/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++config.h<br>
</div><div><br></div><div>But the multilib logic in Clang (Linux::addLibStdCXXIncludePaths) uses the BiarchSuffix (which in my case it's 32), but that's not there at all.</div><div><br></div><div>When I added another line to that removing the BiarchSuffix, I got other errors:</div>
<div><br></div><div><div>/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/limits:1410:59: error: __int128 is not supported on this target</div><div>/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/limits:131:43: note: expanded from macro '__glibcxx_min'</div>
<div> (__glibcxx_signed (T) ? -__glibcxx_max (T) - 1 : (T)0)</div><div> ^</div><div>/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/limits:135:35: note: expanded from macro '__glibcxx_max'</div>
<div> (((((T)1 << (__glibcxx_digits (T) - 1)) - 1) << 1) + 1) : ~(T)0)</div><div> ^</div><div>/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/limits:138:49: note: expanded from macro '__glibcxx_digits'</div>
<div> (sizeof(T) * __CHAR_BIT__ - __glibcxx_signed (T))</div><div> ^</div><div>/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/limits:128:31: note: expanded from macro '__glibcxx_signed'</div>
<div>#define __glibcxx_signed(T) ((T)(-1) < 0)</div></div><div><br></div><div><br></div><div>So, I'm not really sure how to proceed. Isn't anyone seeing this? Did I mess up my compilation environment that badly? I do have a few versions of ARM gcc installed via the package management, but even after removing the x86-multilib GCC packages, I still have that error.</div>
<div><br></div><div>Ideas?</div><div><br></div><div>cheers,</div><div>--renato</div></div>