Error while building the rtems-libbsd
Christian Mauderer
list at c-mauderer.de
Sun Jan 5 08:57:03 UTC 2020
On 05/01/2020 03:17, Utkarsh Rai wrote:
> 1. For the libbbsd I have been
> using https://github.com/nilhoel1/rtems-libbsd/tree/ti_pruss, this was
> used by @Nils Hölscher <mailto:nilhoel1 at gmail.com> for his GSoc project(
> I have talked to him about my errors, and this libbsd builds fine on his
> host system).
That version of libbsd is based on commit bc2ba9a9c of libbsd which has
been added on 2019-07-09.
> 2. The rtems and RSB versions are https://github.com/RTEMS/rtems.git
> and https://github.com/RTEMS/rtems-source-builder.git
Which commit did you check out? I would suggest to either check out one
with about the same date as the libbsd commit. Or you should rebase the
changes onto the latest libbsd commit. That depends on whether you want
to just use the work or continue it.
> 3. I have been using the beaglebone black BSP.
>
>
> On Fri, Jan 3, 2020 at 2:12 PM Christian Mauderer <list at c-mauderer.de
> <mailto:list at c-mauderer.de>> wrote:
>
> On 01/01/2020 16:14, Utkarsh Rai wrote:
> > I have been successful in building the rtems-libbsd using 'python3
> > ./waf'. Although, I had to do some weird changes to some of the
> files in
> > the libbsd package. (These changes were done as there were several
> build
> > errors even after the 'python ./waf' command )
> >
> > 1. In the ../freebsd/sys/netinet/in_mcast.c
> > and ../../freebsd/sys/netpfil/pf/if_pfsync.c files I had to change
> > the IP_MIN_MEMBERSHIPS with IP_MAX_MEMBERSHIPS .
> >
> > 2. In the ../../freebsd/sys/netinet6/in6_mcast.c and
> > .../freebsd/sys/netinet/ip_carp.c files I had to
> > change IPV6_MIN_MEMBERSHIPS, to IPV6_MAX_MEMBERSHIPS,
> >
> > 3. In the ../testsuite/syscalls01/test_main.c I changed
> the IPPROTO_SEP
> > to IPPROTO_EGP .
> >
> > Now, I suspect that these changes will come back to bite me as I
> proceed
> > further as I have simply overwritten them based on build error
> > messages. It would be helpful if the community can provide its
> views on
> > my changes and whether this is a bug or something that I am doing
> wrong.
>
> I would too expect that these changes are not a good idea. In normal
> case libbsd builds without any trouble.
>
> Can you give some more information about the exact versions you use:
>
> - Which commit of libbsd are you trying to build?
> - Which rtems commit do you use?
> - Which tool version do you use? If RSB: Which commit?
> - What BSP do you use?
>
> Best regards
>
> Christian
>
> >
> > On Tue, Dec 31, 2019 at 6:28 PM Christian Mauderer
> <list at c-mauderer.de <mailto:list at c-mauderer.de>
> > <mailto:list at c-mauderer.de <mailto:list at c-mauderer.de>>> wrote:
> >
> > On 31/12/2019 12:41, Utkarsh Rai wrote:
> > > My host system has an x-86_64 architecture with ubuntu-18.04
> > running on
> > > top of it, I have a python2 installed.
> > > Interestingly enough, when I clean up the libbsd directory
> and try to
> > > build as a super-user, I have two observations:-
> >
> > Please note that building as super user is generally not a
> good idea for
> > any sane build environment. Although I have to say that in
> this case it
> > provided an interesting error output ...
> >
> > > 1. The build fails with the following error message:-
> > > [1/4] Creating
> > >
> >
> ///h/o/m/e///u/r/1/0///s/a/n/d/b/o/x///r/t/e/m/s/-/l/i/b/b/s/d///b/u/i/l/d///a/r/m/-/r/t/e/m/s/5/-/b/e/a/g/l/e/b/o/n/e/b/l/a/c/k/-/d/e/f/a/u/l/t/build-include/rtems/bsd/modules.h
> >
> > ... here. That looks like some join went horrible wrong. I
> assume that
> > there is some location in the build system where an array of paths
> > should be joined but only one is given. Looks like a bug.
> >
> > > [2/4] Compiling rtemsbsd/rtems/generate_kvm_symbols
> > > [3/4] Compiling
> > testsuite/include/rtems/bsd/test/network-config.h.in
> <http://network-config.h.in>
> > <http://network-config.h.in>
> > > <http://network-config.h.in>
> > > /bin/sh: 1:
> > >
> .//home/ur10/sandbox/rtems-libbsd/rtemsbsd/rtems/generate_kvm_symbols:
> >
> > The ./ in front is a bit odd here. Looks like an absolute path
> which
> > (for some reason) has been forced to be local...
> >
> > > not found
> > >
> > > Now I have checked, and the file in question is present at its
> > location.
> > >
> > > 2. The traceback of the last calls is something like this:-
> > > File
> > >
> >
> "/home/ur10/sandbox/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Build.py",
> > > line 100, in execute_build
> > > self.compile()
> > > File
> > >
> >
> "/home/ur10/sandbox/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Build.py",
> > > line 174, in compile
> > > self.store()
> > > File
> > >
> >
> "/home/ur10/sandbox/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Build.py",
> > > line 153, in store
> > > Utils.writef(db+'.tmp',x,m='wb')
> > > File
> > >
> >
> "/home/ur10/sandbox/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Utils.py",
> > > line 155, in writef
> > > with open(fname,m)as f:
> > > IOError: [Errno 2] No such file or directory:
> > >
> >
> u'/home/ur10/sandbox/rtems-libbsd/build/arm-rtems5-beagleboneblack-default/.wafpickle-linux2-34017264-20.tmp'
> > >
> > > If I am correct, this is a python exception for invalid file
> > handling.
> > > Since I have already removed the 'build' directory, I suppose
> > the call
> > > should be 'w+' or 'wb+' but this does not seem to be the
> case. (I am
> > > going out on a limb with this assumption, I may be wrong !)
> >
> > You are right that it's a python exception. Most likely it's a
> follow up
> > bug due to the wrong paths further up.
> >
> > >
> > > It would be very helpful if you could provide your views on the
> > problem
> > > and as to how I should proceed to resolve this.
> > >
> >
> > The solution is to find the bug in the path handling from
> further above.
> > As a workaround could you try to use python3? Some string
> handling is
> > different there so it might work or give a better error message.
> > Just use
> >
> > python3 ./waf ...
> >
> > instead of only "waf" in every waf command line.
> >
> > >
> > > On Mon, Dec 30, 2019 at 7:19 PM Christian Mauderer
> > <list at c-mauderer.de <mailto:list at c-mauderer.de>
> <mailto:list at c-mauderer.de <mailto:list at c-mauderer.de>>
> > > <mailto:list at c-mauderer.de <mailto:list at c-mauderer.de>
> <mailto:list at c-mauderer.de <mailto:list at c-mauderer.de>>>> wrote:
> > >
> > > On 28/12/2019 18:43, Utkarsh Rai wrote:
> > > > Hi,
> > > > While building the rtems-libbsd as described here
> > > >
> > >
> >
> <https://devel.rtems.org/browser/rtems-libbsd/README.waf?rev=b83012a9f9f1551d9d223c3126d0f43aba79db62> I
> > > > was able to successfully configure the waf file as:-
> > > > waf configure
> > > > --prefix="/home/ur10/sandbox/rtems/5"
> > > > --rtems-bsps=arm/beagleboneblack
> > > > --buildset=buildset/default.ini
> > > > But the build fails on the "waf" instruction with the
> error
> > - "Could
> > > > not create the directory ///h".
> > > > My path for the build is
> PATH="~/sandbox/rtems/bin:$PATH",
> > with the
> > > > tools and the rtems-libbsd in the sandbox directory.
> > > > It would be very kind of you if someone could point out as
> > to what
> > > is it
> > > > that I am doing wrong.
> > > > Thank You, Regards.
> > >
> > > Hello Utkarsh Rai,
> > >
> > > I now have seen that bug about two or three times on the
> list.
> > But I've
> > > never been able to reproduce it. What host system are you
> > using? Do you
> > > have a python2 or a python3 as default python?
> > >
> > > Sometimes it works to clean up the libbsd directory. Remove
> > the "build"
> > > directory and the ".waf2..." or ".waf3..." directory. Also
> > remove any
> > > "__pycache__" directories.
> > >
> > > >From your call it seems that you use waf from your host
> > system. Can you
> > > try to use the waf version delivered with libbsd instead
> > (using "./waf
> > > configure ...")?
> > >
> > > Best regards
> > >
> > > Christian
> > >
> >
>
More information about the devel
mailing list