[Pkg-utopia-maintainers] Bug#749133: Inconsistent order of includes to cause type conflict
Michael Tautschnig
mt at debian.org
Sat May 24 12:21:34 UTC 2014
Package: dbus-python
Version: 1.2.0-2
Usertags: goto-cc
During a rebuild of all Debian packages in a clean sid chroot (using cowbuilder
and pbuilder) the build failed with the following error. Please note that we
use our research compiler tool-chain (using tools from the cbmc package), which
permits extended reporting on type inconsistencies at link time.
[...]
libtool: link: gcc -shared -fPIC -DPIC .libs/abstract.o .libs/bus.o .libs/bytes.o .libs/conn.o .libs/conn-methods.o .libs/containers.o .libs/debug.o .libs/exceptions.o .libs/float.o .libs/generic.o .libs/int.o .libs/unixfd.o .libs/libdbusconn.o .libs/mainloop.o .libs/message-append.o .libs/message.o .libs/message-get-args.o .libs/module.o .libs/pending-call.o .libs/server.o .libs/signature.o .libs/string.o .libs/validation.o -ldbus-1 -O2 -Wl,-z -Wl,relro -Wl,-soname -Wl,_dbus_bindings.so -Wl,-version-script -Wl,.libs/_dbus_bindings.ver -o .libs/_dbus_bindings.so
error: conflicting function declarations "stat"
old definition in module abstract file /usr/include/x86_64-linux-gnu/sys/stat.h line 453
signed int (const char *__path, struct stat *__statbuf)
new definition in module message-append file /usr/include/x86_64-linux-gnu/sys/stat.h line 453
signed int (const char *__path, struct stat *__statbuf)
reason for conflict at __statbuf in types listed below (struct/struct):
composite type component counts differ (15/18)
struct stat {
unsigned long int st_dev;
unsigned long int st_ino;
unsigned long int st_nlink;
unsigned int st_mode;
unsigned int st_uid;
unsigned int st_gid;
signed int __pad0;
unsigned long int st_rdev;
signed long int st_size;
signed long int st_blksize;
signed long int st_blocks;
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
signed long int [3l] __unused;
}
struct stat {
unsigned long int st_dev;
unsigned long int st_ino;
unsigned long int st_nlink;
unsigned int st_mode;
unsigned int st_uid;
unsigned int st_gid;
signed int __pad0;
unsigned long int st_rdev;
signed long int st_size;
signed long int st_blksize;
signed long int st_blocks;
signed long int st_atime;
unsigned long int st_atimensec;
signed long int st_mtime;
unsigned long int st_mtimensec;
signed long int st_ctime;
unsigned long int st_ctimensec;
signed long int [3l] __unused;
}
Makefile:466: recipe for target '_dbus_bindings.la' failed
make[4]: *** [_dbus_bindings.la] Error 64
make[4]: Leaving directory '/srv/jenkins-slave/workspace/sid-goto-cc-dbus-python/dbus-python-1.2.0/build-2.7-dbg/_dbus_bindings'
Makefile:648: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
Such a type conflict is usually caused by an inconsistent use of _GNU_SOURCE;
this is the case here as well, but it is well hidden: message-append.c includes
a system header file before (transitively) loading pyconfig.h:
http://sources.debian.net/src/dbus-python/1.2.0-2/_dbus_bindings/message-append.c?hl=29#L29
Once #include <assert.h> is moved after #include "message-internal.h", the type
conflict is resolved.
Best,
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 859 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-utopia-maintainers/attachments/20140524/f9101859/attachment.sig>
More information about the Pkg-utopia-maintainers
mailing list