<div dir="ltr"><div>Hi Robin,</div><div><br></div><div><br>On Mon, May 3, 2021 at 6:37 AM Robin Müller <<a href="mailto:robin.mueller.m@gmail.com">robin.mueller.m@gmail.com</a>> wrote:<br>><br>> 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>That worked for me in multiple places before. not sure what's happening there.<br><br><br>> Kind Regards<br>> Robin<br>><br>> 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>>><br>>> Hello Vijay,<br>>><br>>> I tried bld.find_or_declare('rtems.h') but that did not work for me.<br>>><br>>> Just out of curiosity, why was the patch not accepted? I did not find anything in the waf gitlab.<br><div>>></div><div>I couldn't find the gitlab link where Chris raised this issue in waf, but I found the devel discussion after which I came up with the find_or_declare solution. Maybe you could find something helpful from the discussion as well:</div><div><a href="goog_871882406"><br></a></div><div><a href="https://lists.rtems.org/pipermail/devel/2020-April/059468.html">https://lists.rtems.org/pipermail/devel/2020-April/059468.html</a></div><div><br></div><div><br></div><div>Best regards,</div><div>Vijay<br></div><div><br></div>>> Kind Regards<br>>> Robin<br>>><br>>> On Sat, 1 May 2021 at 20:29, Vijay Kumar Banerjee <<a href="mailto:vijay@rtems.org">vijay@rtems.org</a>> wrote:<br>>>><br>>>> Hi Robin,<br>>>><br>>>> On Fri, Apr 30, 2021 at 2:36 AM Robin Müller <<a href="mailto:robin.mueller.m@gmail.com">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">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">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">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">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">devel@rtems.org</a><br>>>> >> > <a href="http://lists.rtems.org/mailman/listinfo/devel">http://lists.rtems.org/mailman/listinfo/devel</a></div></div>