Bug 5099

Summary: glib-2.0: host contamination issue
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Robert Yang <liezhi.yang>
Component: coreAssignee: Robert Yang <liezhi.yang>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Undecided CC: meta.mr.watcher, meta.watcher, sgw
Version: 1.5   
Target Milestone: 1.5 M5   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Robert Yang 2013-09-03 03:23:39 UTC
We will see the following warning by accident:

$ bitbake nativesdk-glib-2.0

WARNING: QA Issue: nativesdk-glib-2.0-dbg: found library in wrong location: /opt/poky/0.5.5/sysroots/x86_64-pokysdk-linux/usr/share/gdb/auto-load/opt/poky/0.5.5/sysroots/x86_64-pokysdk-linux/usr/lib/libglib-2.0.so.0.3600.4-gdb.py
nativesdk-glib-2.0-dbg: found library in wrong location: /opt/poky/0.5.5/sysroots/x86_64-pokysdk-linux/usr/share/gdb/auto-load/opt/poky/0.5.5/sysroots/x86_64-pokysdk-linux/usr/lib/libgobject-2.0.so.0.3600.4-gdb.py

This is because the configure script uses the "readlink -f $libdir/$with_runtime_libdir`" to figure out the abs dir, so if /opt/poky/0.5.5/sysroots/x86_64-pokysdk-linux/usr/lib/ exists, there would be warning, or no warning if it doesn't exist.

We can change the "readlink -f" to readlink -m to fix it for glib-2.0:

sed -i -e 's/^\(ABS_GLIB_RUNTIME_LIBDIR=.*readlink\) -f/\1 -m/' ${S}/configure.ac

, but we still need do more things on insane.bbclass to fix the warning since it's checking is not suitable for such a case.
Comment 1 Robert Yang 2013-09-03 06:29:11 UTC
(In reply to comment #0)
> We will see the following warning by accident:
> 
> $ bitbake nativesdk-glib-2.0
> 
> WARNING: QA Issue: nativesdk-glib-2.0-dbg: found library in wrong location:
> /opt/poky/0.5.5/sysroots/x86_64-pokysdk-linux/usr/share/gdb/auto-load/opt/
> poky/0.5.5/sysroots/x86_64-pokysdk-linux/usr/lib/libglib-2.0.so.0.3600.4-gdb.
> py
> nativesdk-glib-2.0-dbg: found library in wrong location:
> /opt/poky/0.5.5/sysroots/x86_64-pokysdk-linux/usr/share/gdb/auto-load/opt/
> poky/0.5.5/sysroots/x86_64-pokysdk-linux/usr/lib/libgobject-2.0.so.0.3600.4-
> gdb.py
> 
> This is because the configure script uses the "readlink -f
> $libdir/$with_runtime_libdir`" to figure out the abs dir, so if
> /opt/poky/0.5.5/sysroots/x86_64-pokysdk-linux/usr/lib/ exists, there would
> be warning, or no warning if it doesn't exist.
> 
> We can change the "readlink -f" to readlink -m to fix it for glib-2.0:
> 
> sed -i -e 's/^\(ABS_GLIB_RUNTIME_LIBDIR=.*readlink\) -f/\1 -m/'
> ${S}/configure.ac
> 
> , but we still need do more things on insane.bbclass to fix the warning
> since it's checking is not suitable for such a case.

We don't need do anything in insane.bbclass, so just fix glib-2.0 is OK, will send the patch sooner.