How to build multiple BSPs with waf?

Chris Johns chrisj at rtems.org
Fri Oct 11 15:04:27 UTC 2019


> On 11 Oct 2019, at 7:40 pm, Sebastian Huber <Sebastian.Huber at embedded-brains.de> wrote:
> 
> On 05/10/2019 01:50, Chris Johns wrote:
>>> On 4/10/19 11:33 pm, Sebastian Huber wrote:
>>> Hello,
>>> 
>>> I tried to figure how a standard waf build can be configured so that out-of-tree
>>> or multiple build trees can be used. I couldn't get this working.
>>> 
>>> The Samba project seems to have support for out-of-tree builds:
>>> 
>>> https://wiki.samba.org/index.php/Waf#Out_of_tree_builds
>>> 
>>> However, this '-b' option is not present in a standard waf.
>> You would need to look for the additional options SAMBA must have added.
> 
> This looks like a project for the future.
> 
>>> The libbsd uses a common build tree for a list of arch/bsp combinations. This
>>> seems to be quite a resource hungry solution. For example, I am not able to
>>> build two BSPs with this approach on Windows/MSYS2.
>> What resources are you referring too, disk space, memory?
> 
> When I build two BSPs on Windows/MSYS2 I get this error:
> 
> [1940/1940] Linking build/powerpc-rtems5-qoriq_e6500_32-default/zerocopy01.exe
> Waf: Leaving directory `/c/rtems/home/rtems-libbsd/build/powerpc-rtems5-qoriq_e6500_32-default'
> 'build-powerpc-rtems5-qoriq_e6500_32-default' finished successfully (3m17.050s)
> Waf: Entering directory `/c/rtems/home/rtems-libbsd/build/powerpc-rtems5-qoriq_e6500_64-default'
> [1/4] Creating build/powerpc-rtems5-qoriq_e6500_64-default/build-include/rtems/bsd/modules.h
> [2/4] Compiling rtemsbsd/rtems/generate_kvm_symbols
> [3/4] Compiling testsuite/include/rtems/bsd/test/network-config.h.in
> [4/4] Compiling build/powerpc-rtems5-qoriq_e6500_64-default/rtemsbsd/rtems/rtems-kernel-kvm-symbols.c
> Waf: Leaving directory `/c/rtems/home/rtems-libbsd/build/powerpc-rtems5-qoriq_e6500_64-default'
> Build failed
> Traceback (most recent call last):
>  File "/c/rtems/home/rtems-libbsd/.waf3-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Task.py", line 176, in process
>    ret=self.run()
>  File "<string>", line 27, in f
>  File "/c/rtems/home/rtems-libbsd/rtems_waf/rtems.py", line 635, in exec_command
>    ret = super(self.__class__, self).exec_command(cmd, **kw)
>  File "/c/rtems/home/rtems-libbsd/rtems_waf/rtems.py", line 635, in exec_command
>    ret = super(self.__class__, self).exec_command(cmd, **kw)
>  File "/c/rtems/home/rtems-libbsd/rtems_waf/rtems.py", line 635, in exec_command
>    ret = super(self.__class__, self).exec_command(cmd, **kw)
>  [Previous line repeated 326 more times]
>  File "/c/rtems/home/rtems-libbsd/rtems_waf/rtems.py", line 624, in exec_command
>    if not isinstance(cmd, str) and len(str(cmd)) > 8192:
> RecursionError: maximum recursion depth exceeded while getting the str of an object

That code is from the waf extras code base. It is used to handle long command lines. Maybe that code has a fix. 

> Building the BSPs one after another works well.
> 
>>> Is there already a plan to build multiple BSPs (or one BSP with different
>>> options) with waf?
>> Amar built more than one BSP, one after the other and so does rtems_waf. I have
>> not seen anything that would build a single BSP with different options using a
>> single configure command.
> 
> Ok, I figured it out more or less how you can build variants with waf.

Great. 

Chris


More information about the devel mailing list