On Sun, Oct 21, 2012 at 8:40 PM, Mohammad Adil <span dir="ltr"><<a href="mailto:madil90@gmail.com" target="_blank">madil90@gmail.com</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">
Hi,<div> I wish to share my humble opinion in this regard. I believe that clang is a great program and the Clang API is by far, the most self-explanatory API I have seen. Nevertheless, If clang is to ever replace gcc, it should offer a very smooth development. By forcing the user to place all tools in the clang directory, the project management is seriously hindered. Currently the paths in the json file are "../lib/clang/3.2/include". Why not simply replace them with the complete path like the rest of standard paths. Please consider my humble suggestion. It will be a lot of help for future development.</div>
</blockquote><div><br></div><div>I'm not sure what the json files have to do with it. The json files just describe compile options - the builtin header files really belong to the tool executable.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div> As for now, Can you please tell me exactly where to place my tool? I've tried a few locations, but none of them seems to completely resolve the problem. I am very grateful for all of your help.</div></blockquote>
<div><br></div><div>If you have a working <somepath>/clang binary of the same version as your tool, with which you can compile code (and find the builtin headers ;) place your tool into <somepath>/.</div><div>
<br></div><div>The easiest way to get your tool to work is to integrate it with the normal clang build, the same way the extra-tools repository does.</div><div><br></div><div>Cheers,</div><div>/Manuel</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br></div>
<div>Regards,</div><div>Adil<div><div class="h5"><br><br><div class="gmail_quote">On Sun, Oct 21, 2012 at 10:05 PM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>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><div class="gmail_extra"><div class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>> 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><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><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><font color="#888888"><br>
-- Sean Silva<br>
</font></span><div><div><br>
On Sun, Oct 21, 2012 at 5:13 AM, Manuel Klimek <<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>> wrote:<br>
> On Fri, Oct 19, 2012 at 11:09 PM, Mohammad Adil <<a href="mailto:madil90@gmail.com" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">dblaikie@gmail.com</a>><br>
>>> > wrote:<br>
>>> >><br>
>>> >> On Fri, Oct 19, 2012 at 3:52 AM, madil90 <<a href="mailto:madil90@gmail.com" target="_blank">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" target="_blank">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" target="_blank">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" target="_blank">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></div></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Mohammad Adil<div>LUMS SSE</div><br>
</div></div></div>
</blockquote></div><br></div>