Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 548024 - app-arch/tar-1.28-r1: error: too few arguments to function 'setxattr'
Summary: app-arch/tar-1.28-r1: error: too few arguments to function 'setxattr'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: Normal normal (vote)
Assignee: Gentoo Prefix
URL: http://lists.gnu.org/archive/html/bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-28 15:18 UTC by Paul Varner (RETIRED)
Modified: 2015-05-06 06:34 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,51.04 KB, text/plain)
2015-04-28 15:20 UTC, Paul Varner (RETIRED)
Details
tar-1.28-xattr.patch (tar-1.28-xattr.patch,3.87 KB, patch)
2015-04-28 15:21 UTC, Paul Varner (RETIRED)
Details | Diff
Port xattr-at.c to OS X and Solaris 10 (tar-1.28-r1-port-xattr-at-c.patch,407 bytes, patch)
2015-05-05 05:34 UTC, iloveosxzfs
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Varner (RETIRED) gentoo-dev 2015-04-28 15:18:48 UTC
app-arch/tar-1.28-r1 fails to build on my OS X prefix with the following errors:

In file included from xattr-at.c:40:
../gnu/at-func.c: In function 'setxattrat':
../gnu/at-func.c:77: error: too few arguments to function 'setxattr'
../gnu/at-func.c:95: error: too few arguments to function 'setxattr'
../gnu/at-func.c:132: error: too few arguments to function 'setxattr'
In file included from xattr-at.c:52:
../gnu/at-func.c: In function 'lsetxattrat':
../gnu/at-func.c:77: warning: implicit declaration of function 'lsetxattr'
In file included from xattr-at.c:65:
../gnu/at-func.c: In function 'getxattrat':
../gnu/at-func.c:77: error: too few arguments to function 'getxattr'
../gnu/at-func.c:95: error: too few arguments to function 'getxattr'
../gnu/at-func.c:132: error: too few arguments to function 'getxattr'
In file included from xattr-at.c:79:
../gnu/at-func.c: In function 'lgetxattrat':
../gnu/at-func.c:77: warning: implicit declaration of function 'lgetxattr'
In file included from xattr-at.c:92:
../gnu/at-func.c: In function 'listxattrat':
../gnu/at-func.c:77: error: too few arguments to function 'listxattr'
../gnu/at-func.c:95: error: too few arguments to function 'listxattr'
../gnu/at-func.c:132: error: too few arguments to function 'listxattr'

This appears to match the description in the following message to the bug-tar mailing list: http://lists.gnu.org/archive/html/bug-tar/2014-08/msg00012.html

Applying the referenced patch does fix the build errors, and I have not noticed any problems using tar-1.28 with the patch.  I will attach the failed build.log and the patch to this bug

Reproducible: Always

Steps to Reproduce:
1. emerge -av1 =app-arch/tar-1.28-r1

Actual Results:  
Build fails with errors

Expected Results:  
Build is successful

Portage 2.2.14-prefix (python 3.3.3-final-0, prefix/darwin/macos/10.10/x64, gcc-4.2.1, unavailable, 14.3.0 x86_64)
=================================================================
System uname: Darwin-14.3.0-x86_64-i386-64bit
Timestamp of tree: Tue, 28 Apr 2015 13:43:33 +0000
app-shells/bash:      4.2_p53
dev-lang/perl:        5.20.2
dev-lang/python:      2.7.8, 3.3.3
dev-util/pkgconfig:   0.28-r2
sys-devel/autoconf:   2.69
sys-devel/automake:   1.14.1
sys-devel/gcc-config: 1.8-r1
sys-devel/libtool:    2.4.2-r1
sys-devel/make:       4.1-r1
Repositories: gentoo_prefix local
ACCEPT_KEYWORDS="~x64-macos"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-apple-darwin14"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-apple-darwin14"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/Users/pvarner/Library/Gentoo/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FCFLAGS=""
FEATURES="assume-digests binpkg-logs case-insensitive-fs config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync news nostrip preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-dead_strip_dylibs"
MAKEOPTS="-j1"
PKGDIR="/Users/pvarner/Library/Gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/Users/pvarner/Library/Gentoo/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/Users/pvarner/Library/Gentoo/var/tmp"
PORTDIR="/Users/pvarner/Library/Gentoo/usr/portage"
PORTDIR_OVERLAY="/Users/pvarner/Library/Gentoo/usr/local/portage/local"
USE="coreaudio cracklib cxx ipv6 mmx mmxext modules ncurses nls objc objc++ prefix prefix-guest readline sse sse2 ssl svg unicode x64-macos zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="Darwin" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 1 Paul Varner (RETIRED) gentoo-dev 2015-04-28 15:20:35 UTC
Created attachment 402166 [details]
build.log
Comment 2 Paul Varner (RETIRED) gentoo-dev 2015-04-28 15:21:25 UTC
Created attachment 402168 [details, diff]
tar-1.28-xattr.patch
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2015-04-29 15:53:46 UTC
Patch works for me.
Comment 4 iloveosxzfs 2015-05-05 05:34:38 UTC
Created attachment 402670 [details, diff]
Port xattr-at.c to OS X and Solaris 10

http://git.savannah.gnu.org/cgit/tar.git/commit/?id=9c2b57232e3bc2e5ba85387560bcdd851849a128

author	Paul Eggert <eggert@cs.ucla.edu>	2015-01-06 04:24:18 (GMT)
committer	Paul Eggert <eggert@cs.ucla.edu>	2015-01-06 04:24:42 (GMT)
commit	9c2b57232e3bc2e5ba85387560bcdd851849a128 (patch) (side-by-side diff)
tree	97fa0eb089875f1b456af8abdedb1f6a6fdd0926
parent	55fb2fc38fbdd9ea39da0ab84ed4748f16ab9b73 (diff)
download	tar-9c2b57232e3bc2e5ba85387560bcdd851849a128.tar.gz
tar: port xattr-at.c to Solaris 10
* lib/xattr-at.c (setxattrat, lsetxattrat, getxattrat, lgetxattrat)
(listxattrat, llistxattrat): Compile only if HAVE_XATTRS, so that
the code doesn't call functions that are not declared.
Comment 5 iloveosxzfs 2015-05-05 05:35:41 UTC
There is actually already an upstream patch for this: http://git.savannah.gnu.org/cgit/tar.git/commit/?id=9c2b57232e3bc2e5ba85387560bcdd851849a128

"tar: port xattr-at.c to Solaris 10
* lib/xattr-at.c (setxattrat, lsetxattrat, getxattrat, lgetxattrat)
(listxattrat, llistxattrat): Compile only if HAVE_XATTRS, so that
the code doesn't call functions that are not declared."

The patch was intended to fix the build on Solaris 10, but it turns out OS X has the exact same problem. I have tested the upstream patch, and it does indeed resolve the same problem on OS X.

I have attached the patch for convenience.
Comment 6 iloveosxzfs 2015-05-05 05:40:38 UTC
It is worth noting that this bug causes bootstrap to fail, so hopefully it can be fixed sooner rather than later and included in the default prefix-overlay.
Comment 7 SpanKY gentoo-dev 2015-05-05 05:55:32 UTC
(In reply to iloveosxzfs from comment #4)

is this the only patch needed ?  this should be trivial to import.
Comment 8 iloveosxzfs 2015-05-05 06:01:23 UTC
Yes, that's all that's needed, and indeed it will be trivial to import. I just wonder how long it will take to make it into the default prefix-overlay since the current default is 20141125.
Comment 9 SpanKY gentoo-dev 2015-05-05 06:38:46 UTC
Commit message: Pull in upstream fix for building xattrs on Solaris systems
http://sources.gentoo.org/app-arch/tar/files/tar-1.28-xattr.patch?rev=1.1
http://sources.gentoo.org/app-arch/tar/tar-1.28-r1.ebuild?r1=1.1&r2=1.2
Comment 10 Fabian Groffen gentoo-dev 2015-05-05 10:59:48 UTC
will bump snapshot tomorrow, thanks Mike!
Comment 11 Fabian Groffen gentoo-dev 2015-05-06 06:34:54 UTC
snapshot bumped