NEW BUILD SYSTEM: Cannot build rtems-libbsd

Sebastian Huber sebastian.huber at
Wed Jul 8 08:29:58 UTC 2020

On 29/06/2020 21:39, Niteesh G. S. wrote:

> Hello,
> I tried compiling RTEMS-libBSD with RTEMS6 toolchain and the new build 
> system
> but failed. I get errors when compiling RTEMS-libBSD
> The new build system is pulled from Sebastian's branch
> HEAD: e4c193ddc163d6adb1b003254af9cc6b5d174a6f
> RTEMS was configured with the following options:
> 1) ./waf bsp_defaults --rtems-bsps=arm/beagleboneblack > config.ini
> 2) Enabled posix since libBSD complained about it during configuration.
> 3) ./waf configure --prefix=$HOME/development/rtems/6
> 4) ./waf -j32

This didn't work for me. I got:

[1391/1410] Linking 
./librtemsbsp.a(bbb-i2c.c.1.o): in function `am335x_i2c_reset':
undefined reference to `__wrap_puts'
collect2: error: ld returned 1 exit status

This error is related to this change:

I guess I made this during the work to get rid of the bsp_specs. The 
problem is that we have a cyclic reference: librtemstest depends on 
librtemscpu which depends on librtemstest (via the wrapped output 
functions). The librtemscpu and librtemsbsp are implicitly given at the 
end via the -qrtems flag. I reverted the change since it seems to work 
without it. Afterwards, I was able to install the BSP.

> 5) ./waf install
> RTEMS-libBSD was configured with the following options:
> 1) ./waf configure --prefix=$HOME/development/rtems/6 
> --rtems-bsps=arm/beagleboneblack --buildset=buildset/minimal.ini 
> --rtems-version=6
> 2) ./waf -j16
> I have attached the error log file.

I got a different error:

[1163/1163] Linking build/arm-rtems6-beagleboneblack-minimal/zerocopy01.exe
testsuite/zerocopy01/test_main.c.96.o: in function `.LANCHOR0':
undefined reference to `_bsd_ip6_mroutemodule_sys_init'

I fixed this with this commit:

Which branch do you use for libbsd?

It seems the master branch. Here I get also your error:

[1084/1184] Linking build/arm-rtems6-beagleboneblack-minimal/condvar01.exe
./libbsd.a(uipc_mbuf.c.16.o): in function `m_unmappedtouio':
undefined reference to `PHYS_TO_VM_PAGE'
undefined reference to `uiomove_fromphys'

Could you please use the 5-freebsd-12 branch with the default build set. 
This is what I use normally.

More information about the devel mailing list