[cfe-dev] llvm can't use headers from gcc 4.4 on centos Linux x86

Richard Spillane necro351 at gmail.com
Thu Oct 28 10:33:16 PDT 2010


Hey, thanks for getting back to me.  So, I hate when this happens, but
I checked out a fresh copy of the repo from svn, built it with gcc44
and g++44 right off the bat (as opposed to trying 41 first), and also
made my object directory separate from the source dir (which I didn't
do last time, and allows me to do make dist-clean).  This time it
built, and was able to compile hello.cpp, my std::cout program that
includes <iostream>.  I don't know which of these actions made it
'work', but I can confirm that with gcc/++44 it works.  However it
doesn't pass make check without issuing some "unexpected errors"m.
I've attached the failed errors.

My question is: are these standard errors for CentOS 5.x with gcc44
and g++44?  The patch with my changes follow (just 10-ish lines).  You
mentioned a patch set, I googled around but wasn't able to find it.
Where can I get a copy of the CentOS patch set?  Is it much different
then this patch of mine?

The paths I added were generated by "gcc44 -v -x c++ /dev/null
-fsyntax-only" as instructed by the web page docs.

Thanks.

crossroads$ svn diff
Index: lib/Frontend/InitHeaderSearch.cpp
===================================================================
--- lib/Frontend/InitHeaderSearch.cpp   (revision 117545)
+++ lib/Frontend/InitHeaderSearch.cpp   (working copy)
@@ -645,6 +645,13 @@
     //===------------------------------------------------------------------===//
     // Redhat based distros.
     //===------------------------------------------------------------------===//
+    // Centos 5.3
+    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.0","", "", "", triple);
+    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.0/x86_64-redhat-linux6E","",
"", "", triple);
+    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.0/backward","",
"", "", triple);
+    AddGnuCPlusPlusIncludePaths("/usr/local/include","", "", "", triple);
+    AddGnuCPlusPlusIncludePaths("/usr/lib/gcc/x86_64-redhat-linux6E/4.4.0/include","",
"", "", triple);
+
     // Fedora 13
     AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4.4",
                                 "x86_64-redhat-linux", "32", "", triple);

On Wed, Oct 27, 2010 at 11:47 PM, NAKAMURA Takumi <geek4civic at gmail.com> wrote:
> Richard, good afternoon.
> I have some questions for you.
>
>
> Which version of CentOS do you use? I assume CentOS 5.x.
>
> Is your g++-4.4.0 the package "gcc44-c++" provided by centos.org?
>
> Which version of clang/llvm do you build?
>
> Do you build clang/llvm with gcc44?
>
> What is your modification? Please show us by diff -u or svn diff
>
>
> FYI, clang/llvm is available on centos5 with a few patches.
> (you know, it requires gcc44)
> simple std::cout works w/o any errors with clang++.
>
> $ ./config.status --version
> llvm config.status 2.9svn
> configured by ../../llvm/configure, generated by GNU Autoconf 2.60,
>  with options "'-C' '--enable-optimized=1' '--enable-targets=all'
> 'CC=gcc44' 'CXX=g++44'"
>
>
> ...Takumi
>
>
> 2010/10/28 Richard Spillane <necro351 at gmail.com>:
>> Tried building a simple cout << "Hello!" << endl program using
>> <iostream> and failed while trying to compile the iostream headers and
>> their dependencies.  The errors effected gcc 4.4 on x86_64 Centos
>> Linux.
>>
>> I've attached the error output.
>>
>> centos default is gcc 4.1.2, not 4.4.0, and I did modify the header
>> search for both C and C++ FIXMEs.
>>
>> --
>> Richard P. Spillane
>> File Systems and Storage Lab
>> Stony Brook University
>> necro351 at gmail.com
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>>
>



-- 
Richard P. Spillane
File Systems and Storage Lab
Stony Brook University
necro351 at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stdout
Type: application/octet-stream
Size: 10185 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101028/d809fb37/attachment.obj>


More information about the cfe-dev mailing list