include <new>

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

include <new>

david raila
More of a platform than compiler issue, but where do things like
<new> and <csdtdef> come from?  I seem to be picking up from gcc-4.4.2
and failing:

#include <stdio.h>
#include <new>

In file included from /usr/include/c++/4.4.2/new:39:
/usr/include/c++/4.4.2/cstddef:42:10: fatal error: 'bits/c++config.h'
file not
       found
#include <bits/c++config.h>


Thanks
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: include <new>

Eli Friedman
On Fri, Jan 15, 2010 at 1:17 PM, david raila <[hidden email]> wrote:

> More of a platform than compiler issue, but where do things like
> <new> and <csdtdef> come from?  I seem to be picking up from gcc-4.4.2
> and failing:
>
> #include <stdio.h>
> #include <new>
>
> In file included from /usr/include/c++/4.4.2/new:39:
> /usr/include/c++/4.4.2/cstddef:42:10: fatal error: 'bits/c++config.h'
> file not
>       found
> #include <bits/c++config.h>

That's the fault of the C++ header path hacks in
lib/Frontend/InitHeaderSearch.cpp; you probably need to add a missing
entry.

-Eli

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: include <new>

Дмитрий Дьяченко
Look identical to PR5902.

I try add missing PATH into InitHeaderSearch.cpp and hit more errs:

llvm$ cat tst.cpp
#include <iostream>

llvm$ clang++ -c tst.cpp
In file included from tst.cpp:1:
In file included from /usr/include/c++/4.3.2/iostream:44:
In file included from /usr/include/c++/4.3.2/ostream:44:
In file included from /usr/include/c++/4.3.2/ios:43:
In file included from /usr/include/c++/4.3.2/iosfwd:46:
In file included from /usr/include/c++/4.3.2/bits/postypes.h:46:
In file included from /usr/include/c++/4.3.2/cwchar:48:
/usr/include/c++/4.3.2/cstddef:47:15: fatal error: 'stddef.h' file not found
#include_next <stddef.h>
              ^
1 diagnostic generated.


reference: http://llvm.org/bugs/show_bug.cgi?id=5902#c8


Patch:
Index: InitHeaderSearch.cpp
===================================================================
--- InitHeaderSearch.cpp        (revision 93873)
+++ InitHeaderSearch.cpp        (working copy)
@@ -508,6 +508,10 @@
     AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3.2",
                                 "i386-redhat-linux","", "", triple);

+    // Fedora 10 x86_64
+    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3.2",
+                                "x86_64-redhat-linux", "32", "", triple);
+
     // Fedora 11


Dmitry

2010/1/16 Eli Friedman <[hidden email]>

>
> On Fri, Jan 15, 2010 at 1:17 PM, david raila <[hidden email]> wrote:
> > More of a platform than compiler issue, but where do things like
> > <new> and <csdtdef> come from?  I seem to be picking up from gcc-4.4.2
> > and failing:
> >
> > #include <stdio.h>
> > #include <new>
> >
> > In file included from /usr/include/c++/4.4.2/new:39:
> > /usr/include/c++/4.4.2/cstddef:42:10: fatal error: 'bits/c++config.h'
> > file not
> >       found
> > #include <bits/c++config.h>
>
> That's the fault of the C++ header path hacks in
> lib/Frontend/InitHeaderSearch.cpp; you probably need to add a missing
> entry.
>
> -Eli
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: include <new>

Chris Lattner
applied in r93948, thanks

On Jan 19, 2010, at 4:05 AM, Дмитрий Дьяченко wrote:

