If libunwind is added to the build system samba package can be build using libunwind as a dependency. This is not declared in the samba recipe.
To re-create the issue you can follow these steps: 1. Build an image which contains libunwind and Samba packages 2. make libunwind.distclean 3. Comment out the #ifdef around the inclusion of libunwind.h in source3/lib/util.c as follows /* #ifdef HAVE_LIBUNWIND_H */ #include <libunwind.h> /* #endif */ 4. make samba.rebuild output: | [1370/2581] Compiling source3/lib/util.c | ../source3/lib/util.c:818:23: fatal error: libunwind.h: No such file or directory