|Summary:||Problem with libbsd-overlay.pc when cross-compiling in Yocto|
|Product:||libbsd||Reporter:||Ola Nilsson <ola.x.nilsson>|
|Component:||libbsd||Assignee:||Guillem Jover <guillem>|
|Status:||RESOLVED DUPLICATE||QA Contact:|
|i915 platform:||i915 features:|
Description Ola Nilsson 2017-01-24 14:22:40 UTC
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.
Comment 1 Peter Kjellerstedt 2017-01-26 13:59:34 UTC
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).
Comment 2 Guillem Jover 2017-06-19 02:59:56 UTC
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 ***