Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 711722 - sys-apps/coreutils-8.32 fails with error: 'SYS_getdents' undeclared
Summary: sys-apps/coreutils-8.32 fails with error: 'SYS_getdents' undeclared
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-03-06 19:57 UTC by Mike Johnson
Modified: 2020-03-08 01:18 UTC (History)
1 user (show)

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


Attachments
allows coreutils to install (coreutils-8.32-getdents64.patch,539 bytes, patch)
2020-03-06 20:07 UTC, Mike Johnson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Johnson 2020-03-06 19:57:50 UTC
This error occurs at least on aarch64:
src/ls.c: In function 'print_dir':
src/ls.c:3026:24: error: 'SYS_getdents' undeclared (first use in this function); did you mean 'SYS_getdents64'?
 3026 |           if (syscall (SYS_getdents, dirfd (dirp), NULL, 0) == -1
      |                        ^~~~~~~~~~~~
      |                        SYS_getdents64

apparently they did mean getdents64 because simple patch attached solves problem.  Incidentally, I turned off all "hotrod" features (distcc, tmpfs, edgy CFLAGS, etc.) to be sure.

Portage 2.3.92 (python 3.6.10-final-0, default/linux/arm64/17.0/desktop, gcc-9.2.0, glibc-2.30-r4, 4.9.187-52 aarch64)
=================================================================
System uname: Linux-4.9.187-52-aarch64-with-gentoo-2.7
KiB Mem:     3801296 total,   2526156 free
KiB Swap:    2240508 total,   2240488 free
Timestamp of repository gentoo: Fri, 06 Mar 2020 11:37:33 +0000
Head commit of repository gentoo: 045e82ebb8905dc402abc5ddd125a407c411b605

sh bash 5.0_p16
ld GNU ld (Gentoo 2.34 p1) 2.34.0
distcc 3.3.3 aarch64-unknown-linux-gnu [enabled]
ccache version 3.7.7 [disabled]
app-shells/bash:          5.0_p16::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r1::gentoo, 3.6.10::gentoo, 3.7.6::gentoo
dev-util/ccache:          3.7.7-r1::gentoo
dev-util/cmake:           3.16.5::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.1-r2::gentoo
sys-devel/binutils:       2.32-r1::gentoo, 2.34::gentoo
sys-devel/gcc:            9.2.0-r4::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.5::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r4::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo
    priority: -1000

odroidn2
    location: /var/db/repos/odroidn2
    masters: gentoo
    priority: 10

ACCEPT_KEYWORDS="arm64 ~*"
ACCEPT_LICENSE="@FREE"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-O2 -march=armv8-a+crc+fp+simd+crypto -mtune=cortex-a73.cortex-a53 -mcpu=cortex-a73.cortex-a53+crc+fp+simd+crypto -ftree-vectorize -flto=6 -fgraphite-identity -ftree-loop-distribution -floop-nest-optimize -floop-strip-mine -floop-interchange -floop-block -ftree-loop-distribute-patterns -fuse-linker-plugin -pipe --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=256"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=armv8-a+crc+fp+simd+crypto -mtune=cortex-a73.cortex-a53 -mcpu=cortex-a73.cortex-a53+crc+fp+simd+crypto -ftree-vectorize -flto=6 -fgraphite-identity -ftree-loop-distribution -floop-nest-optimize -floop-strip-mine -floop-interchange -floop-block -ftree-loop-distribute-patterns -fuse-linker-plugin -pipe --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=256"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS=" --exclude app-emulation/qemu"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -march=armv8-a+crc+fp+simd+crypto -mtune=cortex-a73.cortex-a53 -mcpu=cortex-a73.cortex-a53+crc+fp+simd+crypto -ftree-vectorize -flto=6 -fgraphite-identity -ftree-loop-distribution -floop-nest-optimize -floop-strip-mine -floop-interchange -floop-block -ftree-loop-distribute-patterns -fuse-linker-plugin -pipe --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=256"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg config-protect-if-modified distcc distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=armv8-a+crc+fp+simd+crypto -mtune=cortex-a73.cortex-a53 -mcpu=cortex-a73.cortex-a53+crc+fp+simd+crypto -ftree-vectorize -flto=6 -fgraphite-identity -ftree-loop-distribution -floop-nest-optimize -floop-strip-mine -floop-interchange -floop-block -ftree-loop-distribute-patterns -fuse-linker-plugin -pipe --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=256"
GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo http://mirrors.evowise.com/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1,--as-needed,--hash-style=gnu,--sort-common -O2 -march=armv8-a+crc+fp+simd+crypto -mtune=cortex-a73.cortex-a53 -mcpu=cortex-a73.cortex-a53+crc+fp+simd+crypto -ftree-vectorize -flto=6 -fgraphite-identity -ftree-loop-distribution -floop-nest-optimize -floop-strip-mine -floop-interchange -floop-block -ftree-loop-distribute-patterns -fuse-linker-plugin -pipe --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=256"
MAKEOPTS="-j29 -l8"
PKGDIR="/var/cache/portage/binpkgs"
PORTAGE_CONFIGROOT="/"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa arm64 bash-completion berkdb bluetooth branding bzip2 cairo calendar cdda cdr cli consolekit crypt cups curl cxx dbus directfb dri dts dvdr emboss encode exif fbcon ffmpeg flac fortran ftp gdbm gif gimp gnutls gpm gstreamer gtk iconv icu imagemagick inotify introspection ipv6 jabber javascript jingle jit jpeg lame lcms ldap libnotify libtirpc lzo mad mmap mng mp3 mp4 mpeg mplayer ncurses nfs nls nptl nsplugin odbc offensive ogg oggvorbis opengl openmp openssl pam pango pcre pdf png policykit posix ppds pulseaudio qt3support qt5 rar raw readline sasl seccomp snmp sound speex spell split-usr ssl startup-notification svg symlink syslog tcpd theora threads tiff truetype udev udisks unicode upnp upnp-av upower usb video vorbis wxwidgets x264 xattr xcb xcomposite xml xmpp xorg xpm xrandr xv xvid xvmc zlib" ADA_TARGET="gnat_2018" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb vfp vfpv3 vfpv4 vfp-d32 aes sha1 sha2 crc32 v4 v5 v6 v7 v8 thumb2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LIRC_DEVICES="userspace" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="fbdev dummy v4l" 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:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Reproducible: Always

Steps to Reproduce:
1.  emerge coreutils
2.  watch the magic
3.
Actual Results:  
error: 'SYS_getdents' undeclared

Expected Results:  
source compiled

emerged with zarro effort
Comment 1 Mike Johnson 2020-03-06 20:07:36 UTC
Created attachment 617340 [details, diff]
allows coreutils to install
Comment 2 Mike Gilbert gentoo-dev 2020-03-08 00:54:58 UTC
The relevant code was reverted upstream.

http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=10fcb97bd728f09d4a027eddf8ad2900f0819b0a
Comment 3 Mike Gilbert gentoo-dev 2020-03-08 00:57:22 UTC
Upstream discussion.

https://lists.gnu.org/archive/html/bug-coreutils/2020-03/msg00005.html
Comment 4 Larry the Git Cow gentoo-dev 2020-03-08 01:18:52 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=693d9c9b8bbe2e33b4a6ba757fe6b969e25ee1bd

commit 693d9c9b8bbe2e33b4a6ba757fe6b969e25ee1bd
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2020-03-08 01:18:01 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2020-03-08 01:18:01 +0000

    sys-apps/coreutils: restore ls behavior from 8.31
    
    Closes: https://bugs.gentoo.org/711722
    Package-Manager: Portage-2.3.92_p3, Repoman-2.3.20_p118
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 ...eutils-8.32.ebuild => coreutils-8.32-r1.ebuild} | 15 +++-
 .../coreutils-8.32-ls-restore-8.31-behavior.patch  | 94 ++++++++++++++++++++++
 2 files changed, 105 insertions(+), 4 deletions(-)