Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Unable to emerge =sys-fs/zfs-kmod-2.1.3
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
bugalo
n00b
n00b


Joined: 05 Jul 2015
Posts: 38

PostPosted: Sat Mar 19, 2022 7:42 pm    Post subject: [Solved] Unable to emerge =sys-fs/zfs-kmod-2.1.3 Reply with quote

I am unable to emerge =sys-fs/zfs-kmod-2.1.3. I am getting the following build.log:

https://pastebin.com/2Qg78GM8

I cannot figure out what is the problem with the emerge. Could anyone give me a hint on how to fix it?

This is the output of
Code:
emerge --info zfs-kmod


Code:

Portage 3.0.30 (python 3.9.9-final-0, default/linux/amd64/17.1/desktop/gnome/systemd, gcc-11.2.1, glibc-2.34-r10, 5.15.28-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.15.28-gentoo-x86_64-Intel-R-_Atom-TM-_CPU_C3558_@_2.20GHz-with-glibc2.34
KiB Mem:    32846508 total,  11490536 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sat, 19 Mar 2022 18:49:21 +0000
Head commit of repository gentoo: ae5f79fd2ef92f56296c78c4a506938a7b4a703f

sh bash 5.1_p16
ld GNU ld (Gentoo 2.37_p1 p2) 2.37
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p16::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.34.0-r6::gentoo
dev-lang/python:           3.9.9-r1::gentoo, 3.10.2_p1::gentoo
dev-lang/rust:             1.58.1::gentoo
dev-util/cmake:            3.22.2::gentoo
dev-util/meson:            0.60.3::gentoo
sys-apps/baselayout:       2.7-r3::gentoo
sys-apps/sandbox:          2.25::gentoo
sys-apps/systemd:          249.9::gentoo
sys-devel/autoconf:        2.13-r1::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.4::gentoo
sys-devel/binutils:        2.37_p1-r2::gentoo
sys-devel/binutils-config: 5.4::gentoo
sys-devel/clang:           13.0.1::gentoo
sys-devel/gcc:             11.2.1_p20220115::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.6-r6::gentoo
sys-devel/lld:             13.0.1::gentoo
sys-devel/llvm:            13.0.1::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.34-r10::gentoo
Repositories:

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

localrepo
    location: /var/db/repos/localrepo
    masters: gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=goldmont -fomit-frame-pointer -O2 -pipe"
CHOST="x86_64-pc-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/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=goldmont -fomit-frame-pointer -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--verbose-conflicts --complete-graph --with-bdeps=y --quiet-build"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH 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="-march=goldmont -fomit-frame-pointer -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=goldmont -fomit-frame-pointer -O2 -pipe"
GENTOO_MIRRORS="http://mirrors.evowise.com/gentoo/ https://mirrors.evowise.com/gentoo/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en es es_ES"
MAKEOPTS="-j4"
PKGDIR="/var/cache/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="/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl acpi alsa amd64 bindist branding bzip2 cairo cdda cdr cli colord crypt cups dbus dri dts dvd dvdr eds encode evo exif fftw flac fortran gdbm gif git glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 gui iconv icu introspection ipv6 jpeg lcms libglvnd libnotify libsecret libtirpc lm-sensors mad mng mp3 mp4 mpeg mtp multilib nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio readline sdl seccomp smp spell split-usr ssl startup-notification subversion svg sysprof systemd tiff tracker truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2020" 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_X86="mmx mmxext sse sse2" 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" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en es es-es" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby30" USERLAND="GNU" VIDEO_CARDS="ast" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

sys-fs/zfs-kmod-2.1.2::gentoo was built with the following:
USE="rootfs -custom-cflags -debug -dist-kernel -verify-sig" ABI_X86="(64)"
CFLAGS="-march=goldmont -O2 -pipe"
CXXFLAGS="-march=goldmont -O2 -pipe"
LDFLAGS=""




Thanks for your help.


Last edited by bugalo on Tue Mar 22, 2022 9:00 am; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3958

PostPosted: Sat Mar 19, 2022 8:22 pm    Post subject: Reply with quote

Quote:

make[3]: Entering directory '/usr/src/linux-5.16.11-gentoo'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Gentoo 11.2.1_p20220115 p4) 11.2.1 20220115
You are using: x86_64-pc-linux-gnu-gcc (Gentoo 11.2.1_p20220115 p4) 11.2.1 20220115

