Closed patchMonkey156 closed 6 years ago
emerge --info '=sys-kernel/spl-0.7.5::gentoo'
Portage 2.3.13 (python 3.5.4-final-0, default/linux/amd64/13.0/desktop, gcc-7.2.0, glibc-2.25-r9, 4.13.9-300.fc27.x86_64 x86_64)
System Settings:
System uname: Linux-4.13.9-300.fc27.x86_64-x86_64-AMD_FX-tm-8350_Eight-Core_Processor-with-gentoo-2.4.1
KiB Mem: 32901516 total, 16684032 free
KiB Swap: 0 total, 0 free
Timestamp of repository gentoo: Thu, 28 Dec 2017 00:45:01 +0000
Head commit of repository gentoo: dbbcaa80af14ec02c8eba29c56f946886b192845
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash: 4.3_p48-r1::gentoo
dev-lang/perl: 5.24.3::gentoo
dev-lang/python: 2.7.14-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake: 3.9.6::gentoo
dev-util/pkgconfig: 0.29.2::gentoo
sys-apps/baselayout: 2.4.1-r2::gentoo
sys-apps/openrc: 0.34.11::gentoo
sys-apps/sandbox: 2.10-r4::gentoo
sys-devel/autoconf: 2.13::gentoo, 2.69::gentoo
sys-devel/automake: 1.15.1-r1::gentoo
sys-devel/binutils: 2.29.1-r1::gentoo
sys-devel/gcc: 7.2.0::gentoo
sys-devel/gcc-config: 1.8-r1::gentoo
sys-devel/libtool: 2.4.6-r3::gentoo
sys-devel/make: 4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc: 2.25-r9::gentoo
Repositories:
gentoo
location: /usr/portage
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
sync-rsync-extra-opts:
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.mirrors.easynews.com/linux/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://lug.mtu.edu/gentoo/ http://gentoo.osuosl.org/ http://gentoo.mirrors.pair.com/ rsync://mirrors.rit.edu/gentoo/ http://gentoo.mirrors.tds.net/gentoo http://mirror.lug.udel.edu/pub/gentoo/ ftp://cosmos.illinois.edu/pub/gentoo/ http://gentoo.cs.uni.edu/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
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 amd64 audit berkdb bluetooth branding bzip2 cairo cdda cdr clamav cli consolekit cracklib crypt css cxx dbus device-mapper dga dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif git glamor gpm gtk hardened iconv ipv6 jpeg lcms ldap libnotify libzfs lm_sensors lz4 lzma lzo mad mmap mng modules mp3 mp4 mpeg multilib ncurses networkmanager nls nptl offensive ogg openal opengl openmp pam pango pcre pdf png policykit ppds profile pulseaudio qt3support qt5 readline sdl seccomp session smp sound spell ssl startup-notification svg syslog tcpd tiff truetype udev udisks unicode upnp upower usb vdpau vorbis wxwidgets x264 xattr xcb xml xscreensaver xv xvid zlib" ABI_X86="64" ELIBC="glibc" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux"
Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
configure:15981: checking whether old 2-argument shrinker exists
configure:16019: cp conftest.c build && make modules -C /lib/modules/4.14.8-gentoo-r1/build EXTRA_CFLAGS=-Werror-implicit-function-declaration -Werror M=/var/tmp/portage/sys-kernel/spl-0.7.5/work/spl-0.7.5/build
/var/tmp/portage/sys-kernel/spl-0.7.5/work/spl-0.7.5/build/conftest.c: In function ‘main’:
/var/tmp/portage/sys-kernel/spl-0.7.5/work/spl-0.7.5/build/conftest.c:68:5: error: ‘struct shrinker’ has no member named ‘shrink’
.shrink = shrinker_cb,
^~~~~~
I wonder if this is a duplicate of #418. Can you try with gcc 6? I also noticed you are running gcc 7 on the 13.0 profile, stock should actually be gcc 5.4.0. The new 17.0 profile uses gcc 6.
edit: apparently zol should support gcc 7... did you install it recently without recompiling your kernel perhaps?
actually? on this fresh install, it came with gcc 6.4.0 - the devs must be pushing the migration to 17 faster than we thought.
Yeah, that probably should have been my first move - trying again in gcc6. USE=-custom-cflags didn't fix anything, even though I'm used to that flag being the problem.
As for the potential regression: When I've had this problem in the past, the only workaround was to use an earlier kernel. gcc-7.2.0 worked for gentoo's kernel 4.12, but nothing later. On 4.13 from gentoo, Copperhead, even vanilla, I had trouble regardless of whether it was gcc 6 or 7.
Is there some kind of kernel/dependency config option I'm missing? I do try to cut my packages pretty lean, but with all the security options blocking everything. I had to remember to recompile with the unused kernel symbols left in.
Gimme a sec to recompile gcc6
FWIW, I'm running 4.14.2 on a semi-recent git master with gcc 6.4.0. You might want to file a bug over with gentoo as well if you're having problems.
You might want to file a bug over with gentoo as well if you're having problems.
Absolutely. The independence from specific kernels tells me it could be something about my build.
Aaaand the same thing happens with gcc 6.4.0 - recompiled the kernel afterwards to match spl.
I wonder which shrinker this is supposed to be, that spl is missing it: /usr/src/linux/include/linux/shrinker.h (renamed to a .log to get it uploaded). diff against the latest on kernel.org shows they're identical files.
Which tells me there's something else coming between spl and this memory function.
from ./include/asm-generic/bug.h:5:0,
from ./arch/x86/include/asm/bug.h:82,
from ./include/linux/bug.h:5,
from ./include/linux/mmdebug.h:5,
from ./include/linux/mm.h:9,
/var/tmp/portage/sys-kernel/spl-0.7.5/work/spl-0.7.5/build/conftest.c:59:
So... this puppy leads down an initially interesting rabbit hole. Each line is a reference to the previous header file. bug.h:5 references /include/linux/compiler.h... Each header is identical to the mainline for this kernel version. Tomorrow, I guess I can chase this rabbit down the hole of the actual code?
Perhaps there is a code incompatibility between some gentoo-patched-kernel option and spl. This feels more and more like a job for their devs. Either way, I would like to leave this open until the consultation with them yields something as well. If such yields a solution, I'd like to edit the title of this thread to mention downstream issues, kernel config issues, etc... perhaps the spl ebuild in portage needs to add another kernel config check.
I'm hoping this is something I can smack my head about, maybe edit some wikis, and rest soundly about the answer being there for anyone else - the real reason why these things stay around after being solved.
SO...
After switching to a different liveCD for the install, I got to playing around inside the Gentoo security options... yeah, seems like there's a option to "Harden common str/mem functions against buffer overflows" (CONFIG_FORTIFY_SOURCE).
This seems to be the culprit. After disabling this option, spl compiles normally. Time to update the documentation.
Any suggestions?