> Look identical to PR5902.
>
> I try add missing PATH into InitHeaderSearch.cpp and hit more errs:
>
> llvm$ cat tst.cpp
> #include <iostream>
>
> llvm$ clang++ -c tst.cpp
> In file included from tst.cpp:1:
> In file included from /usr/include/c++/4.3.2/iostream:44:
> In file included from /usr/include/c++/4.3.2/ostream:44:
> In file included from /usr/include/c++/4.3.2/ios:43:
> In file included from /usr/include/c++/4.3.2/iosfwd:46:
> In file included from /usr/include/c++/4.3.2/bits/postypes.h:46:
> In file included from /usr/include/c++/4.3.2/cwchar:48:
> /usr/include/c++/4.3.2/cstddef:47:15: fatal error: 'stddef.h' file not found
> #include_next <stddef.h>
>              ^
> 1 diagnostic generated.
>
>
> reference: http://llvm.org/bugs/show_bug.cgi?id=5902#c8
>
>
> Patch:
> Index: InitHeaderSearch.cpp
> ===================================================================
> --- InitHeaderSearch.cpp        (revision 93873)
> +++ InitHeaderSearch.cpp        (working copy)
> @@ -508,6 +508,10 @@
>     AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3.2",
>                                 "i386-redhat-linux","", "", triple);
>
> +    // Fedora 10 x86_64
> +    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.3.2",
> +                                "x86_64-redhat-linux", "32", "", triple);
> +
>     // Fedora 11
>
>
> Dmitry
>
> 2010/1/16 Eli Friedman <[hidden email]>
>>
>> On Fri, Jan 15, 2010 at 1:17 PM, david raila <[hidden email]> wrote:
>>> More of a platform than compiler issue, but where do things like
>>> <new> and <csdtdef> come from?  I seem to be picking up from gcc-4.4.2
>>> and failing:
>>>
>>> #include <stdio.h>
>>> #include <new>
>>>
>>> In file included from /usr/include/c++/4.4.2/new:39:
>>> /usr/include/c++/4.4.2/cstddef:42:10: fatal error: 'bits/c++config.h'
>>> file not
>>>       found
>>> #include <bits/c++config.h>
>>
>> That's the fault of the C++ header path hacks in
>> lib/Frontend/InitHeaderSearch.cpp; you probably need to add a missing
>> entry.
>>
>> -Eli
>>
>> _______________________________________________
>> cfe-dev mailing list
>> [hidden email]
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [cfe-dev] include <new>

Дмитрий Дьяченко
2010/1/20 Chris Lattner <[hidden email]>:
> applied in r93948, thanks

thanks.

But now i have next err.message (Fedora 10 / x86_64)

llvm$ clang++  -c tst.cpp
In file included from tst.cpp:1:
In file included from /usr/include/c++/4.3.2/iostream:44:
In file included from /usr/include/c++/4.3.2/ostream:44:
In file included from /usr/include/c++/4.3.2/ios:43:
In file included from /usr/include/c++/4.3.2/iosfwd:46:
In file included from /usr/include/c++/4.3.2/bits/postypes.h:46:
In file included from /usr/include/c++/4.3.2/cwchar:48:
/usr/include/c++/4.3.2/cstddef:47:15: fatal error: 'stddef.h' file not found
#include_next <stddef.h>
              ^
1 diagnostic generated.

llvm$ cat tst.cpp
#include <iostream>


Need i file PR ? Or i miss something trivial with configure/run clang++ ?

If i add -I/usr/include/linux, then more errs happens

clang++ -I/usr/include/linux -c tst.cpp
In file included from tst.cpp:1:
In file included from /usr/include/c++/4.3.2/iostream:44:
In file included from /usr/include/c++/4.3.2/ostream:44:
In file included from /usr/include/c++/4.3.2/ios:43:
In file included from /usr/include/c++/4.3.2/iosfwd:46:
In file included from /usr/include/c++/4.3.2/bits/postypes.h:46:
In file included from /usr/include/c++/4.3.2/cwchar:48:
/usr/include/c++/4.3.2/cstddef:47:15: fatal error: 'stddef.h' file not found
#include_next <stddef.h>
              ^
clang: DeclBase.cpp:420: void clang::Decl::CheckAccessDeclContext()
const: Assertion `Access != AS_none && "Access specifier is AS_none
inside a record decl"' failed.
[...]

Dmitry
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: [cfe-dev] include <new>

Nuno Lopes
> But now i have next err.message (Fedora 10 / x86_64)
>
> llvm$ clang++  -c tst.cpp
> In file included from tst.cpp:1:
> In file included from /usr/include/c++/4.3.2/iostream:44:
> In file included from /usr/include/c++/4.3.2/ostream:44:
> In file included from /usr/include/c++/4.3.2/ios:43:
> In file included from /usr/include/c++/4.3.2/iosfwd:46:
> In file included from /usr/include/c++/4.3.2/bits/postypes.h:46:
> In file included from /usr/include/c++/4.3.2/cwchar:48:
> /usr/include/c++/4.3.2/cstddef:47:15: fatal error: 'stddef.h' file not
> found
> #include_next <stddef.h>
>              ^
> 1 diagnostic generated.
>
> llvm$ cat tst.cpp
> #include <iostream>


This is a know bug: http://llvm.org/bugs/show_bug.cgi?id=5188
(btw, gcc 4.4 and newer versions don't do this #include and so the bug is
not triggered)

Nuno

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev