Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 469206 - sys-apps/findutils-4.5.11: Undefined symbol _unlinkat
Summary: sys-apps/findutils-4.5.11: Undefined symbol _unlinkat
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All OS X
: Normal normal with 1 vote (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
: 471146 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-05-09 16:57 UTC by Christoph Junghans (RETIRED)
Modified: 2013-10-12 17:39 UTC (History)
7 users (show)

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


Attachments
findutils-4.5.11-unlinkat.patch (findutils-4.5.11-unlinkat.patch,45.38 KB, patch)
2013-05-28 18:58 UTC, Martin von Gagern
Details | Diff
Changes to the findutils ebuild (findutils-4.5.11.ebuild.diff,789 bytes, patch)
2013-05-28 19:00 UTC, Martin von Gagern
Details | Diff
Ebuild changes conditional for prefix (findutils-4.5.11.ebuild.diff,828 bytes, patch)
2013-05-29 08:33 UTC, Martin von Gagern
Details | Diff
findutils-4.5.11-unlinkat.patch (findutils-4.5.11-unlinkat.patch,5.60 KB, patch)
2013-05-30 13:33 UTC, Martin von Gagern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Junghans (RETIRED) gentoo-dev 2013-05-09 16:57:12 UTC
i686-apple-darwin10-gcc -std=gnu99  -O2 -pipe -march=prescott -g  -Wl,-dead_strip_dylibs -g -o oldfind find.o ./libfindtools.a ../lib/libfind.a ../gl/lib/libgnulib.a -L/Users/junghans/Gentoo/usr/lib -lintl -Wl,-framework -Wl,CoreFoundation      -lm -lm    
Undefined symbols for architecture i386:
  "_unlinkat", referenced from:
      _perform_delete in libfindtools.a(pred.o)
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
make[3]: *** [find] Error 1

Portage 2.2.01.21938-prefix (prefix/darwin/macos/10.6/x86, gcc-4.2.1, unavailable, 10.8.0 i386)
=================================================================
System uname: Darwin-10.8.0-i386-32bit
Timestamp of tree: Thu, 09 May 2013 13:36:05 +0000
distcc 3.1-toolwhip.1 i386-apple-darwin10.0 [disabled]
ccache version 3.1.9 [enabled]
app-shells/bash:      4.2_p39-r1
dev-lang/python:      2.7.4, 3.2.3-r2, 3.3.0-r1
dev-util/ccache:      3.1.9-r1::science
dev-util/cmake:       2.8.10.2-r2
dev-util/pkgconfig:   0.28
sys-devel/autoconf:   2.69
sys-devel/automake:   1.12.4
sys-devel/gcc-config: 1.8-r00.1
sys-devel/libtool:    2.4.2
sys-devel/make:       3.82-r4
Repositories:

gentoo_prefix
    location: /Users/junghans/Gentoo/usr/portage
    sync: rsync://rsync.prefix.freens.org/gentoo-portage-prefix
    priority: -1000
    aliases: gentoo

cj-overlay
    location: /Users/junghans/Gentoo/var/lib/layman/cj-overlay
    masters: gentoo_prefix
    priority: 0

science
    location: /Users/junghans/Gentoo/var/lib/layman/science
    masters: gentoo_prefix
    priority: 1

ACCEPT_KEYWORDS="~x86-macos"
ACCEPT_LICENSE="* -@EULA"
ACCEPT_PROPERTIES="*"
ACCEPT_RESTRICT="*"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol"
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"
ARCH="x86-macos"
AUTOCLEAN="yes"
BOOTSTRAP_USE="cxx unicode python_targets_python3_2 python_targets_python2_7"
CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author"
CAMERAS="ptp2"
CBUILD="i686-apple-darwin10"
CFLAGS="-O2 -pipe -march=prescott -g"
CHOST="i686-apple-darwin10"
CLEAN_DELAY="5"
COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog"
COLLISION_IGNORE="/lib/modules/* *.py[co] *$py.class"
COLORSCHEME1="0"
CONFIGURE_EPREFIX="/Users/junghans/Gentoo"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=prescott -g"
DEFAULT_PATH="/Users/junghans/Gentoo/usr/sbin:/Users/junghans/Gentoo/usr/bin:/Users/junghans/Gentoo/sbin:/Users/junghans/Gentoo/bin"
DISPLAY="/tmp/launch-uHQgZw/org.x:0"
DISTDIR="/Users/junghans/Gentoo/usr/portage/distfiles"
EDITOR="/Users/junghans/Gentoo/usr/bin/vi"
ELIBC="Darwin"
EMERGE_DEFAULT_OPTS="--verbose --jobs=3 --load-average=3 --with-bdeps=y --autounmask=y --autounmask-write=y"
EMERGE_WARNING_DELAY="10"
EPREFIX="/Users/junghans/Gentoo"
EROOT="/Users/junghans/Gentoo/"
EXTRA_PATH="/usr/bin:/bin"
FCFLAGS=""
FEATURES="assume-digests binpkg-logs ccache collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync news nostrip parallel-fetch preserve-libs protect-owned sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
FETCHCOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}""
FETCHCOMMAND_SFTP="bash -c "x=\${2#sftp://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec sftp -P \${port} \"\${host}:/\${x#*/}\" \"\$1\"" sftp "${DISTDIR}/${FILE}" "${URI}""
FETCHCOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec rsync --rsh=\"ssh -p\${port}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}""
FFLAGS=""
GCC_SPECS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
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 ubx"
GRUB_PLATFORMS=""
HG="/Users/junghans/Gentoo/usr/bin/hg"
HOME="/Users/junghans"
INFOPATH="/Users/junghans/Gentoo/usr/share/info:/Users/junghans/Gentoo/usr/share/gcc-data/i686-apple-darwin10/4.2.1/info"
INPUT_DEVICES="evdev mouse keyboard"
IUSE_IMPLICIT="prefix"
KERNEL="Darwin"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LDFLAGS="-Wl,-dead_strip_dylibs -g"
LESS="-R -M --shift 5"
LESSOPEN="|lesspipe %s"
LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer"
LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:"
MACOSSANDBOX_PATHS="/dev/fd/ /private/tmp/ /private/var/tmp/ @@PORTAGE_BUILDDIR@@/ @@PORTAGE_ACTUAL_DISTDIR@@/"
MACOSSANDBOX_PATHS_CONTENT_ONLY="/dev/null /dev/dtracehelper /dev/tty /private/var/run/syslog"
MACOSX_DEPLOYMENT_TARGET="10.6"
MAKEOPTS="-j3"
MANPATH="/Users/junghans/Gentoo/usr/local/share/man:/Users/junghans/Gentoo/usr/share/man:/Users/junghans/Gentoo/usr/share/gcc-data/i686-apple-darwin10/4.2.1/man:/Users/junghans/Gentoo//usr/share/binutils-data/i686-apple-darwin10/4.3/man:/usr/share/man"
NETBEANS="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml"
OFFICE_IMPLEMENTATION="libreoffice"
OLDPWD="/Users/junghans"
OPENGL_PROFILE="xorg-x11"
PAGER="/Users/junghans/Gentoo/usr/bin/less"
PATH="/Users/junghans/bin:/Users/junghans/Gentoo/usr/local/bin:/Users/junghans/Gentoo/usr/bin:/Users/junghans/Gentoo/bin:/Users/junghans/Gentoo/opt/bin:/Users/junghans/Gentoo/usr/sbin:/Users/junghans/Gentoo/sbin:/Users/junghans/Gentoo/usr/i686-apple-darwin10/gcc-bin/4.2.1:/usr/bin:/bin:/usr/sbin:/sbin"
PHP_TARGETS="php5-3"
PKGDIR="/Users/junghans/Gentoo/usr/portage/packages"
PKG_CONFIG_PATH="/Users/junghans/Gentoo/usr/lib/pkgconfig:/Users/junghans/Gentoo/usr/share/pkgconfig"
PORTAGE_ARCHLIST="ppc sparc64-freebsd ppc-openbsd x86-openbsd ppc64 x86-winnt x86-fbsd ppc-aix alpha arm x86-freebsd s390 amd64 arm-linux x86-macos x64-openbsd ia64-hpux hppa x86-netbsd ppc64-linux x86-cygwin amd64-linux ia64-linux x86 sparc-solaris x64-freebsd sparc64-solaris x86-linux x64-macos sparc m68k-mint ia64 mips ppc-macos x86-interix hppa-hpux amd64-fbsd x64-solaris m68k sh x86-solaris sparc-fbsd"
PORTAGE_BIN_PATH="/Users/junghans/Gentoo/usr/lib/portage/bin"
PORTAGE_COMPRESS_EXCLUDE_SUFFIXES="css gif htm[l]? jp[e]?g js pdf png"
PORTAGE_CONFIGROOT="/Users/junghans/Gentoo/"
PORTAGE_DEBUG="0"
PORTAGE_DEPCACHEDIR="/Users/junghans/Gentoo/var/cache/edb/dep"
PORTAGE_ELOG_CLASSES="warn error"
PORTAGE_ELOG_MAILFROM="junghans@localhost"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"
PORTAGE_ELOG_MAILURI="junghans"
PORTAGE_ELOG_SYSTEM="save"
PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5"
PORTAGE_FETCH_RESUME_MIN_SIZE="350K"
PORTAGE_GID="20"
PORTAGE_GPG_SIGNING_COMMAND="gpg --sign --digest-algo SHA256 --clearsign --yes --default-key "${PORTAGE_GPG_KEY}" --homedir "${PORTAGE_GPG_DIR}" "${FILE}""
PORTAGE_GROUP="staff"
PORTAGE_INST_GID="20"
PORTAGE_INST_UID="502"
PORTAGE_INTERNAL_CALLER="1"
PORTAGE_OVERRIDE_EPREFIX="/Users/junghans/Gentoo"
PORTAGE_PYM_PATH="/Users/junghans/Gentoo/usr/lib/portage/pym"
PORTAGE_ROOT_USER="junghans"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_RSYNC_RETRIES="-1"
PORTAGE_SYNC_STALE="30"
PORTAGE_TMPDIR="/Users/junghans/Gentoo/var/tmp"
PORTAGE_USER="junghans"
PORTAGE_VERBOSE="1"
PORTAGE_WORKDIR_MODE="0700"
PORTAGE_XATTR_EXCLUDE="security.*"
PORTDIR="/Users/junghans/Gentoo/usr/portage"
PORTDIR_OVERLAY="/Users/junghans/Gentoo/var/lib/layman/cj-overlay /Users/junghans/Gentoo/var/lib/layman/science"
PORT_LOGDIR_CLEAN="find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +7 -delete"
PREFIX_DISABLE_GEN_USR_LDSCRIPT="yes"
PROFILE_ONLY_VARIABLES="ARCH ELIBC IUSE_IMPLICIT KERNEL USERLAND USE_EXPAND_IMPLICIT USE_EXPAND_UNPREFIXED USE_EXPAND_VALUES_ARCH USE_EXPAND_VALUES_ELIBC USE_EXPAND_VALUES_KERNEL USE_EXPAND_VALUES_USERLAND"
PWD="/Users/junghans/Gentoo/usr/portage/sys-apps/findutils"
PYTHONDONTWRITEBYTECODE="1"
PYTHONPATH="/Users/junghans/Gentoo/usr/lib/portage/pym"
PYTHON_SINGLE_TARGET="python2_7"
PYTHON_TARGETS="python2_7 python3_2"
RESUMECOMMAND="wget -c -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
RESUMECOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}""
RESUMECOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port=22 ; exec rsync --rsh=\"ssh -p\${port}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}""
ROOT="/"
ROOTPATH="/Users/junghans/Gentoo/opt/bin:/Users/junghans/Gentoo/usr/i686-apple-darwin10/gcc-bin/4.2.1"
RPMDIR="/Users/junghans/Gentoo/usr/portage/rpm"
RUBY_TARGETS="ruby18 ruby19"
SHELL="/Users/junghans/Gentoo/bin/bash"
SHLVL="1"
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
TERM="xterm-color"
UNINSTALL_IGNORE="/lib/modules/*"
USE="X aqua bash-completion coreaudio cracklib cvs cxx fortran git ipv6 jpeg mercurial mmx mmxext modules ncurses nls objc objc++ png postscript prefix readline sse sse2 ssl subversion unicode vim x86-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" 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 ubx" INPUT_DEVICES="evdev mouse keyboard" 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-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="vesa" 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"
USER="junghans"
USERLAND="GNU"
USE_EXPAND="ABI_X86 APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CROSSCOMPILE_OPTS CURL_SSL DRACUT_MODULES DVB_CARDS ELIBC ENLIGHTENMENT_MODULES FCDSL_CARDS FFTOOLS FOO2ZJS_DEVICES FRITZCAPI_CARDS GPSD_PROTOCOLS GRUB_PLATFORMS INPUT_DEVICES KERNEL LCD_DEVICES LIBREOFFICE_EXTENSIONS LINGUAS LIRC_DEVICES MISDN_CARDS NETBEANS_MODULES NGINX_MODULES_HTTP NGINX_MODULES_MAIL OFED_DRIVERS OFFICE_IMPLEMENTATION OPENMPI_FABRICS OPENMPI_OFED_FEATURES OPENMPI_RM PHP_TARGETS PYTHON_SINGLE_TARGET PYTHON_TARGETS QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS RUBY_TARGETS SANE_BACKENDS USERLAND VIDEO_CARDS VOICEMAIL_STORAGE XFCE_PLUGINS XTABLES_ADDONS"
USE_EXPAND_HIDDEN="ABI_X86 CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND"
USE_EXPAND_IMPLICIT="ARCH ELIBC KERNEL USERLAND"
USE_EXPAND_UNPREFIXED="ARCH"
USE_EXPAND_VALUES_ARCH="alpha amd64 amd64-fbsd amd64-linux arm arm-linux hppa hppa-hpux ia64 ia64-hpux ia64-linux m68k m68k-mint mips ppc ppc64 ppc64-linux ppc-aix ppc-macos ppc-openbsd s390 sh sparc sparc64-freebsd sparc64-solaris sparc-fbsd sparc-solaris x64-freebsd x64-macos x64-openbsd x64-solaris x86 x86-cygwin x86-fbsd x86-freebsd x86-interix x86-linux x86-macos x86-netbsd x86-openbsd x86-solaris x86-winnt"
USE_EXPAND_VALUES_ELIBC="AIX Cygwin Darwin FreeBSD glibc HPUX Interix mintlib NetBSD OpenBSD SunOS uclibc Winnt"
USE_EXPAND_VALUES_KERNEL="AIX Cygwin Darwin FreeBSD freemint HPUX Interix linux NetBSD OpenBSD SunOS Winnt"
USE_EXPAND_VALUES_USERLAND="BSD GNU"
USE_ORDER="env:pkg:conf:defaults:pkginternal:repo:env.d"
VIDEO_CARDS="vesa"
XDG_DATA_DIRS="/Users/junghans/Gentoo/usr/share"
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"
_="/Users/junghans/Gentoo/usr/bin/emerge"
Comment 1 Daniel Hornung 2013-05-10 17:01:33 UTC
I can also confirm this bug.
Comment 2 Martin von Gagern 2013-05-11 08:13:51 UTC
Grepping unlinkat from the build log:

checking for unlinkat... no
checking whether unlinkat is declared without a macro... no
pred.c:307: warning: implicit declaration of function 'unlinkat'
  "_unlinkat", referenced from:

So the code does check for unlinkat, but does not respond to it.

Comparing the sources, I notice that my working findutils-4.5.10 ships with a file gnulib/lib/unlinkat.c containing a replacement implementation. findutils-4.5.11/gl/lib/ contains no such file. The gnulib-cache.m4 does not mention the unlinkat module [1] in either case. So it seems to me that findutils has been relying on an internal dependency between gnulib modules, and that due to updates to gnulib, this no longer works. The solution would be making that dependency explicit. But doing so at the distro level would be pretty tough, I guess, so I submitted a matching bug report upstream [2].

[1] https://www.gnu.org/software/gnulib/MODULES.html#module=unlinkat
[2] https://savannah.gnu.org/bugs/index.php?38963
Comment 3 Fabian Groffen gentoo-dev 2013-05-11 09:19:37 UTC
ok, thanks for the research and upstream submission.

I think this is the same or related issue as we found on Solaris in bug #468790.

See http://lists.gnu.org/archive/html/bug-gnulib/2013-05/msg00023.html
Comment 4 Christoph Junghans (RETIRED) gentoo-dev 2013-05-28 16:12:57 UTC
*** Bug 471146 has been marked as a duplicate of this bug. ***
Comment 5 Martin von Gagern 2013-05-28 18:58:42 UTC
Created attachment 349474 [details, diff]
findutils-4.5.11-unlinkat.patch

