On Wed, Jul 1, 2020 at 5:54 PM Anuj Mittal <[email protected]> wrote: > > From: Peter Kjellerstedt <[email protected]> > > Rewrite relocatable_native_pcfiles() so that it can handle that any of > the checked pkgconfig directories are empty without causing an > exception.
This seems to be causing build failures for libnsl2-native: | ../../git/src/yp_xdr.c:38:23: fatal error: netconfig.h: No such file or directory | #include <netconfig.h> | ^ | compilation terminated. The header is there under recipe-sysroot-native/usr/include/tirpc/netconfig.h, so It looks like this patch somehow breaks libnsl2-native's ability to find or use libtirpc.pc > Signed-off-by: Peter Kjellerstedt <[email protected]> > Signed-off-by: Richard Purdie <[email protected]> > (cherry picked from commit f9c5df6dc1c13e9b05ff1b47ad84ad339f6779a4) > Signed-off-by: Anuj Mittal <[email protected]> > --- > meta/classes/relocatable.bbclass | 20 +++++++++++--------- > 1 file changed, 11 insertions(+), 9 deletions(-) > > diff --git a/meta/classes/relocatable.bbclass > b/meta/classes/relocatable.bbclass > index 582812c1cf..af04be5cca 100644 > --- a/meta/classes/relocatable.bbclass > +++ b/meta/classes/relocatable.bbclass > @@ -6,13 +6,15 @@ python relocatable_binaries_preprocess() { > rpath_replace(d.expand('${SYSROOT_DESTDIR}'), d) > } > > -relocatable_native_pcfiles () { > - if [ -d ${SYSROOT_DESTDIR}${libdir}/pkgconfig ]; then > - rel=${@os.path.relpath(d.getVar('base_prefix'), > d.getVar('libdir') + "/pkgconfig")} > - sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" > ${SYSROOT_DESTDIR}${libdir}/pkgconfig/*.pc > - fi > - if [ -d ${SYSROOT_DESTDIR}${datadir}/pkgconfig ]; then > - rel=${@os.path.relpath(d.getVar('base_prefix'), > d.getVar('datadir') + "/pkgconfig")} > - sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" > ${SYSROOT_DESTDIR}${datadir}/pkgconfig/*.pc > - fi > +relocatable_native_pcfiles() { > + for dir in ${libdir}/pkgconfig ${datadir}/pkgconfig; do > + files_template=${SYSROOT_DESTDIR}$dir/*.pc > + # Expand to any files matching $files_template > + files=$(echo $files_template) > + # $files_template and $files will differ if any files were > found > + if [ "$files_template" != "$files" ]; then > + rel=$(realpath -m --relative-to=$dir ${base_prefix}) > + sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" > $files > + fi > + done > } > -- > 2.25.4 > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#140697): https://lists.openembedded.org/g/openembedded-core/message/140697 Mute This Topic: https://lists.openembedded.org/mt/75249561/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
