<div dir="ltr"><div><div>I also tried bld.path.find_or_declare('rtems.h') like in the supplied example, but that did not work for me either.<br><br></div>Kind Regards<br></div>Robin<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 3 May 2021 at 14:31, Robin Müller <<a href="mailto:robin.mueller.m@gmail.com">robin.mueller.m@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello Vijay,</div><div><br></div><div>I tried 
bld.find_or_declare('rtems.h') but that did not work for me. <br></div><div><br></div><div>Just out of curiosity, why was the patch not accepted? I did not find anything in the waf gitlab.<br><br></div><div>Kind Regards<br></div><div>Robin<br>

</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 1 May 2021 at 20:29, Vijay Kumar Banerjee <<a href="mailto:vijay@rtems.org" target="_blank">vijay@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Robin,<br>
<br>
On Fri, Apr 30, 2021 at 2:36 AM Robin Müller <<a href="mailto:robin.mueller.m@gmail.com" target="_blank">robin.mueller.m@gmail.com</a>> wrote:<br>
><br>
> Issue can be reproduced by doing the quickstart application build on Windows 10. The issue are backslashes in the absolute paths of the dependency paths<br>
> which were not stripped from dependency paths on Windows,<br>
> causing waf to not recognize them as valid absolute paths. More specifically, I printed the resulting dependency paths after stripping<br>
><br>
> C\:/Users/Robin/Documents/RTEMS/rtems-tools/rtems/6/sparc-rtems6/erc32/lib/include/rtems/userenv.h<br>
><br>
> The backslash at the start causes the issue.<br>
> I was able to fix this with the following adaptations (gccdeps.py starting line 108)<br>
><br>
As I mentioned earlier, this patch will probably not be accepted in<br>
upstream waf and it might not be a great idea to change it in the<br>
RTEMS version of waf, since it'll cause issues in the future when we<br>
try to sync up with the waf updates from upstream.<br>
<br>
Please try bld.find_or_declare from your wscript and see if that fixes<br>
the header file not found issue. That is probably a cleaner solution<br>
for now.<br>
<br>
> # Now join all the lines together<br>
> txt = txt.replace('\\\n', '')<br>
><br>
> val = txt.strip()<br>
> val = [x.replace('\\ ', ' ') for x in re_splitter.split(val) if x]<br>
> # This was added to replace backslashes which can cause issues on Windows<br>
> if <a href="http://os.name" rel="noreferrer" target="_blank">os.name</a> == 'nt':<br>
>      val = [x.replace('C:\\', 'C:') for x in re_splitter.split(val) if x]<br>
> print(val)<br>
> nodes = []<br>
> bld = self.generator.bld<br>
><br>
> I don't know whether this can have other evil side effects, but the waf build works after that..<br>
The possible evil side effects could be the issue with "\", as you<br>
mentioned here. So better to avoid hacking it. :)<br>
<br>
<br>
Best regards,<br>
Vijay<br>
><br>
> Kind Regards<br>
> Robin<br>
><br>
> On Fri, 30 Apr 2021 at 00:30, Vijay Kumar Banerjee <<a href="mailto:vijay@rtems.org" target="_blank">vijay@rtems.org</a>> wrote:<br>
>><br>
>> Hi all,<br>
>><br>
>><br>
>> On Thu, Apr 29, 2021 at 3:01 PM Chris Johns <<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>> wrote:<br>
>> ><br>
>> > On 30/4/21 5:01 am, Robin Müller wrote:<br>
>> > > Yes that is the prefix. The rtems.h file is definitely located at the location<br>
>> > > in the warning and it works on older commit of rtems_waf (where gccdeps.py is<br>
>> > > not used).<br>
>> > > I briefly looked through the gccdeps.py file and it is doing some string<br>
>> > > stripping operations.<br>
>> > > Maybe that is the issue but I am not sure.<br>
>> ><br>
>> > Thank you for debugging this and I agree it look like something is a little off<br>
>> > in gccdeps.<br>
>> ><br>
>> Yes, I had a patch for that but I think there was a discussion<br>
>> upstream between ita1024 and Chris and the conclusion was that the<br>
>> patch won't be accepted. I can't find it right now but I could fix<br>
>> this problem by using find_or_declare.<br>
>><br>
>> @Robin: Please try to use the find function and see if it fixes.<br>
>> Here's an example that worked quite nicely in rtems-examples:<br>
>> <a href="https://git.rtems.org/rtems-examples/tree/filesystem/fat_ramdisk/wscript#n34" rel="noreferrer" target="_blank">https://git.rtems.org/rtems-examples/tree/filesystem/fat_ramdisk/wscript#n34</a><br>
>><br>
>><br>
>> Best regards,<br>
>> Vijay<br>
>><br>
>> > I will need to try and reproduce this to have a chance of finding it. What<br>
>> > happens if you remove gccdeps.py? Will that you get past this point?<br>
>> ><br>
>> > Chris<br>
>> > _______________________________________________<br>
>> > devel mailing list<br>
>> > <a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
>> > <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div>
</blockquote></div>