system includes

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

system includes

Diego Iastrubni
On Mon, Feb 15, 2010 at 1:42 PM, Holger Schurig <[hidden email]> wrote:
I read that clang-c++ can "barely" compile CMake, Firefox, Qt,
 
clang/trunk cannot compile Qt/head right now, at least under windows when using the mingw standard library. The problem is caused by
http://llvm.org/bugs/show_bug.cgi?id=6295

Currently the code just randomly adds directories instead of guessing the best one for this compilation. I will create a patch which fixes this under mingw, by creating a list of available directories and choosing the "best" one - the one with the higher version number. I did not analyze the exact problem under Linux, I will do it later on when I come home, but my guess is that this is something similar to the problem I see under windows.

Regarding Qt - this will need some work, and mostly time. I started working on this in my branch: http://qt.gitorious.org/~elcuco/qt/llvm-support/commits/llvm-support , but IMHO most of the problems are right now in the clang part, not the code in Qt.

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

Re: system includes

Anton Korobeynikov
Hello

> Regarding Qt - this will need some work, and mostly time. I started working
> on this in my branch:
> http://qt.gitorious.org/~elcuco/qt/llvm-support/commits/llvm-support , but
> IMHO most of the problems are right now in the clang part, not the code in
> Qt.
I dunno for mingw, but qt almostly compiles & runs for me on linux.

Almostly here means:
qmake works (so, I'm using clang-built qmake), clang-compiled linguist
& pixeltool work as well.
uic does not work (generates bogus output), some parts cannot be
compiled right now as well (CLucence & libPhonon) at least.

--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: system includes

Diego Iastrubni
On Mon, Feb 15, 2010 at 2:53 PM, Anton Korobeynikov <[hidden email]> wrote:
I dunno for mingw, but qt almostly compiles & runs for me on linux.
uic does not work (generates bogus output), some parts cannot be
compiled right now as well (CLucence & libPhonon) at least.
 
This will explain why I had problems compiling the printing stuff... this is the first module in the build system which uses UIC to build GUI... ok, thanks. That explains a lot :)

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

system includes

Andy Wick
In reply to this post by Diego Iastrubni
system includes Stupid question, if using g++ to compile clang would it be possible to discover the system include just by looking at the –v output?  We use non standard locations.

g++ -v t.c
#include <...> search starts here:
 /opt/bcs/packages/gcc4-4.3.3/bin/../lib/gcc/i686-pc-linux-gnu/4.3.3/include
 /opt/bcs/packages/gcc4-4.3.3/bin/../lib/gcc/i686-pc-linux-gnu/4.3.3/include-fixed
 /opt/bcs/packages/gcc4-4.3.3/bin/../lib/gcc/../../include/g++
 /opt/bcs/packages/gcc4-4.3.3/bin/../lib/gcc/../../include/g++/i686-pc-linux-gnu
 /opt/bcs/packages/gcc4-4.3.3/bin/../lib/gcc/../../include/g++/backward
 /opt/bcs/include
 /opt/bcs/packages/gcc4-4.3.3/bin/../lib/gcc/../../include
 /usr/include
End of search list.

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

Re: system includes

Douglas Gregor

On Feb 15, 2010, at 5:21 AM, Andy Wick wrote:

Stupid question, if using g++ to compile clang would it be possible to discover the system include just by looking at the –v output?  We use non standard locations.

Yes. We've been hoping that someone would contribute configure logic to probe the system compiler to determine what system includes should be baked into the Clang we build. It's important, but nobody has gotten around to doing it yet.

Interested? :)

- Doug

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

Re: system includes

Diego Iastrubni
In reply to this post by Andy Wick
So you want to lock the directories to the directories of the compiler which bootstrapped clang? Not smart, what happens when you change gcc compiler on your system? clang will fail.

IMHO, the best solution would be to find it on "standard" paths... maybe add a "--gcc-include-path" parameter or something. What do you think?

On Mon, Feb 15, 2010 at 3:21 PM, Andy Wick <[hidden email]> wrote:
Stupid question, if using g++ to compile clang would it be possible to discover the system include just by looking at the –v output?  We use non standard locations.

g++ -v t.c
#include <...> search starts here:
 /opt/bcs/packages/gcc4-4.3.3/bin/../lib/gcc/i686-pc-linux-gnu/4.3.3/include
 /opt/bcs/packages/gcc4-4.3.3/bin/../lib/gcc/i686-pc-linux-gnu/4.3.3/include-fixed
 /opt/bcs/packages/gcc4-4.3.3/bin/../lib/gcc/../../include/g++
 /opt/bcs/packages/gcc4-4.3.3/bin/../lib/gcc/../../include/g++/i686-pc-linux-gnu
 /opt/bcs/packages/gcc4-4.3.3/bin/../lib/gcc/../../include/g++/backward
 /opt/bcs/include
 /opt/bcs/packages/gcc4-4.3.3/bin/../lib/gcc/../../include
 /usr/include
