<div dir="ltr">Hey Everyone,<div><br></div><div>I&#39;ve been trying to use clang package on Amazon linux via EPEL and have installed version 3.4-9.el6 yet am unable to compile even the simplest of programs:</div><div><br>

</div><div><div>    #include &lt;iostream&gt;</div><div><br></div><div>    int main(){</div><div>        std::cout &lt;&lt; &quot;Hello World&quot; &lt;&lt; std::endl;</div><div>    }</div><div><br></div><div>Saving the above into a file named test.cpp and compiling with &quot;clang++ test.cpp&quot; produces the following error:</div>

<div><br></div><div>    test.cpp:1:10: fatal error: &#39;iostream&#39; file not found</div><div>    #include &lt;iostream&gt;</div><div>                 ^</div><div>1 error generated.</div><div><br></div><div>When attempting the same with gcc (g++) it works as expected so It seems like the clang compiler cannot find the required C++ headers and library files. </div>

<div><br></div><div>I have contacted Amazon AWS support and they verified that the issue is reproducible by them running the latest version of Amazon Linux with updated packages from EPEL.</div><div><br></div><div>I&#39;ve tried installing devel headers for clang and multiple versions of libstd++ which seem to be placed in /usr/include/c++/&lt;gcc-version&gt; but which, when used by gcc, do not require the path to them be specified at all. It just works.</div>

<div><br></div><div>I have a feeling the clang package is not built to work properly with Amazon Linux as C++ headers and library files (for either for libc++ or libstdc++) such as iostream should be found by default. Any help in resolving the matter would be greatly appreciated.</div>

<div><br></div><div>It may also be worth noting that on CentOS the clang package seems to work fine.</div><div><div dir="ltr"><br>-Tyler<br></div></div>
</div></div>