On Sun, Oct 21, 2012 at 6:34 PM, Sean Silva <span dir="ltr"><<a href="mailto:silvas@purdue.edu" target="_blank">silvas@purdue.edu</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">> I'm not sure what else could be done here. Ideas welcome :)<br>
<br>
</div>Maybe we could bake those header files directly into libFrontend?<br>
<br>
It's a bit extreme, but I think that it is probably the right thing to<br>
do here, since to be honest, it is simply unacceptable for a library<br>
to force its clients to run their tool from directories with<br>
particular directory layouts, or to install in a particular place.<br>
Imagine if, say, zlib would not function correctly without a<br>
configuration file "../share/zlib/zlib.conf", or something like<br>
that---there would be outrage.<br></blockquote><div><br></div><div>Feel free to bring this up with Chandler / Doug on IRC. I've argued that many times, and so far I've always lost (I don't remember all the points in the arguments, but I think one big point is: you wan to have headers with paths people can actually look at in their text editors).</div>
<div><br></div><div>Cheers,</div><div>/Manuel</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
-- Sean Silva<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Sun, Oct 21, 2012 at 5:13 AM, Manuel Klimek <<a href="mailto:klimek@google.com">klimek@google.com</a>> wrote:<br>
> On Fri, Oct 19, 2012 at 11:09 PM, Mohammad Adil <<a href="mailto:madil90@gmail.com">madil90@gmail.com</a>> wrote:<br>
>><br>
>> Thnx a lot for your help. Is there any chance this will be resolved soon?<br>
>> So, basically, there is absolutely no way in which proper paths for C++ can<br>
>> be added without hardcoding right now? I cloned the standard clang<br>
>> repository right now. Is there a development branch that might be more<br>
>> up-to-date?<br>
><br>
><br>
> clang-tool behave the same way clang does here - they need to find their<br>
> builtin includes; by default, the tools find those in<br>
> ../lib/clang/<version>/include.<br>
><br>
> There are two ways to solve this problem:<br>
> 1. copy the tool you wrote next to the clang binary you built from the same<br>
> source tree<br>
> 2. create an "installation" of your tool, where<br>
> ../lib/clang/<version>/include points to the builtin headers<br>
><br>
> I'm not sure what else could be done here. Ideas welcome :)<br>
><br>
> Cheers,<br>
> /Manuel<br>
><br>
>><br>
>><br>
>><br>
>> On Sat, Oct 20, 2012 at 1:39 AM, Sean Silva <<a href="mailto:silvas@purdue.edu">silvas@purdue.edu</a>> wrote:<br>
>>><br>
>>> > I checked the directories using -v and two directories namely<br>
>>> > "../lib/clang/3.2/include" and "/include" were not found. As you can<br>
>>> > see,<br>
>>> > these paths are wrong. They should be "/usr/local/lib/clang.." and<br>
>>> > "/usr/include". How can I fix this?<br>
>>><br>
>>> This is the issue that I warned you about in the other thread, and it<br>
>>> has no solution to my knowledge except for hardcoding the correct<br>
>>> path.<br>
>>><br>
>>> -- Sean Silva<br>
>>><br>
>>> On Fri, Oct 19, 2012 at 11:33 AM, Mohammad Adil <<a href="mailto:madil90@gmail.com">madil90@gmail.com</a>><br>
>>> wrote:<br>
>>> > That problem is resolved using a different CMakeLists. I am having a<br>
>>> > slightly different problem now. The tool works now but when it is<br>
>>> > giving an<br>
>>> > error:<br>
>>> ><br>
>>> > #include <stddef.h> not found<br>
>>> ><br>
>>> > I checked the directories using -v and two directories namely<br>
>>> > "../lib/clang/3.2/include" and "/include" were not found. As you can<br>
>>> > see,<br>
>>> > these paths are wrong. They should be "/usr/local/lib/clang.." and<br>
>>> > "/usr/include". How can I fix this?<br>
>>> ><br>
>>> > The second problem is that I want to run this tool on a source file<br>
>>> > rather<br>
>>> > than code given through command line. How do I do that? I also want to<br>
>>> > retain the original locations in the source file so that I can rewrite<br>
>>> > to<br>
>>> > it.<br>
>>> ><br>
>>> > Regards.<br>
>>> > Adil<br>
>>> ><br>
>>> > On Fri, Oct 19, 2012 at 8:26 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>><br>
>>> > wrote:<br>
>>> >><br>
>>> >> On Fri, Oct 19, 2012 at 3:52 AM, madil90 <<a href="mailto:madil90@gmail.com">madil90@gmail.com</a>> wrote:<br>
>>> >> > Hi,<br>
>>> >> >    I am trying to setup LibTooling for clang. I have gone through<br>
>>> >> > the<br>
>>> >> > procedure given at </a><br>
>>> >> > <<a href="http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html" target="_blank">http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html</a>> . I can<br>
>>> >> > succesfully run clang-check for any source file. I am now trying to<br>
>>> >> > compile<br>
>>> >> > the example at  </a><br>
>>> >> > <<a href="http://clang.llvm.org/docs/RAVFrontendAction.html" target="_blank">http://clang.llvm.org/docs/RAVFrontendAction.html</a>><br>
>>> >> > .<br>
>>> >> > When using cmake, I get the following error:<br>
>>> >> ><br>
>>> >> > Unknown CMake command : add_clang_executable<br>
>>> >> ><br>
>>> >> >   When using cmake to build clang, I used<br>
>>> >> > -DEXPORT_CMAKE_COMPILE_COMMANDS=ON<br>
>>> >> > variable as suggested. Then why isn't this command working?<br>
>>> >><br>
>>> >> My best guess would be that you don't have a version of cmake that<br>
>>> >> supports this command, but I don't really know. This functionality was<br>
>>> >> only added (to both Clang an CMake) in the last 6 months or so.<br>
>>> >><br>
>>> >> ><br>
>>> >> > Regards,<br>
>>> >> > Adil<br>
>>> >> ><br>
>>> >> ><br>
>>> >> ><br>
>>> >> > --<br>
>>> >> > View this message in context:<br>
>>> >> ><br>
>>> >> > <a href="http://clang-developers.42468.n3.nabble.com/LibTooling-CMake-Error-tp4027570.html" target="_blank">http://clang-developers.42468.n3.nabble.com/LibTooling-CMake-Error-tp4027570.html</a><br>

>>> >> > Sent from the Clang Developers mailing list archive at Nabble.com.<br>
>>> >> > _______________________________________________<br>
>>> >> > cfe-dev mailing list<br>
>>> >> > <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
>>> >> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
>>> ><br>
>>> ><br>
>>> ><br>
>>> ><br>
>>> > --<br>
>>> > Mohammad Adil<br>
>>> > LUMS SSE<br>
>>> ><br>
>>> ><br>
>>> > _______________________________________________<br>
>>> > cfe-dev mailing list<br>
>>> > <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
>>> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
>>> ><br>
>><br>
>><br>
>><br>
>><br>
>> --<br>
>> Mohammad Adil<br>
>> LUMS SSE<br>
>><br>
>><br>
>> _______________________________________________<br>
>> cfe-dev mailing list<br>
>> <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
>><br>
><br>
</div></div></blockquote></div><br></div>