End of search list.

_______________________________________________
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: system includes

Rafael Espindola
On 15 February 2010 15:45, Diego Iastrubni <[hidden email]> wrote:
> So you want to lock the directories to the directories of the compiler which
> bootstrapped clang? Not smart, what happens when you change gcc compiler on
> your system? clang will fail.
>
> IMHO, the best solution would be to find it on "standard" paths... maybe add
> a "--gcc-include-path" parameter or something. What do you think?

Clang's configure (llvm's actually) script already has options to use
a particular include directory for C or C++. A --copy-gcc=/usr/bin/gcc
would be an extra convenience for those that just want to build clang
to work as a system compiler.

Cheers,
--
Rafael Ávila de Espíndola

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

Re: system includes

Andy Wick
In reply to this post by Diego Iastrubni
Re: [cfe-dev] system includes So I’m thinking in the case when I compile clang on the system from svn and will probably keep them in sync.  You are right that this probably doesn’t make sense in distribution builds.  However, I’m not sure this is any worse then what is already done, where some “random” paths are already compiled in (see my clang++ -v t.cc below) :-)   Might even speed up clang by a few nanosecs to not have to stat those non existent directories on every run. :)

Maybe a simpler fix for me now is to soft link all the g++ includes into /usr/local/lib/clang/1.1/include  (btw should that be 2.7?) which is better then having to edit InitHeaderSearch.cpp

Thanks,
Andy



clang -cc1 version 1.1 based upon llvm 2.7svn hosted on i386-pc-linux-gnu
ignoring nonexistent directory "/usr/include/c++/4.4.3"
ignoring nonexistent directory "/usr/include/c++/4.4.3/x86_64-pc-linux-gnu/32"
ignoring nonexistent directory "/usr/include/c++/4.4.3/backward"
ignoring nonexistent directory "/usr/include/c++/4.4.3"
ignoring nonexistent directory "/usr/include/c++/4.4.3/i686-pc-linux-gnu/"
ignoring nonexistent directory "/usr/include/c++/4.4.3/backward"
ignoring nonexistent directory "/usr/include/c++/4.4.2"
ignoring nonexistent directory "/usr/include/c++/4.4.2/x86_64-linux-gnu/32"
ignoring nonexistent directory "/usr/include/c++/4.4.2/backward"
ignoring nonexistent directory "/usr/include/c++/4.1.3"
ignoring nonexistent directory "/usr/include/c++/4.1.3/i486-linux-gnu/"
ignoring nonexistent directory "/usr/include/c++/4.1.3/backward"
ignoring nonexistent directory "/usr/include/c++/4.3.3"
ignoring nonexistent directory "/usr/include/c++/4.3.3/x86_64-linux-gnu/32"
ignoring nonexistent directory "/usr/include/c++/4.3.3/backward"
ignoring nonexistent directory "/usr/include/c++/4.4.1"
ignoring nonexistent directory "/usr/include/c++/4.4.1/x86_64-linux-gnu/32"
ignoring nonexistent directory "/usr/include/c++/4.4.1/backward"
ignoring nonexistent directory "/usr/include/c++/4.1.2"
ignoring nonexistent directory "/usr/include/c++/4.1.2/i386-redhat-linux/"
ignoring nonexistent directory "/usr/include/c++/4.1.2/backward"
ignoring nonexistent directory "/usr/include/c++/4.3.0"
ignoring nonexistent directory "/usr/include/c++/4.3.0/i386-redhat-linux/"
ignoring nonexistent directory "/usr/include/c++/4.3.0/backward"
ignoring nonexistent directory "/usr/include/c++/4.3.2"
ignoring nonexistent directory "/usr/include/c++/4.3.2/i386-redhat-linux/"
ignoring nonexistent directory "/usr/include/c++/4.3.2/backward"
ignoring nonexistent directory "/usr/include/c++/4.3.2"
ignoring nonexistent directory "/usr/include/c++/4.3.2/x86_64-redhat-linux/32"
ignoring nonexistent directory "/usr/include/c++/4.3.2/backward"
ignoring nonexistent directory "/usr/include/c++/4.4.1"
ignoring nonexistent directory "/usr/include/c++/4.4.1/i586-redhat-linux/"
ignoring nonexistent directory "/usr/include/c++/4.4.1/backward"
ignoring nonexistent directory "/usr/include/c++/4.4.2"
ignoring nonexistent directory "/usr/include/c++/4.4.2/i686-redhat-linux/"
ignoring nonexistent directory "/usr/include/c++/4.4.2/backward"
ignoring nonexistent directory "/usr/include/c++/4.3"
ignoring nonexistent directory "/usr/include/c++/4.3/i586-suse-linux/"
ignoring nonexistent directory "/usr/include/c++/4.3/backward"
ignoring nonexistent directory "/usr/include/c++/4.3"
ignoring nonexistent directory "/usr/include/c++/4.3/x86_64-suse-linux/32"
ignoring nonexistent directory "/usr/include/c++/4.3/backward"
ignoring nonexistent directory "/usr/include/c++/4.4"
ignoring nonexistent directory "/usr/include/c++/4.4/i586-suse-linux/"
ignoring nonexistent directory "/usr/include/c++/4.4/backward"
ignoring nonexistent directory "/usr/include/c++/4.4"
ignoring nonexistent directory "/usr/include/c++/4.4/x86_64-suse-linux/"
ignoring nonexistent directory "/usr/include/c++/4.4/backward"
ignoring nonexistent directory "/usr/include/c++/4.3.1"
ignoring nonexistent directory "/usr/include/c++/4.3.1/i686-pc-linux-gnu/"
ignoring nonexistent directory "/usr/include/c++/4.3.1/backward"
ignoring nonexistent directory "/usr/include/c++/4.3.1"
ignoring nonexistent directory "/usr/include/c++/4.3.1/x86_64-unknown-linux-gnu/"
ignoring nonexistent directory "/usr/include/c++/4.3.1/backward"
ignoring nonexistent directory "/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4"
ignoring nonexistent directory "/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/i686-pc-linux-gnu/"
ignoring nonexistent directory "/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4/backward"
ignoring nonexistent directory "/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/include/g++-v4"
ignoring nonexistent directory "/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/include/g++-v4/i686-pc-linux-gnu/"
ignoring nonexistent directory "/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/include/g++-v4/backward"
ignoring nonexistent directory "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4"
ignoring nonexistent directory "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/i686-pc-linux-gnu/"
ignoring nonexistent directory "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/backward"
ignoring nonexistent directory "/usr/include/c++/4.3"
ignoring nonexistent directory "/usr/include/c++/4.3/i486-pc-linux-gnu/"
ignoring nonexistent directory "/usr/include/c++/4.3/backward"
ignoring nonexistent directory "/usr/include/c++/4.3"
ignoring nonexistent directory "/usr/include/c++/4.3/i486-linux-gnu/"
ignoring nonexistent directory "/usr/include/c++/4.3/backward"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/i686-pc-linux-gnu/"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4/backward"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/lib/clang/1.1/include
 /usr/local/include
 /usr/include





