Debian Bug report logs -
#747969
Inconsistent use of _XOPEN_SOURCE results in conflicting declarations
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Dimitri John Ledkov <xnox@debian.org>:
Bug#747969; Package btrfs-tools.
(Tue, 13 May 2014 11:12:17 GMT) (full text, mbox, link).
Acknowledgement sent
to Michael Tautschnig <mt@debian.org>:
New Bug report received and forwarded. Copy sent to Dimitri John Ledkov <xnox@debian.org>.
(Tue, 13 May 2014 11:12:18 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Package: btrfs-tools
Version: 3.14.1-1
Usertags: goto-cc
During a rebuild of all packages in a clean sid chroot (and cowbuilder+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.
[...]
gcc -g -Os -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -o btrfs btrfs.o help.o cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o cmds-inspect.o cmds-balance.o cmds-send.o cmds-receive.o cmds-quota.o cmds-qgroup.o cmds-replace.o cmds-check.o cmds-restore.o cmds-rescue.o chunk-recover.o super-recover.o cmds-property.o \
ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o root-tree.o dir-item.o file-item.o inode-item.o inode-map.o extent-cache.o extent_io.o volumes.o utils.o repair.o qgroup.o raid6.o free-space-cache.o list_sort.o props.o -Wl,-z,relro -luuid -lblkid -lm -lz -llzo2 -lcom_err -L. libbtrfs.a -lpthread
error: conflicting function declarations "fstat"
old definition in module cmds-filesystem file /usr/include/x86_64-linux-gnu/sys/stat.h line 220
signed int (signed int, struct stat *)
new definition in module cmds-replace file /usr/include/x86_64-linux-gnu/sys/stat.h line 220
signed int (signed int, struct stat *)
Makefile:179: recipe for target 'btrfs' failed
make[2]: *** [btrfs] Error 64
While these declarations appear to be perfectly consistent, the extended
diagnostics produced by our tool explain the difference:
reason for conflict in types listed below (struct/struct):
composite type component counts differ (18/15)
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;
}
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;
}
This difference is caused by #define _XOPEN_SOURCE 500 being present in
cmds-filesystem.c, while this is missing (at least) from cmds-replace.c. It
would likely be best to specify this define on the compiler command line to
ensure consistency across all files.
Best,
Michael
[Message part 2 (application/pgp-signature, inline)]
Marked Bug as done
Request was from Dimitri John Ledkov <xnox@ubuntu.com>
to control@bugs.debian.org.
(Tue, 26 Jul 2016 12:51:09 GMT) (full text, mbox, link).
Notification sent
to Michael Tautschnig <mt@debian.org>:
Bug acknowledged by developer.
(Tue, 26 Jul 2016 12:51:10 GMT) (full text, mbox, link).
Message sent on
to Michael Tautschnig <mt@debian.org>:
Bug#747969.
(Tue, 26 Jul 2016 12:51:17 GMT) (full text, mbox, link).
Message #14 received at 747969-submitter@bugs.debian.org (full text, mbox, reply):
close 747969
thanks
Patch has been applied upstream to set defines at a consistent
level. Closing this bug report.
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Wed, 24 Aug 2016 07:33:36 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Fri Jul 24 03:57:45 2020;
Machine Name:
bembo
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.