<div dir="ltr"><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div>Hi Christian,</div></div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 17 Mar 2019 at 14:30, Christian Mauderer <<a href="mailto:list@c-mauderer.de">list@c-mauderer.de</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">Am 16.03.19 um 23:52 schrieb Vijay Kumar Banerjee:<br>
> <br>
> <br>
> On Sat, 16 Mar 2019 at 01:00, Christian Mauderer <<a href="mailto:list@c-mauderer.de" target="_blank">list@c-mauderer.de</a><br>
> <mailto:<a href="mailto:list@c-mauderer.de" target="_blank">list@c-mauderer.de</a>>> wrote:<br>
> <br>
> Am 15.03.19 um 19:20 schrieb Vijay Kumar Banerjee:<br>
> ><br>
> ><br>
> > On Fri, 15 Mar 2019 at 21:47, Christian Mauderer<br>
> <<a href="mailto:list@c-mauderer.de" target="_blank">list@c-mauderer.de</a> <mailto:<a href="mailto:list@c-mauderer.de" target="_blank">list@c-mauderer.de</a>><br>
> > <mailto:<a href="mailto:list@c-mauderer.de" target="_blank">list@c-mauderer.de</a> <mailto:<a href="mailto:list@c-mauderer.de" target="_blank">list@c-mauderer.de</a>>>> wrote:<br>
> ><br>
> > Am 15.03.19 um 15:48 schrieb Vijay Kumar Banerjee:<br>
> > > Hello, <br>
> > ><br>
> > > I am trying to `./waf install` the libbsd but getting some<br>
> error,<br>
> > need help<br>
> > > with that. The commands used and the errors are given below ...<br>
> > ><br>
> > > configured using: `./waf configure<br>
> --buildset=buildset/default.ini<br>
> > > --prefix=$HOME/development/rtems/5 --rtems-arch=arm`<br>
> > ><br>
> > > configure was successful.<br>
> > ><br>
> > > then : `./waf install`<br>
> > ><br>
> > > Error ...<br>
> > > ================<br>
> > > Build failed<br>
> > > -> task in 'lex__nsyy' failed with exit status 1 (run with<br>
> -v to<br>
> > > display more information)<br>
> > > -> task in 'yacc__nsyy' failed with exit status 1 (run with<br>
> -v to<br>
> > > display more information)<br>
> > > -> task in 'lex_pcap' failed with exit status 1 (run with -v to<br>
> > display<br>
> > > more information)<br>
> > > -> task in 'yacc_pcap' failed with exit status 1 (run with<br>
> -v to<br>
> > > display more information)<br>
> > > -> task in 'objs01' failed with exit status 1 (run with -v<br>
> to display<br>
> > > more information)<br>
> > > -> task in 'objs01' failed with exit status 1 (run with -v<br>
> to display<br>
> > > more information)<br>
> > > -> task in 'yacc_pfctly' failed with exit status 1 (run<br>
> with -v to<br>
> > > display more information)<br>
> > ><br>
> > > ================<br>
> > ><br>
> > > Thanks<br>
> > > --vijay<br>
> > ><br>
> ><br>
> > Hello Vijay,<br>
> ><br>
> > did you try to build before the install? I don't see the call.<br>
> > Normally it's<br>
> ><br>
> > waf configure ...<br>
> > waf<br>
> > waf install<br>
> ><br>
> > If you did that: It seems that some of the lex / yacc files<br>
> should be<br>
> > regenerated. Did you enable --enable-auto-regen somewhen during an<br>
> > earlier configuration run (not necessary except if you import<br>
> yacc or<br>
> > lex files)? Did you import some yacc or lex files?<br>
> ><br>
> > I had to install `byacc` package using yum in fedora, then I used the<br>
> > --enable-auto-regen<br>
> > option, that worked. <br>
> > However, it's still not building and I'm seeing a lot of warnings, I<br>
> > think this is because of the<br>
> > files I imported from the freebsd source, maybe they depend on some<br>
> > other headers that <br>
> > I didn't include. Any suggestion on how to debug, if this is the<br>
> case? <br>
> ><br>
> > Best regards<br>
> ><br>
> > Christian<br>
> ><br>
> <br>
> <br>
> Hello Vijay,<br>
> <br>
> normally you shouldn't need the --enable-auto-regen option. It only<br>
> changes a lot of files that you don't want to change. Especially: If you<br>
> use Fedora (or some other Linux) you get GPL licensed output. We<br>
> normally use FreeBSD for that step and check in the generated files so<br>
> that no user has to use --enable-auto-regen.<br>
> <br>
> Regarding how to start such a port: Normally it's a good idea to get<br>
> some overview over what's missing. For that you import the files that<br>
> you think are relevant (like you already did). Then you can build with<br>
> `waf -k -j1` which continues even if some files are not compilable (-k<br>
> is for continue, -j1 so that you receive the messages in order). You<br>
> should get a lot of compiler errors during that run.<br>
> <br>
> Now comes the hard part: You have to analyse the errors and try to find<br>
> out what's the reason for them. If some big part is missing you most<br>
> likely get a lot of similar errors (like "header xy.h not found"). Most<br>
> likely you can identify some groups. With that you can estimate what has<br>
> to be ported besides the files you already imported.<br>
> <br>
> Identifying these groups is a quite relevant step for planning the<br>
> amount of work for your GSoC proposal. If you are unsure, try to ask on<br>
> the mailing list. You can also post the build output and an assumption<br>
> what groups you estimate to get some feedback.<br>
> <br>
> Best regards<br>
> <br>
> Christian<br>
> <br>
> <br>
> Hi<br>
> <br>
> I figured out that there were some unnecessary imports I was doing and<br>
> also some necessary<br>
> header files that I'm missing, after adding those most of the warnings<br>
> vanished. The error I'm<br>
> seeing now is due to a missing '.m' header file. The error looks like<br>
> this ...<br>
> =========<br>
> ../../freebsd/sys/arm/ti/am335x/tda19988.c:56:10: fatal error:<br>
> rtems/bsd/local/iicbus_if.h: No such file or directory<br>
> #include <rtems/bsd/local/iicbus_if.h><br>
> =========<br>
> There's an iicbus_if.m file in the freebsd source which is being included as<br>
> ``#include "iicbus_if.h"``<br>
> How to work with the .m files ?<br>
> <br>
> Thanks <br>
<br>
Hello Vijay,<br>
<br>
that sounds like somewhere during the FreeBSD build process at least the<br>
.h file is generated out of the .m file. As far as I can tell, most .m<br>
files are processed with the makeobjops.awk script.<br>
<br>
That's something that isn't yet cleanly integrated into the waf build<br>
system yet. Instead there is a "Makefile.todo" in libbsd that is used<br>
for this cases. Most likely you can just add that .m file and call a<br>
make on that target.<br>
<br>
Some background for the "Makefile.todo": Originally the libbsd has been<br>
build using one big Makefile. Due to the decision that RTEMS should go<br>
toward waf, most parts of that Makefile has been replaced. The<br>
"Makefile.todo" is the part that is left and should be integrated into<br>
waf as soon as someone feels like doing it or finds someone who funds<br>
the the time.<br>
<br>
Regarding iicbus: Most likely that is an interfaces that needs a<br>
translation layer so that the RTEMS i2c framework is used. So importing<br>
the header with the declarations is good and correct. But you will need<br>
to plan some time to implement the functions based on the RTEMS i2c<br>
interface.<br>
<br>
Best regards<br>
<br>
Christian<br>
</blockquote></div>