it complains your kernel was not properly built.
Furthermore different version of gcc used for kernel and zfs-kmod
_________________
:)
Back to top
View user's profile Send private message
bugalo
n00b
n00b


Joined: 05 Jul 2015
Posts: 38

PostPosted: Sat Mar 19, 2022 8:57 pm    Post subject: Reply with quote

Thanks for your reply.

I had seen this message, and it is strange because I have used the same gcc version: I built the kernel and tried to update zfs-kmod right after, without updating @world. Actually, if I am not wrong, the message says the gcc versions are different, but lists them and they are the same:

Code:

warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Gentoo 11.2.1_p20220115 p4) 11.2.1 20220115
  You are using:           x86_64-pc-linux-gnu-gcc (Gentoo 11.2.1_p20220115 p4) 11.2.1 20220115


Regarding the kernel configuration, I've done
Code:
make oldconfig && make prepare


Code:

#
# No change to .config
#
  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  DESCEND objtool


and it still does not work. Also, i don't know where the .config file might be having problems. I am currently using kernel 5.15.28, and have zfs-kmod-2.1.2, and it was built without problem. Trying to emerge zfs-kmod-2.1.3 against kernel 5.15.18 also gives the same error (I cannot test zfs-kmod-2.1.2 against kernel 5.16 because they are not compatible). Could there be any parameter in .conf required by zfs-kmod-2.1.3 and not by zfs-kmod-2.1.2?
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3958

PostPosted: Sat Mar 19, 2022 9:01 pm    Post subject: Reply with quote

Plz try with zfs-9999 and zfs-kmod-9999

Make an entry
Code:

sys-fs/zfs-kmod   **
sys-fs/zfs   **

in
/etc/portage/package.accept_keywords
and
Code:

emerge -1av zfs

I do and it works with 5.16.2
_________________
:)
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23193

PostPosted: Sat Mar 19, 2022 9:23 pm    Post subject: Reply with quote

alamahant wrote:
Code:
make[3]: Entering directory '/usr/src/linux-5.16.11-gentoo'
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (      \
echo >&2;                     \
echo >&2 "  ERROR: Kernel configuration is invalid.";      \
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";   \
echo >&2 ;                     \
/bin/false)
it complains your kernel was not properly built.
No, it has the ability to issue that complaint. It didn't actually issue that one, because the test -e branch returned the good result.
alamahant wrote:
Code:
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Gentoo 11.2.1_p20220115 p4) 11.2.1 20220115
  You are using:           x86_64-pc-linux-gnu-gcc (Gentoo 11.2.1_p20220115 p4) 11.2.1 20220115
Furthermore different version of gcc used for kernel and zfs-kmod
Sort of. It's the same version of gcc, but it isn't the same gcc. One is gcc. The other is x86_64-pc-linux-gnu-gcc. These may, or may not, actually be the same program. For an amd64 user, they are probably the same, but the strings are not textwise identical, so the warning issued.

As I read the pastebin, the actual error is an unused variable.
https://pastebin.com/2Qg78GM8:1138:
[01m/tmp/portage/sys-fs/zfs-kmod-2.1.3/work/zfs-2.1.3/module/zfs/arc.c: In function ‘hdr_l2only_dest’:
/tmp/portage/sys-fs/zfs-kmod-2.1.3/work/zfs-2.1.3/module/zfs/arc.c:1208:24: error: unused variable ‘hdr’ []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-variable-Werror=unused-variable]8;;]
1208 | arc_buf_hdr_t *hdr = vbuf;
Back to top
View user's profile Send private message
bugalo
n00b
n00b


Joined: 05 Jul 2015
Posts: 38

PostPosted: Sun Mar 20, 2022 1:17 am    Post subject: Reply with quote

alamahant wrote:
Plz try with zfs-9999 and zfs-kmod-9999

Make an entry
Code:

sys-fs/zfs-kmod   **
sys-fs/zfs   **

in
/etc/portage/package.accept_keywords
and
Code:

emerge -1av zfs

I do and it works with 5.16.2


With this, I am able to emerge =sys-fs/zfs-kmod-9999, thanks for the suggestion.

Hu wrote:

