Bug 5099 - glib-2.0: host contamination issue
Summary: glib-2.0: host contamination issue
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: Undecided normal
Target Milestone: 1.5 M5
Assignee: Robert Yang
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-09-03 03:23 UTC by Robert Yang
Modified: 2013-09-05 00:31 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.