I locally added the gnulib unlinkat module to the list of modules to import, and tried to match my gnulib version to approximately the one used to generate the tarball. With this patch in place, and an eautoreconf run, findutils compiled successfully on my OS X.
Comment 6 Martin von Gagern 2013-05-28 19:00:40 UTC
Created attachment 349476 [details, diff]
Changes to the findutils ebuild

These changes apply the patch I just submitted, and make sure to run eautoreconf afterwards in order to regenerate files like those Makefile.in affected by these modifications.
Comment 7 SpanKY gentoo-dev 2013-05-29 03:02:20 UTC
Comment on attachment 349476 [details, diff]
Changes to the findutils ebuild

i really don't want to incur autotool overhead just for prefix.  please find a reduced patchset that doesn't touch source autotool files.

or put it behind USE=prefix

also, you don't need || die after eautoreconf ... it does it for you
Comment 8 Martin von Gagern 2013-05-29 06:52:01 UTC
(In reply to SpanKY from comment #7)
> i really don't want to incur autotool overhead just for prefix.

I hadn't realized that such patches would be targeted at the gentoo-x86 tree, not the prefix overlay.

> please find a reduced patchset that doesn't touch source autotool files.

At first I had a version here which also included Makefile.in files. But the build process complained about autotools version mismatches, portage QA complained about maintainer make mode, and the whole thing didn't feel right. Separating the changes due to a different autotools version from those due to gnulib import changes was tricky as well, although two separate gnulib imports might help there.

> or put it behind USE=prefix

Feels a lot better. I guess for this to work I'd set AUTOTOOLS_AUTO_DEPEND=no and DEPEND="… prefix? ( ${AUTOTOOLS_DEPEND} )", right?

> also, you don't need || die after eautoreconf ... it does it for you

At first I had forgotten to inherit the autotools eclass, and the missing command message to go with that made very little noise. The die was to ward against this situation, both for myself and for future maintainers.
Comment 9 SpanKY gentoo-dev 2013-05-29 07:47:58 UTC
(In reply to Martin von Gagern from comment #8)

i guess that's up to the prefix team.  certainly if they want to throw your patch into that tree now, that's up to them.  but i think the goal has been to kill off the prefix tree and get everything into the main tree.

> At first I had a version here which also included Makefile.in files. ...

this tends to happen when you patch both generated files (Makefile.in) and the inputs to those (Makefile.am, *.m4, etc...)

> Feels a lot better. I guess for this to work I'd set ...

correct.  i'd guess prefix peeps are the worst hit by this, and we don't really care about older freebsd/glibc/uclibc in ~arch (i have no plans to move 4.5.x of findutils into stable).

> At first I had forgotten to inherit the autotools eclass, ...

right, but we have QA warnings now to catch that sort of thing :)

it would be nice if we could maintain some dir somewhere of stub scripts that simply call `die` when you haven't inherited the appropriate eclass
Comment 10 Martin von Gagern 2013-05-29 08:33:43 UTC
Created attachment 349536 [details, diff]
Ebuild changes conditional for prefix

This applies the patch and runs eautoreconf only for USE=prefix. I assume that prefix doesn't have to be listed in IUSE, right? Furthermore I hope that keeping the patch itself in FILESDIR is acceptable. Otherwise you can of course drop the patch on some server, conditionally include it in SRC_URI and apply it from there.
Comment 11 Christoph Junghans (RETIRED) gentoo-dev 2013-05-29 15:30:15 UTC
(In reply to SpanKY from comment #7)
> i really don't want to incur autotool overhead just for prefix.  please find
> a reduced patchset that doesn't touch source autotool files.
I agree, eautoreconf for this base package is a bit too much, it would also introduce problems with bootstrapping prefix.
You could run autoreconf with same version of the autoconf, automake and create a patch from that.

> or put it behind USE=prefix
please don't, conditional patches tend to break very often. This patch isn't harmful for non-prefix.

(In reply to Martin von Gagern from comment #8)
> I hadn't realized that such patches would be targeted at the gentoo-x86
> tree, not the prefix overlay.
Yes, prefix-overlay is going away (only ~135 packages left in there), we now try to put everything in the main tree.

I think the cleanest solution would be to make findutils depend on dev-libs/gnulib. However this ebuild also needs some clean up to get rid of eautoreconf.
Comment 12 SpanKY gentoo-dev 2013-05-30 00:03:01 UTC
(In reply to Christoph Junghans from comment #11)

right, but the conditional patches would only break USE=prefix users :)

i'm guessing when you talk about depending on gnulib, you mean under USE=prefix ?  i don't think that's something we'd want to do for everyone.  or at least, it's something we'd want to figure out in a general case before we start deploying to all packages that leverage gnulib and not do one offs for findutils.
Comment 13 SpanKY gentoo-dev 2013-05-30 00:22:14 UTC
Comment on attachment 349536 [details, diff]
Ebuild changes conditional for prefix

i'm actually fine with this (other than deleting the `die`), but it'd be up to the prefix guys to sign off on the merge
Comment 14 Martin von Gagern 2013-05-30 13:33:23 UTC
Created attachment 349642 [details, diff]
findutils-4.5.11-unlinkat.patch

Here is a new patch, wich applies to the output of autotools, not to their input. This time I used not a diff from the tarball and my locally imported gnulib as the basis, but instead used two local trees, one with and one without unlinkat support. That way I was sure to not get any spurious modifications unrelated to this, e.g. from different automake versions and so on.

I found out that findutils already ships the gnulib unlinkat module as part of its tests. So we don't have to actually ship these files as part of the patch, but may instead copy them from the tests directory. We can even in large pats reuse the configure checks which are already there.

The attached patch goes with the following two additional lines in src_prepare:

        cp tests/{rmdir,unlink,unlinkat,at-func}.c gl/lib/ || die
        epatch "${FILESDIR}/${P}-unlinkat.patch"

No other modifications are required. No autotools, no added deps, no prefix-specific things. You might add a comment, though. I quite like this solution now.
Comment 15 Christoph Junghans (RETIRED) gentoo-dev 2013-05-30 14:27:41 UTC
(In reply to SpanKY from comment #12)
> (In reply to Christoph Junghans from comment #11)
> i'm guessing when you talk about depending on gnulib, you mean under
> USE=prefix ?  i don't think that's something we'd want to do for everyone. 
> or at least, it's something we'd want to figure out in a general case before
> we start deploying to all packages that leverage gnulib and not do one offs
> for findutils.
Of course, depending on gnulib for prefix only.
Comment 16 Christoph Junghans (RETIRED) gentoo-dev 2013-05-30 15:27:37 UTC
(In reply to Martin von Gagern from comment #14)
> Created attachment 349642 [details, diff] [details, diff]
> findutils-4.5.11-unlinkat.patch
> 
> Here is a new patch, wich applies to the output of autotools, not to their
> input. This time I used not a diff from the tarball and my locally imported
> gnulib as the basis, but instead used two local trees, one with and one
> without unlinkat support. That way I was sure to not get any spurious
> modifications unrelated to this, e.g. from different automake versions and
> so on.
> 
> I found out that findutils already ships the gnulib unlinkat module as part
> of its tests. So we don't have to actually ship these files as part of the
> patch, but may instead copy them from the tests directory. We can even in
> large pats reuse the configure checks which are already there.
> 
> The attached patch goes with the following two additional lines in
> src_prepare:
> 
>         cp tests/{rmdir,unlink,unlinkat,at-func}.c gl/lib/ || die
>         epatch "${FILESDIR}/${P}-unlinkat.patch"
> 
> No other modifications are required. No autotools, no added deps, no
> prefix-specific things. You might add a comment, though. I quite like this
> solution now.
Works for me, good job!
Comment 17 Christoph Junghans (RETIRED) gentoo-dev 2013-06-11 14:37:12 UTC
@base-system: are you ok with adding this patch?
Comment 18 Fabian Groffen gentoo-dev 2013-06-11 20:18:39 UTC
breaks on all my darwin boxen
Comment 19 Martin von Gagern 2013-06-14 08:37:16 UTC
(In reply to Fabian Groffen from comment #18)
> breaks on all my darwin boxen

What breaks, findutils as it currently is in portage, or the version with the modifications from comment #14, both the patch and the copy command?
Comment 20 Fabian Groffen gentoo-dev 2013-06-14 08:46:19 UTC
the current version in portage, so would appreciate a/your fix ;)
Comment 21 Fabian Groffen gentoo-dev 2013-06-14 08:59:18 UTC
@ottxor: since this is yours, could you commit a fix, considering comment #13?
Comment 22 Fabian Groffen gentoo-dev 2013-06-18 07:07:33 UTC
masked for the time being (prefix/darwin)
Comment 23 Christoph Junghans (RETIRED) gentoo-dev 2013-06-18 17:24:09 UTC
(In reply to Christoph Junghans from comment #17)
> @base-system: are you ok with adding this patch?
Ping.

We could even put it in "if use prefix" conditional if needed.
Comment 24 SpanKY gentoo-dev 2013-06-19 02:58:49 UTC
(In reply to Christoph Junghans from comment #23)

see comment #13 & comment #21
Comment 25 Christoph Junghans (RETIRED) gentoo-dev 2013-06-19 05:04:21 UTC
+  19 Jun 2013; Christoph Junghans <ottxor@gentoo.org>
+  +files/findutils-4.5.11-unlinkat.patch, findutils-4.5.11.ebuild:
+  fixed prefix build on Darwin (bug #469206, thx to Martin)

+  19 Jun 2013; Christoph Junghans <ottxor@gentoo.org> darwin/package.mask:
+  drop sys-apps/findutils mask, bug #469206 was fixed
Comment 26 yegle 2013-10-12 02:58:06 UTC
This solution failed in latest findutils

>>> Emerging (1 of 1) sys-apps/findutils-4.5.12
 * findutils-4.5.12.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                [ ok ]
>>> Unpacking source...
>>> Unpacking findutils-4.5.12.tar.gz to /tmp/ying/portage_tmpdir/portage/sys-apps/findutils-4.5.12/work
>>> Source unpacked in /tmp/ying/portage_tmpdir/portage/sys-apps/findutils-4.5.12/work
>>> Preparing source in /tmp/ying/portage_tmpdir/portage/sys-apps/findutils-4.5.12/work/findutils-4.5.12 ...
cp: cannot stat ‘tests/rmdir.c’: No such file or directory
cp: cannot stat ‘tests/unlink.c’: No such file or directory
cp: cannot stat ‘tests/unlinkat.c’: No such file or directory
 * ERROR: sys-apps/findutils-4.5.12::gentoo_prefix failed (prepare phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  93:  Called call-ebuildshell 'src_prepare'
 *   environment, line 489:  Called src_prepare
 *   environment, line 2588:  Called die
 * The specific snippet of code:
 *           cp tests/{rmdir,unlink,unlinkat,at-func}.c gl/lib/ || die;
 * 
 * If you need support, post the output of `emerge --info '=sys-apps/findutils-4.5.12::gentoo_prefix'`,
 * the complete build log and the output of `emerge -pqv '=sys-apps/findutils-4.5.12::gentoo_prefix'`.
 * The complete build log is located at '/tmp/ying/portage_tmpdir/portage/sys-apps/findutils-4.5.12/temp/build.log'.
 * The ebuild environment file is located at '/tmp/ying/portage_tmpdir/portage/sys-apps/findutils-4.5.12/temp/environment'.
 * Working directory: '/tmp/ying/portage_tmpdir/portage/sys-apps/findutils-4.5.12/work/findutils-4.5.12'
 * S: '/tmp/ying/portage_tmpdir/portage/sys-apps/findutils-4.5.12/work/findutils-4.5.12'

>>> Failed to emerge sys-apps/findutils-4.5.12, Log file:
Comment 27 Martin von Gagern 2013-10-12 08:10:21 UTC
(In reply to yegle from comment #26)
> This solution failed in latest findutils

https://savannah.gnu.org/bugs/index.php?38963 was marked fixed, so I'll simply assume that the next release, i.e. 4.5.12, simply includes the fix and no longer needs the patch and move stuff.
Comment 28 Stuart Shelton 2013-10-12 17:39:44 UTC
Confirm that findutils-4.5.12 builds on Darwin with 'use prefix' block removed completely.