How to build multiple BSPs with waf?

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Oct 11 11:40:44 UTC 2019


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

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.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.


More information about the devel mailing list