Bug 2762

Summary: dbus-glib 0.98: do_compile: failed to compile if enable-tests with dbus-glib
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Yao Zhao <yao.zhao>
Component: coreAssignee: Yao Zhao <yao.zhao>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: alexandrux.palalau, meta.mr.watcher, meta.watcher, sgw, song.liu
Version: 1.3   
Target Milestone: 1.3 M3   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Yao Zhao 2012-07-13 14:03:28 UTC
Host: x86_64

Add "--enable-tests" like below in dbus-glib:
EXTRA_OECONF = "--with-introspect-xml=
${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml \
                --with-dbus-binding-tool=
${STAGING_BINDIR_NATIVE}/dbus-binding-tool --enable-tests"

build:
i686-wrs-linux-gnu-gcc   -m64 --sysroot=/mnt/work/build/yocto/qemu64/bitbake_build/tmp/sysroots/common-pc-64 -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../dbus -I../.. -I../../dbus -I/mnt/work/build/yocto/qemu64/bitbake_build/tmp/sysroots/common-pc-64/usr/include/dbus-1.0 -I/mnt/work/build/yocto/qemu64/bitbake_build/tmp/sysroots/common-pc-64/usr/lib64/dbus-1.0/include   -pthread -I/mnt/work/build/yocto/qemu64/bitbake_build/tmp/sysroots/common-pc-64/usr/include/glib-2.0 -I/mnt/work/build/yocto/qemu64/bitbake_build/tmp/sysroots/common-pc-64/usr/lib64/glib-2.0/include   -DDBUS_COMPILATION    -O2 -pipe -g -feliminate-unused-debug-types -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wfloat-equal -Wsign-compare -fno-strict-aliasing -c test-service-glib.c
In file included from test-service-glib.c:14:0:
/mnt/work/build/yocto/qemu64/bitbake_build/tmp/sysroots/common-pc-64/usr/include/glib-2.0/glib/gquark.h:28:2: error: #error "Only <glib.h> can be included directly."

problem:
 The problem is obvious that when test enabled, test-service-glibc is including glib/gquark.h. Change it to glib.h make build success.
Comment 2 Alexandru Palalau 2012-07-26 13:16:10 UTC
Behavior could not be reproduced under the indicated commit ID.