As I read the pastebin, the actual error is an unused variable.
https://pastebin.com/2Qg78GM8:1138:
[01m/tmp/portage/sys-fs/zfs-kmod-2.1.3/work/zfs-2.1.3/module/zfs/arc.c: In function ‘hdr_l2only_dest’:
/tmp/portage/sys-fs/zfs-kmod-2.1.3/work/zfs-2.1.3/module/zfs/arc.c:1208:24: error: unused variable ‘hdr’ []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-variable-Werror=unused-variable]8;;]
1208 | arc_buf_hdr_t *hdr = vbuf;


I had seen this, and tried using CFLAGS="-march=goldmont -fomit-frame-pointer -O2 -pipe -Wno-unused-variable", but the problem persists. If this is the problem, is it a problem with the ebuild itself or with my system? I am able to compile zfs-kmod-2.1.3 with the same kernel version in two other different computers.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23193

PostPosted: Sun Mar 20, 2022 3:23 am    Post subject: Reply with quote

Does zfs-kmod respect any of your CFLAGS? The main kernel build, done outside Portage, does not.

On the systems where zfs-mod-2.1.3 builds successfully, is the kernel .config different, such that either that warning would not be set or the variable might be used?
Back to top
View user's profile Send private message
bugalo
n00b
n00b


Joined: 05 Jul 2015
Posts: 38

PostPosted: Sun Mar 20, 2022 6:32 am    Post subject: Reply with quote

Hu wrote:
Does zfs-kmod respect any of your CFLAGS? The main kernel build, done outside Portage, does not.


If I understand these lines of the build.log correctly, no it doesn't.

Code:

 * strip-flags: CFLAGS: changed '-march=goldmont -fomit-frame-pointer -O2 -pipe' to '-march=goldmont -O2 -pipe'
 * strip-flags: CXXFLAGS: changed '-march=goldmont -fomit-frame-pointer -O2 -pipe' to '-march=goldmont -O2 -pipe'
 * strip-flags: FFLAGS: changed '-march=goldmont -fomit-frame-pointer -O2 -pipe' to '-march=goldmont -O2 -pipe'
 * strip-flags: FCFLAGS: changed '-march=goldmont -fomit-frame-pointer -O2 -pipe' to '-march=goldmont -O2 -pipe'


Hu wrote:
On the systems where zfs-mod-2.1.3 builds successfully, is the kernel .config different, such that either that warning would not be set or the variable might be used?


Yes, they are quite different. This is the .config for the system where the build fails https://github.com/bugalo/gentoo_Supermicro_A2SDi-4C-HLN4F/blob/master/usr/src/linux-5.16.12-gentoo/.config, and this is the one for the system where it builds https://github.com/bugalo/gentoo_dell_xps_15_7590/blob/master/usr/src/linux-5.16.11-gentoo/.config. Do you think I should issue a bug report to the package maintainers?
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3958

PostPosted: Sun Mar 20, 2022 10:58 am    Post subject: Reply with quote

Hu wrote:

No, it has the ability to issue that complaint. It didn't actually issue that one, because the test -e branch returned the good result.

You are so right Hu
I missed the "||"
I can only aspire to be as knowledgeable as you one day.
Thanks
_________________
:)
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23193

PostPosted: Sun Mar 20, 2022 12:55 pm    Post subject: Reply with quote

alamahant wrote:
I missed the "||"
I dislike the construct that tricked you, because a free text search for error: finds the line where make prints the part that you saw. One then needs to read the surrounding context to realize this is just a printed command that has the ability to echo that, rather than output from a command that is actively reporting an error that has happened.
Back to top
View user's profile Send private message
bugalo
n00b
n00b


Joined: 05 Jul 2015
Posts: 38

PostPosted: Tue Mar 22, 2022 9:00 am    Post subject: Reply with quote

In case anyone else has the same problem, I made a bug report:

https://bugs.gentoo.org/835646

and was pointed to this github issue:

https://github.com/openzfs/zfs/issues/13194

that has the following patch:

Code:
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -1206,7 +1206,7 @@ hdr_l2only_dest(void *vbuf, void *unused)
 {
    (void) unused;
    arc_buf_hdr_t *hdr = vbuf;
-
+   (void) hdr;
    ASSERT(HDR_EMPTY(hdr));
    arc_space_return(HDR_L2ONLY_SIZE, ARC_SPACE_L2HDRS);
 }


This fixes my issue.

Thanks a lot for your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum