[Toybox] [TOYBOX][RFC] building toybox on a Yocto enviroment

Joya Cruz, Alejandro alejandro.joya.cruz at intel.com
Tue Feb 2 17:51:43 PST 2016


I have been trying to build toybox with different LSM enviroments
unsing yocto as building tool.
the more persistant error that I got is bellow:

|DEBUG: Executing shell function do_compile
|NOTE: make -j 8 -e MAKEFLAGS= toybox_unstripped
|scripts/make.sh
|Generate headers from toys/*/*.c...
|Make generated/config.h from .config.
|generated/flags.h generated/help.h
|Compile toybox.....
|NOTE: make -j 8 -e MAKEFLAGS= generated/instlist
|NOBUILD=1 scripts/make.sh
|Generate headers from toys/*/*.c...
|Make generated/config.h from .config.
|generated/flags.h generated/help.h
|cc -I . scripts/install.c -o generated/instlist
|In file included from ./toys.h:71:0,
|                 from scripts/install.c:6:
|./lib/lsm.h:23:23: fatal error: sys/smack.h: No such file or directory
| #include <sys/smack.h>
|                       ^
|compilation terminated.
|make: *** [generated/instlist] Error 1
|WARNING: exit code 1 from a shell command.

until now the solution that i have found is this.
any suggestion if this should be part of toybox or how could i
workaround this issue?

I'm using the CFLAGS to provide the temporal environment with the
libraries.

> Date: Tue, 2 Feb 2016 17:47:50 -0800
> Subject: [PATCH] toybox_build: add Missing CFLAGS
> 
> add CFLAGS to multiple builds to forward libraries location in Yocto.
> 
> Signed-off-by: Alejandro Joya <alejandro.joya.cruz at intel.com>
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 5422efe..2dca3ae 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -37,7 +37,7 @@ bloatcheck: toybox_old toybox_unstripped
> 
>  generated/instlist: toybox_stuff
>         NOBUILD=1 scripts/make.sh
> -       $(HOSTCC) -I . scripts/install.c -o generated/instlist
> +       $(HOSTCC) -I . $(CFLAGS) scripts/install.c -o
> generated/instlist
> 
>  install_flat: generated/instlist
>         scripts/install.sh --symlink --force
> -- 
> 1.9.1


More information about the Toybox mailing list