<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 25, 2014 at 2:08 PM, Tyler Brock <span dir="ltr">&lt;<a href="mailto:tyler.brock@gmail.com" target="_blank">tyler.brock@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Here is a gist containing the output of attempting to compile the program after installing the clang package on each platform I mentioned:<div>
<br></div><div><a href="https://gist.github.com/TylerBrock/9771402" target="_blank">https://gist.github.com/TylerBrock/9771402</a><span class=""><font color="#888888"><br>


</font></span></div><div class="gmail_extra"><span class=""><font color="#888888"><div><div dir="ltr"><br>-Tyler<br></div></div></font></span><div><div class="h5">
<br><br><div class="gmail_quote">On Tue, Mar 25, 2014 at 4:54 PM, Tyler Brock <span dir="ltr">&lt;<a href="mailto:tyler.brock@gmail.com" target="_blank">tyler.brock@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div dir="ltr">To my knowledge it was originally based on CentOS but it has since diverged.<div><br></div><div>It may be useful to mention that this same issue affects multiple Red Hat derivatives (including RHEL 6.4 itself) and not just Amazon Linux. I attempted the same process on Red Hat 6.4, Fedora 20, and Amazon Linux 2013.09, and it fails on all three of these distributions with the same errors. In fact, the only distribution on which I have been able to get it to work is CentOS 6.4.</div>






<div class="gmail_extra"><div><div dir="ltr"><br>-Tyler<br></div></div>
<br><br><div class="gmail_quote"><div><div>On Tue, Mar 25, 2014 at 1:46 AM, Dave Johansen <span dir="ltr">&lt;<a href="mailto:davejohansen@gmail.com" target="_blank">davejohansen@gmail.com</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>


<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div>On Mon, Mar 24, 2014 at 6:38 PM, Tyler Brock <span dir="ltr">&lt;<a href="mailto:tyler.brock@gmail.com" target="_blank">tyler.brock@gmail.com</a>&gt;</span> wrote:<br>







<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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><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></blockquote><div><br></div></div></div><div>I&#39;m the maintainer of clang in the EPEL, but honestly I know nothing about Amazon Linux. Is it an &quot;EL variant&quot; or claim any sort of compatibility with EL? A known issue even on EL/CentOS with clang is that much of the C++11/14 support won&#39;t work because of the old version of the standard library that is available on EL. It sounds like this isn&#39;t your issue, but if C++11/14 support is desired, then the devtoolset ( <a href="http://rhn.redhat.com/errata/RHEA-2013-1226.html" target="_blank">http://rhn.redhat.com/errata/RHEA-2013-1226.html</a> ) is the best route to follow. <br>







</div></div></div></div>
<br></div></div>_______________________________________________<br>
epel-devel mailing list<br>
<a href="mailto:epel-devel@lists.fedoraproject.org" target="_blank">epel-devel@lists.fedoraproject.org</a><br>
<a href="https://admin.fedoraproject.org/mailman/listinfo/epel-devel" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/epel-devel</a><br>
<br></blockquote></div><br></div></div>
</blockquote></div><br></div></div></div></div>
<br>_______________________________________________<br>
epel-devel mailing list<br>
<a href="mailto:epel-devel@lists.fedoraproject.org">epel-devel@lists.fedoraproject.org</a><br>
<a href="https://admin.fedoraproject.org/mailman/listinfo/epel-devel" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/epel-devel</a><br>
<br></blockquote></div><br></div><div class="gmail_extra">I&#39;ve tested on CentOS 6.5, RHEL 6.5 and RHEL 6.4 and all of them work. Do you have the package libstdc++-devel installed? That package not being installed is the only thing that I can think of that might be causing this problem and maybe that package should be listed as a requires in the .spec for clang.<br>
</div></div>