On 2/15/10 3:45 PM, "Diego Iastrubni" <diegoiast@...> wrote:

So you want to lock the directories to the directories of the compiler which bootstrapped clang? Not smart, what happens when you change gcc compiler on your system? clang will fail.

IMHO, the best solution would be to find it on "standard" paths... maybe add a "--gcc-include-path" parameter or something. What do you think?

On Mon, Feb 15, 2010 at 3:21 PM, Andy Wick <Andy.Wick@...> wrote:
Stupid question, if using g++ to compile clang would it be possible to discover the system include just by looking at the –v output?  We use non standard locations.

g++ -v t.c
#include <...> search starts here:
 /opt/bcs/packages/gcc4-4.3.3/bin/../lib/gcc/i686-pc-linux-gnu/4.3.3/include
 /opt/bcs/packages/gcc4-4.3.3/bin/../lib/gcc/i686-pc-linux-gnu/4.3.3/include-fixed
 /opt/bcs/packages/gcc4-4.3.3/bin/../lib/gcc/../../include/g++
 /opt/bcs/packages/gcc4-4.3.3/bin/../lib/gcc/../../include/g++/i686-pc-linux-gnu
 /opt/bcs/packages/gcc4-4.3.3/bin/../lib/gcc/../../include/g++/backward
 /opt/bcs/include
 /opt/bcs/packages/gcc4-4.3.3/bin/../lib/gcc/../../include
 /usr/include
End of search list.

_______________________________________________
cfe-dev mailing list
cfe-dev@...
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: system includes

Andy Wick
In reply to this post by Rafael Espindola
Re: [cfe-dev] system includes I totally missed the --with-c-include-dirs= option, that does what I need.  

Thanks,
Andy


On 2/15/10 4:05 PM, "Rafael Espindola" <espindola@...> wrote:

On 15 February 2010 15:45, Diego Iastrubni <diegoiast@...> wrote:
> So you want to lock the directories to the directories of the compiler which
> bootstrapped clang? Not smart, what happens when you change gcc compiler on
> your system? clang will fail.
>
> IMHO, the best solution would be to find it on "standard" paths... maybe add
> a "--gcc-include-path" parameter or something. What do you think?

Clang's configure (llvm's actually) script already has options to use
a particular include directory for C or C++. A --copy-gcc=/usr/bin/gcc
would be an extra convenience for those that just want to build clang
to work as a system compiler.

Cheers,
--
Rafael Ávila de Espíndola


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