EPEL Clang package doesn't work on Amazon Linux

Dave Johansen davejohansen at gmail.com
Tue Mar 25 05:46:04 UTC 2014


On Mon, Mar 24, 2014 at 6:38 PM, Tyler Brock <tyler.brock at gmail.com> wrote:

> Hey Everyone,
>
> I'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:
>     #include <iostream>
>
>     int main(){
>         std::cout << "Hello World" << std::endl;
>     }
>
> Saving the above into a file named test.cpp and compiling with "clang++
> test.cpp" produces the following error:
>
>     test.cpp:1:10: fatal error: 'iostream' file not found
>     #include <iostream>
>                  ^
> 1 error generated.
>
> 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.
>
> 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.
>
> I've tried installing devel headers for clang and multiple versions of
> libstd++ which seem to be placed in /usr/include/c++/<gcc-version> but
> which, when used by gcc, do not require the path to them be specified at
> all. It just works.
>
> 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.
>
> It may also be worth noting that on CentOS the clang package seems to work
> fine.
>

I'm the maintainer of clang in the EPEL, but honestly I know nothing about
Amazon Linux. Is it an "EL variant" 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't work because of the old version of the standard library that
is available on EL. It sounds like this isn't your issue, but if C++11/14
support is desired, then the devtoolset (
http://rhn.redhat.com/errata/RHEA-2013-1226.html ) is the best route to
follow.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/epel-devel/attachments/20140324/b8e60e99/attachment.html>


More information about the epel-devel mailing list