Debian Bug report logs - #758406
fakeroot: FTBFS: ../libfakeroot.c:1646:9: error: conflicting types for 'setxattr'

version graph

Package: fakeroot; Maintainer for fakeroot is Clint Adams <clint@debian.org>; Source for fakeroot is src:fakeroot (PTS, buildd, popcon).

Reported by: Aurelien Jarno <aurel32@debian.org>

Date: Sun, 17 Aug 2014 09:00:01 UTC

Severity: serious

Tags: jessie, patch, sid

Found in version 1.20-1.1

Fixed in version fakeroot/1.20.1-1.1

Done: Aurelien Jarno <aurel32@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Clint Adams <clint@debian.org>:
Bug#758406; Package fakeroot. (Sun, 17 Aug 2014 09:00:06 GMT) (full text, mbox, link).


Acknowledgement sent to Aurelien Jarno <aurel32@debian.org>:
New Bug report received and forwarded. Copy sent to Clint Adams <clint@debian.org>. (Sun, 17 Aug 2014 09:00:06 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Aurelien Jarno <aurel32@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: fakeroot: FTBFS: ../libfakeroot.c:1646:9: error: conflicting types for 'setxattr'
Date: Sun, 17 Aug 2014 10:56:49 +0200
Package: fakeroot
Version: 1.20-1.1
Severity: serious
Justification: fails to build from source (but built successfully in the past)

fakeroot fails to build from source in a recent sid chroot. From my
pbuilder log:

| Making all in test
| make[3]: Entering directory '/tmp/buildd/fakeroot-1.20.1/obj-sysv/test'
| make[3]: Nothing to be done for 'all'.
| make[3]: Leaving directory '/tmp/buildd/fakeroot-1.20.1/obj-sysv/test'
| make[3]: Entering directory '/tmp/buildd/fakeroot-1.20.1/obj-sysv'
| awk -f ../wrapawk < ../wrapfunc.inp
| /bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..     -W -Wall -g -O2 -MT libfakeroot.lo -MD -MP -MF .deps/libfakeroot.Tpo -c -o libfakeroot.lo ../libfakeroot.c
| libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -W -Wall -g -O2 -MT libfakeroot.lo -MD -MP -MF .deps/libfakeroot.Tpo -c ../libfakeroot.c  -fPIC -DPIC -o .libs/libfakeroot.o
| ../libfakeroot.c:1646:9: error: conflicting types for 'setxattr'
|  ssize_t setxattr(const char *path, const char *name, void *value, size_t size, int flags)
|          ^
| In file included from /usr/include/sys/capability.h:30:0,
|                  from ../libfakeroot.c:131:
| /usr/include/x86_64-linux-gnu/sys/xattr.h:41:12: note: previous declaration of 'setxattr' was here
|  extern int setxattr (const char *__path, const char *__name,
|             ^
| ../libfakeroot.c:1667:9: error: conflicting types for 'lsetxattr'
|  ssize_t lsetxattr(const char *path, const char *name, void *value, size_t size, int flags)
|          ^
| In file included from /usr/include/sys/capability.h:30:0,
|                  from ../libfakeroot.c:131:
| /usr/include/x86_64-linux-gnu/sys/xattr.h:48:12: note: previous declaration of 'lsetxattr' was here
|  extern int lsetxattr (const char *__path, const char *__name,
|             ^
| ../libfakeroot.c:1688:9: error: conflicting types for 'fsetxattr'
|  ssize_t fsetxattr(int fd, const char *name, void *value, size_t size, int flags)
|          ^
| In file included from /usr/include/sys/capability.h:30:0,
|                  from ../libfakeroot.c:131:
| /usr/include/x86_64-linux-gnu/sys/xattr.h:54:12: note: previous declaration of 'fsetxattr' was here
|  extern int fsetxattr (int __fd, const char *__name, const void *__value,
|             ^
| ../libfakeroot.c:1835:9: error: conflicting types for 'removexattr'
|  ssize_t removexattr(const char *path, const char *name)
|          ^
| In file included from /usr/include/sys/capability.h:30:0,
|                  from ../libfakeroot.c:131:
| /usr/include/x86_64-linux-gnu/sys/xattr.h:92:12: note: previous declaration of 'removexattr' was here
|  extern int removexattr (const char *__path, const char *__name) __THROW;
|             ^
| ../libfakeroot.c:1856:9: error: conflicting types for 'lremovexattr'
|  ssize_t lremovexattr(const char *path, const char *name)
|          ^
| In file included from /usr/include/sys/capability.h:30:0,
|                  from ../libfakeroot.c:131:
| /usr/include/x86_64-linux-gnu/sys/xattr.h:97:12: note: previous declaration of 'lremovexattr' was here
|  extern int lremovexattr (const char *__path, const char *__name) __THROW;
|             ^
| ../libfakeroot.c:1877:9: error: conflicting types for 'fremovexattr'
|  ssize_t fremovexattr(int fd, const char *name)
|          ^
| In file included from /usr/include/sys/capability.h:30:0,
|                  from ../libfakeroot.c:131:
| /usr/include/x86_64-linux-gnu/sys/xattr.h:101:12: note: previous declaration of 'fremovexattr' was here
|  extern int fremovexattr (int __fd, const char *__name) __THROW;
|             ^
| ../libfakeroot.c: In function 'acl_get_fd':
| ../libfakeroot.c:1919:22: warning: unused parameter 'fd' [-Wunused-parameter]
|  acl_t acl_get_fd(int fd) {
|                       ^
| ../libfakeroot.c: In function 'acl_get_file':
| ../libfakeroot.c:1923:32: warning: unused parameter 'path_p' [-Wunused-parameter]
|  acl_t acl_get_file(const char *path_p, acl_type_t type) {
|                                 ^
| ../libfakeroot.c:1923:51: warning: unused parameter 'type' [-Wunused-parameter]
|  acl_t acl_get_file(const char *path_p, acl_type_t type) {
|                                                    ^
| ../libfakeroot.c: In function 'acl_set_fd':
| ../libfakeroot.c:1927:20: warning: unused parameter 'fd' [-Wunused-parameter]
|  int acl_set_fd(int fd, acl_t acl) {
|                     ^
| ../libfakeroot.c:1927:30: warning: unused parameter 'acl' [-Wunused-parameter]
|  int acl_set_fd(int fd, acl_t acl) {
|                               ^
| ../libfakeroot.c: In function 'acl_set_file':
| ../libfakeroot.c:1932:30: warning: unused parameter 'path_p' [-Wunused-parameter]
|  int acl_set_file(const char *path_p, acl_type_t type, acl_t acl) {
|                               ^
| ../libfakeroot.c:1932:49: warning: unused parameter 'type' [-Wunused-parameter]
|  int acl_set_file(const char *path_p, acl_type_t type, acl_t acl) {
|                                                  ^
| ../libfakeroot.c:1932:61: warning: unused parameter 'acl' [-Wunused-parameter]
|  int acl_set_file(const char *path_p, acl_type_t type, acl_t acl) {
|                                                              ^
| Makefile:638: recipe for target 'libfakeroot.lo' failed
| make[3]: *** [libfakeroot.lo] Error 1
| make[3]: Leaving directory '/tmp/buildd/fakeroot-1.20.1/obj-sysv'
| Makefile:660: recipe for target 'all-recursive' failed
| make[2]: *** [all-recursive] Error 1
| make[2]: Leaving directory '/tmp/buildd/fakeroot-1.20.1/obj-sysv'
| Makefile:434: recipe for target 'all' failed
| make[1]: *** [all] Error 2
| make[1]: Leaving directory '/tmp/buildd/fakeroot-1.20.1/obj-sysv'
| debian/rules:44: recipe for target 'build-stamp' failed
| make: *** [build-stamp] Error 2
| dpkg-buildpackage: error: debian/rules build gave error exit status 2
| E: Failed autobuilding of package

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages fakeroot depends on:
ii  libc6        2.19-9
ii  libfakeroot  1.20-1.1

fakeroot recommends no packages.

fakeroot suggests no packages.

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Clint Adams <clint@debian.org>:
Bug#758406; Package fakeroot. (Sun, 17 Aug 2014 14:21:21 GMT) (full text, mbox, link).


Acknowledgement sent to Aurelien Jarno <aurel32@debian.org>:
Extra info received and forwarded to list. Copy sent to Clint Adams <clint@debian.org>. (Sun, 17 Aug 2014 14:21:21 GMT) (full text, mbox, link).


Message #10 received at 758406@bugs.debian.org (full text, mbox, reply):

From: Aurelien Jarno <aurel32@debian.org>
To: Clint Adams <clint@debian.org>
Cc: 758406@bugs.debian.org
Subject: Bug#758406: fakeroot: FTBFS: ../libfakeroot.c:1646:9: error: conflicting types for 'setxattr'
Date: Sun, 17 Aug 2014 16:20:28 +0200
Contrl: tag -1 + patch

On Sun, Aug 17, 2014 at 10:56:49AM +0200, Aurelien Jarno wrote:
> Package: fakeroot
> Version: 1.20-1.1
> Severity: serious
> Justification: fails to build from source (but built successfully in the past)
> 
> fakeroot fails to build from source in a recent sid chroot. From my
> pbuilder log:
> 
> | Making all in test
> | make[3]: Entering directory '/tmp/buildd/fakeroot-1.20.1/obj-sysv/test'
> | make[3]: Nothing to be done for 'all'.
> | make[3]: Leaving directory '/tmp/buildd/fakeroot-1.20.1/obj-sysv/test'
> | make[3]: Entering directory '/tmp/buildd/fakeroot-1.20.1/obj-sysv'
> | awk -f ../wrapawk < ../wrapfunc.inp
> | /bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..     -W -Wall -g -O2 -MT libfakeroot.lo -MD -MP -MF .deps/libfakeroot.Tpo -c -o libfakeroot.lo ../libfakeroot.c
> | libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -W -Wall -g -O2 -MT libfakeroot.lo -MD -MP -MF .deps/libfakeroot.Tpo -c ../libfakeroot.c  -fPIC -DPIC -o .libs/libfakeroot.o
> | ../libfakeroot.c:1646:9: error: conflicting types for 'setxattr'
> |  ssize_t setxattr(const char *path, const char *name, void *value, size_t size, int flags)
> |          ^
> | In file included from /usr/include/sys/capability.h:30:0,
> |                  from ../libfakeroot.c:131:
> | /usr/include/x86_64-linux-gnu/sys/xattr.h:41:12: note: previous declaration of 'setxattr' was here
> |  extern int setxattr (const char *__path, const char *__name,
> |             ^

xattr.h hasn't changed recently, that said recent versions of libcap-dev
(providing capability.h) now includes it. That's why the conflicts
appeared suddenly. That said the problem is real and the function
definitions seems to have been wrong for a lot of time in fakeroot. The
patch below fixes that by using the same definitions than in xattr.h.


--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -1570,7 +1570,7 @@
 #endif /* HAVE_CAPSET */
 
 #if defined(HAVE_SETXATTR) || defined(HAVE_LSETXATTR) || defined(HAVE_FSETXATTR)
-static size_t common_setxattr(INT_STRUCT_STAT *st, const char *name, void * value, size_t size, int flags)
+static int common_setxattr(INT_STRUCT_STAT *st, const char *name, const void * value, size_t size, int flags)
 {
   xattr_args xattr;
   xattr.name = name;
@@ -1625,7 +1625,7 @@
 #endif /* defined(HAVE_LISTXATTR) || defined(HAVE_LLISTXATTR) || defined(HAVE_FLISTXATTR) */
 
 #if defined(HAVE_REMOVEXATTR) || defined(HAVE_LREMOVEXATTR) || defined(HAVE_FREMOVEXATTR)
-static size_t common_removexattr(INT_STRUCT_STAT *st, const char *name)
+static int common_removexattr(INT_STRUCT_STAT *st, const char *name)
 {
   xattr_args xattr;
   xattr.name = name;
@@ -1643,7 +1643,7 @@
 #endif /* defined(HAVE_REMOVEXATTR) || defined(HAVE_LREMOVEXATTR) || defined(HAVE_FREMOVEXATTR) */
 
 #ifdef HAVE_SETXATTR
-ssize_t setxattr(const char *path, const char *name, void *value, size_t size, int flags)
+int setxattr(const char *path, const char *name, const void *value, size_t size, int flags)
 {
   INT_STRUCT_STAT st;
   int r;
@@ -1664,7 +1664,7 @@
 #endif /* HAVE_SETXATTR */
 
 #ifdef HAVE_LSETXATTR
-ssize_t lsetxattr(const char *path, const char *name, void *value, size_t size, int flags)
+int lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags)
 {
   INT_STRUCT_STAT st;
   int r;
@@ -1685,7 +1685,7 @@
 #endif /* HAVE_LSETXATTR */
 
 #ifdef HAVE_FSETXATTR
-ssize_t fsetxattr(int fd, const char *name, void *value, size_t size, int flags)
+int fsetxattr(int fd, const char *name, const void *value, size_t size, int flags)
 {
   INT_STRUCT_STAT st;
   int r;
@@ -1832,7 +1832,7 @@
 #endif /* HAVE_FLISTXATTR */
 
 #ifdef HAVE_REMOVEXATTR
-ssize_t removexattr(const char *path, const char *name)
+int removexattr(const char *path, const char *name)
 {
   INT_STRUCT_STAT st;
   int r;
@@ -1853,7 +1853,7 @@
 #endif /* HAVE_REMOVEXATTR */
 
 #ifdef HAVE_LREMOVEXATTR
-ssize_t lremovexattr(const char *path, const char *name)
+int lremovexattr(const char *path, const char *name)
 {
   INT_STRUCT_STAT st;
   int r;
@@ -1874,7 +1874,7 @@
 #endif /* HAVE_LREMOVEXATTR */
 
 #ifdef HAVE_FREMOVEXATTR
-ssize_t fremovexattr(int fd, const char *name)
+int fremovexattr(int fd, const char *name)
 {
   INT_STRUCT_STAT st;
   int r;
--- a/wrapfunc.inp
+++ b/wrapfunc.inp
@@ -168,22 +168,22 @@
 fgetxattr;ssize_t;(int fd, const char *name, void *value, size_t size);(fd, name, value, size)
 #endif /* HAVE_FGETXATTR */
 #ifdef HAVE_SETXATTR
-setxattr;ssize_t;(const char *path, const char *name, void *value, size_t size, int flags);(path, name, value, size, flags)
+setxattr;int;(const char *path, const char *name, const void *value, size_t size, int flags);(path, name, value, size, flags)
 #endif /* HAVE_SETXATTR */
 #ifdef HAVE_LSETXATTR
-lsetxattr;ssize_t;(const char *path, const char *name, void *value, size_t size, int flags);(path, name, value, size, flags)
+lsetxattr;int;(const char *path, const char *name, const void *value, size_t size, int flags);(path, name, value, size, flags)
 #endif /* HAVE_LSETXATTR */
 #ifdef HAVE_FSETXATTR
-fsetxattr;ssize_t;(int fd, const char *name, void *value, size_t size, int flags);(fd, name, value, size, flags)
+fsetxattr;int;(int fd, const char *name, const void *value, size_t size, int flags);(fd, name, value, size, flags)
 #endif /* HAVE_FSETXATTR */
 #ifdef HAVE_REMOVEXATTR
-removexattr;ssize_t;(const char *path, const char *name);(path, name)
+removexattr;int;(const char *path, const char *name);(path, name)
 #endif /* HAVE_REMOVEXATTR */
 #ifdef HAVE_LREMOVEXATTR
-lremovexattr;ssize_t;(const char *path, const char *name);(path, name)
+lremovexattr;int;(const char *path, const char *name);(path, name)
 #endif /* HAVE_LREMOVEXATTR */
 #ifdef HAVE_FREMOVEXATTR
-fremovexattr;ssize_t;(int fd, const char *name);(fd, name)
+fremovexattr;int;(int fd, const char *name);(fd, name)
 #endif /* HAVE_FREMOVEXATTR */
 
 #ifdef HAVE_FSTATAT

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net



Added tag(s) patch. Request was from Aurelien Jarno <aurel32@debian.org> to control@bugs.debian.org. (Sun, 17 Aug 2014 14:51:08 GMT) (full text, mbox, link).


Added tag(s) sid and jessie. Request was from Holger Levsen <holger@layer-acht.org> to control@bugs.debian.org. (Mon, 18 Aug 2014 13:03:17 GMT) (full text, mbox, link).


Reply sent to Aurelien Jarno <aurel32@debian.org>:
You have taken responsibility. (Mon, 18 Aug 2014 13:21:13 GMT) (full text, mbox, link).


Notification sent to Aurelien Jarno <aurel32@debian.org>:
Bug acknowledged by developer. (Mon, 18 Aug 2014 13:21:14 GMT) (full text, mbox, link).


Message #19 received at 758406-close@bugs.debian.org (full text, mbox, reply):

From: Aurelien Jarno <aurel32@debian.org>
To: 758406-close@bugs.debian.org
Subject: Bug#758406: fixed in fakeroot 1.20.1-1.1
Date: Mon, 18 Aug 2014 13:18:41 +0000
Source: fakeroot
Source-Version: 1.20.1-1.1

We believe that the bug you reported is fixed in the latest version of
fakeroot, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 758406@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Aurelien Jarno <aurel32@debian.org> (supplier of updated fakeroot package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 18 Aug 2014 14:58:00 +0200
Source: fakeroot
Binary: fakeroot libfakeroot
Architecture: source
Version: 1.20.1-1.1
Distribution: unstable
Urgency: medium
Maintainer: Clint Adams <clint@debian.org>
Changed-By: Aurelien Jarno <aurel32@debian.org>
Description:
 fakeroot   - tool for simulating superuser privileges
 libfakeroot - tool for simulating superuser privileges - shared libraries
Closes: 758406
Changes:
 fakeroot (1.20.1-1.1) unstable; urgency=medium
 .
   * Non-maintainer upload with maintainer permission.
   * Add patch glibc-xattr-types to fix the type of xattr functions. closes:
     #758406.
Checksums-Sha1:
 5090e6d7c00bbcfb4ee7444270826046b0d9b6fc 1899 fakeroot_1.20.1-1.1.dsc
 36bd6dd165bc00e792118d6e83102775c4012848 43140 fakeroot_1.20.1-1.1.debian.tar.xz
Checksums-Sha256:
 9344c208725d631c8d07297a37f14dba0bc3436012a02065959b840ddc710193 1899 fakeroot_1.20.1-1.1.dsc
 2000e7ea766b2c8c5e7d81742346abf09303fab3042cf159242a74dfbdb19150 43140 fakeroot_1.20.1-1.1.debian.tar.xz
Files:
 6c780ebab12f5cb4f366e32378451517 1899 utils optional fakeroot_1.20.1-1.1.dsc
 253c2a915ccc426b5a956855c0181515 43140 utils optional fakeroot_1.20.1-1.1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIVAwUBU/H6FLqceAYd3YybAQjbNg//Z0kWFlRRMm23+CQSbrSMQCOVAHK7NeER
pYNWUOucx/E3XDMzqziQmJdBKOzTNHHpZZPGPAYlnGgr4UOvVSlX0VGZAWv8NxId
PSi5Nnc6Hcwfp+5bl8U9V/KP89YE6WFWumfRtA9iEhXOIWPTMeGxLgpR+7hNN8Nm
zXFnaD12ZVgcLwwUVwOuHcQDlUZbu0ADaFjI1jbhL1tlcqcmvxXE8D86YpRYeIHw
XIiTjwKtjEARkxbv1PyDcOELYeQQltVAd/MIGcRjTrmqMV+qqVOoHOiHxESCJqFt
E4ya38gn6Jb+yMFn7/C8RMwsr6ODRam5vOHl6tFSs0rwXxHJ8Zx8Y8Yz98JgYF8E
8yGn1tbNPlZzqzZACLq0vPAfDQELCGxBaJjq9oac+iJV1VadOlhU+AO1REAG+b/F
YMIPRSET4UdFnMJDnB2KnTQgyeEsYCte8DbOOS327qAkq3yypdJgizrc4hslMGrO
6bGXBVKV2pI3qKayZRwC78OVH6cIP+AzXUGWGBHrxLwObNQvLuLW7rJtyvrEXSR6
kOlIqYJn1Xbi+PkZLEEVAi6gsp78LUKmXHBCzEvPhYNyvUmbMkklQBIh7HtJBZT3
8QQkTgME8R4GQ9ldZ7+6vtupDzU2+vR7Lke3PZIcGEs1b1dUxUAfAI9wysWD2Gdm
fnM8aRdRJpY=
=cJep
-----END PGP SIGNATURE-----




Information forwarded to debian-bugs-dist@lists.debian.org, Clint Adams <clint@debian.org>:
Bug#758406; Package fakeroot. (Mon, 18 Aug 2014 13:33:04 GMT) (full text, mbox, link).


Acknowledgement sent to Aurelien Jarno <aurel32@debian.org>:
Extra info received and forwarded to list. Copy sent to Clint Adams <clint@debian.org>. (Mon, 18 Aug 2014 13:33:05 GMT) (full text, mbox, link).


Message #24 received at 758406@bugs.debian.org (full text, mbox, reply):

From: Aurelien Jarno <aurel32@debian.org>
To: Clint Adams <clint@debian.org>
Cc: 758406@bugs.debian.org
Subject: Re: Bug#758406: fakeroot: FTBFS: ../libfakeroot.c:1646:9: error: conflicting types for 'setxattr'
Date: Mon, 18 Aug 2014 15:28:54 +0200
[Message part 1 (text/plain, inline)]
As discussed on IRC, I have just done a NMU to fix this bug. Please find
attached the corresponding diff.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net
[fakeroot_1.20.1-1.1.NMU.diff (text/x-diff, attachment)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 16 Sep 2014 07:25:51 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: Wed Jul 3 05:17:20 2024; 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.