The libbsd-overlay.pc.in file adds '-isystem /usr/lib/bsd' to CFLAGS. gcc 5.3.0 gives this problem when cross-compiling with a --sysroot option. cc1: warning: include location "/usr/include/bsd" is unsafe for cross-compilation [-Wpoison-system-directories] This error occurred for us building llpdp 0.9.2 in Yocto release 2.1.2. We fixed it by adding a preceeding '=' to the path in the pc file.
This is really a problem in pkg-config and its handling of sysroot. It currently only handles -I and -L correctly, but misses -isystem (probably because it is so rare to use -isystem in a pc file).
This got reported in the past, and I reassigned it to pkg-config which they fixed in git. The fix should have been included in pkg-config-0.29.2. As an alternative option you could also use https://github.com/pkgconf/pkgconf which also does get this right. I'm thus closing this as a duplicate. Thanks. *** This bug has been marked as a duplicate of bug 97337 ***
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.