Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 714100 - sys-kernel/genkernel-4.0.4 fail intramfs :Failed to create binpkg of util-linux-2.35.1!
Summary: sys-kernel/genkernel-4.0.4 fail intramfs :Failed to create binpkg of util-lin...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-23 18:49 UTC by jms
Modified: 2020-03-25 14:49 UTC (History)
1 user (show)

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


Attachments
emerge--info (emergeInfo.txt,7.88 KB, text/plain)
2020-03-23 18:51 UTC, jms
Details
genkernel.log (genkernel.log.bz2,46.59 KB, application/x-bzip)
2020-03-23 18:55 UTC, jms
Details
genkernel-4.0.4 and util-linux-2.35.1 ->genkernel.log (genkernel-4.0.4andutil-linux-2.35.1.log.gz,60.09 KB, application/gzip)
2020-03-24 02:39 UTC, jms
Details
log from: ebuild util-linux-2.35.1.ebuild clean install (sys-apps_util-linux-2.35.1:20200324-144353.log.gz,53.44 KB, application/gzip)
2020-03-24 15:36 UTC, jms
Details
environment used for ebuild util-linux-2.35.1.ebuild clean install (util-linux-2.35.1-environment,144.09 KB, text/plain)
2020-03-24 15:38 UTC, jms
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jms 2020-03-23 18:49:53 UTC
using 

no problem with
genkerel-3.5.3.3 and sys-apps/util-linux-2.33.2

Reproducible: Always

Steps to Reproduce:
1.try to build gentoo-sources in my case sys-kernel/gentoo-sources-5.5.11
with :
-sys-kernel/genkernel-4.0.4

2. make -j9 && make -j9 modules_install && make install && emerge @module-rebuild && genkernel --install  initramfs && grub-mkconfig -o /boot/grub/grub.cfg

3
Actual Results:  
* Current kernel's LOCALVERSION is set to 'jms-0.7.13'; Will ignore set --kernel-localversion value '-x86_64' because kernel was not build ...

* initramfs: >> Initializing ...
*         >> Appending devices cpio data ...
*         >> Appending base_layout cpio data ...
*         >> Appending auxilary cpio data ...
*         >> Appending busybox cpio data ...
*         >> Appending blkid cpio data ...
* ERROR: Command 'nice -n10 make -j9 V=1' failed!
* ERROR: create_initramfs(): append_data(): append_blkid(): populate_binpkg(): gkbuild(): Failed to create binpkg of util-linux-2.35.1!


Expected Results:  
create intramfs

notice that it give information about util-linux-2.35.1 even if i use :
sys-apps/util-linux-2.33.2

and error doesn't change if I use util-linux-2.35.1

I have no problem with 
genkerel-3.5.3.3 and sys-apps/util-linux-2.33.2
Comment 1 jms 2020-03-23 18:51:54 UTC
Created attachment 624752 [details]
emerge--info
Comment 2 jms 2020-03-23 18:55:41 UTC
Created attachment 624754 [details]
genkernel.log
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2020-03-24 02:14:49 UTC
(In reply to jms from comment #0)
> notice that it give information about util-linux-2.35.1 even if i use :
> sys-apps/util-linux-2.33.2

genkernel-4 doesn't use anything from your system.

Your build error is:

> In file included from misc-utils/kill.c:57:
> ./include/pidfd-utils.h: In function 'pidfd_open':
> ./include/pidfd-utils.h:19:17: error: 'SYS_pidfd_open' undeclared (first use in this function); did you mean 'pidfd_open'?
>    19 |  return syscall(SYS_pidfd_open, pid, flags);
>       |                 ^~~~~~~~~~~~~~
>       |                 pidfd_open
> ./include/pidfd-utils.h:19:17: note: each undeclared identifier is reported only once for each function it appears in
> ./include/pidfd-utils.h:20:1: warning: control reaches end of non-void function [-Wreturn-type]
>    20 | }
>       | ^
> make[2]: *** [Makefile:8777: misc-utils/kill.o] Error 1
> make[2]: *** Waiting for unfinished jobs....

Haven't seen this before.

Is this reproducible?

Can you test if you can compile sys-apps/util-linux-2.35.1 from Gentoo repository?
Comment 4 jms 2020-03-24 02:31:15 UTC
(In reply to Thomas Deutschmann from comment #3)
> (In reply to jms from comment #0)
> > notice that it give information about util-linux-2.35.1 even if i use :
> > sys-apps/util-linux-2.33.2
> 
> genkernel-4 doesn't use anything from your system.
> 
> Your build error is:
> 
> > In file included from misc-utils/kill.c:57:
> > ./include/pidfd-utils.h: In function 'pidfd_open':
> > ./include/pidfd-utils.h:19:17: error: 'SYS_pidfd_open' undeclared (first use in this function); did you mean 'pidfd_open'?
> >    19 |  return syscall(SYS_pidfd_open, pid, flags);
> >       |                 ^~~~~~~~~~~~~~
> >       |                 pidfd_open
> > ./include/pidfd-utils.h:19:17: note: each undeclared identifier is reported only once for each function it appears in
> > ./include/pidfd-utils.h:20:1: warning: control reaches end of non-void function [-Wreturn-type]
> >    20 | }
> >       | ^
> > make[2]: *** [Makefile:8777: misc-utils/kill.o] Error 1
> > make[2]: *** Waiting for unfinished jobs....
> 
> Haven't seen this before.

well this is beyond me..

> Is this reproducible?

yes 
when using sys-kernel/genkernel-4.0.4
either with 
util-linux-2.35.1
util-linux-2.33.2
it's odd when  using util-linux-2.33.2 I got the message about Failed to create binpkg of util-linux-2.35.1
and portage doesn't ask for util-linux-2.35.1 when emerging genkernel-4.0.4

> Can you test if you can compile sys-apps/util-linux-2.35.1 from Gentoo
> repository?

yes 
sys-apps/util-linux-2.35.1
compile fine
I did try sys-apps/util-linux-2.35.1 and genkernel-4.0.4 and had the same error 
* ERROR: Command 'nice -n10 make -j9 V=1' failed!
* ERROR: create_initramfs(): append_data(): append_blkid(): populate_binpkg(): gkbuild(): Failed to create binpkg of util-linux-2.35.1!


eix -v sys-apps/util-linux
* sys-apps/util-linux
     Available versions:  2.33.2^t ~2.34-r3^t ~2.35^t (~)2.35.1^t **9999*l^t
     IUSE (all versions): build caps +cramfs cryptsetup fdformat hardlink kill +logger ncurses nls pam python +readline selinux slang split-usr static-libs su +suid systemd test tty-helpers udev unicode ABI_MIPS="n32 n64 o32" ABI_RISCV="lp64 lp64d" ABI_S390="32 64" ABI_X86="32 64 x32" PYTHON_TARGETS="python3_6 python3_7 python3_8" USERLAND="GNU"
     Installed versions:  Version:   2.35.1^t
                          Date:      03:21:55 24/03/20
                          USE:       cramfs logger ncurses nls pam readline split-usr static-libs suid udev unicode -build -caps -cryptsetup -fdformat -hardlink -kill -python -selinux -slang -su -systemd -test -tty-helpers ABI_MIPS="-n32 -n64 -o32" ABI_RISCV="-lp64 -lp64d" ABI_S390="-32 -64" ABI_X86="32 64 -x32" PYTHON_TARGETS="python3_6 -python3_7 -python3_8" USERLAND="GNU"
                          DEPEND:    virtual/libcrypt:0/1= sys-libs/zlib:0/1= >=sys-libs/ncurses-5.2-r2:0/6=[unicode] virtual/libintl[abi_x86_32(-),abi_x86_64(-)] sys-libs/pam sys-libs/readline:0/8= virtual/libudev:0/1= virtual/os-headers
                          RDEPEND:   virtual/libcrypt:0/1= sys-libs/zlib:0/1= >=sys-libs/ncurses-5.2-r2:0/6=[unicode] virtual/libintl[abi_x86_32(-),abi_x86_64(-)] sys-libs/pam sys-libs/readline:0/8= virtual/libudev:0/1= !>=app-admin/sysklogd-2.0[logger] !net-wireless/rfkill !sys-process/schedutils !sys-apps/setarch !<sys-apps/sysvinit-2.88-r7 !<sys-libs/e2fsprogs-libs-1.41.8 !<sys-fs/e2fsprogs-1.41.8 !<app-shells/bash-completion-2.7-r1
                          BDEPEND:   virtual/pkgconfig sys-devel/gettext >=app-portage/elt-patches-20170815 virtual/pkgconfig
                          SRC_URI:   
                          EAPI:      7
     Best versions/slot:  (~)2.35.1^t
     Package sets:        system
     Homepage:            https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/karelzak/util-linux
     Find open bugs:      https://bugs.gentoo.org/buglist.cgi?quicksearch=sys-apps%2Futil-linux
     Description:         Various useful Linux utilities
     License:             GPL-2 GPL-3 LGPL-2.1 BSD-4 MIT public-domain
Comment 5 jms 2020-03-24 02:39:32 UTC
Created attachment 624808 [details]
genkernel-4.0.4 and util-linux-2.35.1 ->genkernel.log
Comment 6 Thomas Deutschmann (RETIRED) gentoo-dev 2020-03-24 13:20:49 UTC
Comment on attachment 624808 [details]
genkernel-4.0.4 and util-linux-2.35.1 ->genkernel.log

This is the same log like before.


> well this is beyond me..

Let me try to explain:

In <=genkernel-3, genkernel copied stuff from host system (=where genkernel was executed) into generated initramfs.

In >=genkernel-4, genkernel won't copy anything (exception is ZFS) from host system anymore. Instead, genkernel will compile stuff it will embed into initramfs on its own.

Genkernel-4 also isn't using any Gentoo packages (ebuilds). Instead, genkernel has it's own "gkbuilds" (similar to ebuilds but bundled with genkernel and optimized for genkernel usage).

On your system, building util-linux-2.35.1 in genkernel's build environment is failing with the error above.

I haven't seen this error before in genkernel and for util-linux itself.

I now want to know if you are able to build util-linux-2.35.1 from Gentoo repository using portage. This will hopefully help us to understand if this looks more like an util-linux problem or is specific to genkernel's build environment. Please do:

# cd $(portageq get_repo_path / gentoo)/sys-apps/util-linux
# ebuild util-linux-2.35.1.ebuild clean install
Comment 7 jms 2020-03-24 15:32:21 UTC
(In reply to Thomas Deutschmann from comment #6)
> Comment on attachment 624808 [details]
> genkernel-4.0.4 and util-linux-2.35.1 ->genkernel.log
> 
> This is the same log like before.
> 
> 
> > well this is beyond me..
> 
> Let me try to explain:
> 
> In <=genkernel-3, genkernel copied stuff from host system (=where genkernel
> was executed) into generated initramfs.
> 
> In >=genkernel-4, genkernel won't copy anything (exception is ZFS) from host
> system anymore. Instead, genkernel will compile stuff it will embed into
> initramfs on its own.
> 
> Genkernel-4 also isn't using any Gentoo packages (ebuilds). Instead,
> genkernel has it's own "gkbuilds" (similar to ebuilds but bundled with
> genkernel and optimized for genkernel usage).
> 
> On your system, building util-linux-2.35.1 in genkernel's build environment
> is failing with the error above.
> 
> I haven't seen this error before in genkernel and for util-linux itself.
> 
> I now want to know if you are able to build util-linux-2.35.1 from Gentoo
> repository using portage. This will hopefully help us to understand if this
> looks more like an util-linux problem or is specific to genkernel's build
> environment. Please do:
> 
> # cd $(portageq get_repo_path / gentoo)/sys-apps/util-linux
> # ebuild util-linux-2.35.1.ebuild clean install

ok
first of all:
 emerge -v =sys-apps/util-linux-2.35.1
works

> # cd $(portageq get_repo_path / gentoo)/sys-apps/util-linux
> # ebuild util-linux-2.35.1.ebuild clean install
fail

second (trying to check my understanding and thanks for your help)
> Genkernel-4 also isn't using any Gentoo packages (ebuilds). 
ok so it doesn't use package I have emerged like doing
 emerge -pv =sys-apps/util-linux-2.35.1
or emerge -pv =sys-apps/util-linux-2.33.2
that's why the genkernel log are the same and I have the message
"* ERROR: create_initramfs(): append_data(): append_blkid(): populate_binpkg(): gkbuild(): Failed to create binpkg of util-linux-2.35.1!"
whatever util-linux I have installed on my system.
Right?
Comment 8 jms 2020-03-24 15:36:48 UTC
Created attachment 625006 [details]
log from: ebuild util-linux-2.35.1.ebuild clean install

cd $(portageq get_repo_path / gentoo)/sys-apps/util-linux
ebuild util-linux-2.35.1.ebuild clean install
attached resulting log
Comment 9 jms 2020-03-24 15:38:16 UTC
Created attachment 625008 [details]
environment used for ebuild util-linux-2.35.1.ebuild clean install
Comment 10 jms 2020-03-24 15:46:52 UTC
hum..
Sorry about that
forget what I just send.
compiling as a normal user won't help.

so
sys-apps/util-linux-2.35.1
compile FINE on my system
using
cd $(portageq get_repo_path / gentoo)/sys-apps/util-linux
ebuild util-linux-2.35.1.ebuild clean install

or 
emerge -v =sys-apps/util-linux-2.35.1

Anything else I can do to help?
Comment 11 Thomas Deutschmann (RETIRED) gentoo-dev 2020-03-24 15:50:21 UTC
> ok so it doesn't use package I have emerged like doing
>  emerge -pv =sys-apps/util-linux-2.35.1
> or emerge -pv =sys-apps/util-linux-2.33.2

Exactly.

genkernel will compile on its own and store that result in /var/cache/genkernel/<genkernel version>/ by default so you don't have to re-compile everything each time you run genkernel. We also call that "binpkg".

At the moment I have no idea what could cause your build failure.
Comment 12 Thomas Deutschmann (RETIRED) gentoo-dev 2020-03-24 15:57:26 UTC
You could try testing the following two patches:

# mkdir /usr/share/genkernel/patches/util-linux/2.35.1
# wget -O /usr/share/genkernel/patches/util-linux/2.35.1/1.patch https://github.com/karelzak/util-linux/commit/3cfde0370d3a8949df0c5bcf447cec6692910ed2.patch
# wget -O /usr/share/genkernel/patches/util-linux/2.35.1/2.patch https://github.com/karelzak/util-linux/commit/0a4035ff2e4fd5b5ae0cf8f8665696c2aff53b75.patch

Now re-run genkernel.
Comment 13 jms 2020-03-24 22:27:10 UTC
(In reply to Thomas Deutschmann from comment #12)
> You could try testing the following two patches:
> 
> # mkdir /usr/share/genkernel/patches/util-linux/2.35.1
> # wget -O /usr/share/genkernel/patches/util-linux/2.35.1/1.patch
> https://github.com/karelzak/util-linux/commit/
> 3cfde0370d3a8949df0c5bcf447cec6692910ed2.patch
> # wget -O /usr/share/genkernel/patches/util-linux/2.35.1/2.patch
> https://github.com/karelzak/util-linux/commit/
> 0a4035ff2e4fd5b5ae0cf8f8665696c2aff53b75.patch
> 
> Now re-run genkernel.

for sys-kernel/genkernel-4.0.4 
after doing
mkdir -p /usr/share/genkernel/patches/util-linux/2.35.1

wget -O /usr/share/genkernel/patches/util-linux/2.35.1/1.patch https://github.com/karelzak/util-linux/commit/3cfde0370d3a8949df0c5bcf447cec6692910ed2.patch

wget -O /usr/share/genkernel/patches/util-linux/2.35.1/2.patch https://github.com/karelzak/util-linux/commit/0a4035ff2e4fd5b5ae0cf8f8665696c2aff53b75.patch

and runing genkernel

it works for me!
got a iniramfs with genkernel in it now :
 ls -al /boot/initramfs*
-rw-r--r-- 1 root root 1611688  1 févr. 22:52 /boot/initramfs-5.4.14-gentoojms-0.7.13.img
-rw-r--r-- 1 root root 1612844  4 févr. 13:30 /boot/initramfs-5.5.1-gentoojms-0.7.13.img
-rw-r--r-- 1 root root 1612160 26 févr. 09:27 /boot/initramfs-5.5.6-gentoojms-0.7.13.img
-rw-r--r-- 1 root root 1752500 24 mars  23:19 /boot/initramfs-genkernel-x86_64-5.5.11-gentoojms-0.7.13
Comment 14 jms 2020-03-25 12:41:42 UTC
i rechecked today as i had a doubt about what I did:
confirming again :
genkernel-4.0.4 works as expected with the patch

I just made a new intramfs with it
-rw-r--r--  1 root root  1613004 25 mars  13:16 initramfs-5.5.11-gentoojms-0.7.13.img

now I wonder what I did to have the previous one:
-rw-r--r--  1 root root  1752500 24 mars  23:19 initramfs-genkernel-x86_64-5.5.11-gentoojms-0.7.13
Comment 15 Thomas Deutschmann (RETIRED) gentoo-dev 2020-03-25 13:37:31 UTC
OK, thanks for testing. I'll release 4.0.5 with these patches shortly. But I still don't understand why you need them and others don't.
Comment 16 Larry the Git Cow gentoo-dev 2020-03-25 13:55:27 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=720380608a463dfa20ccc36dfb0407456a7d8a48

commit 720380608a463dfa20ccc36dfb0407456a7d8a48
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-03-25 13:45:38 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-03-25 13:45:38 +0000

    util-linux: fix compile error caused by undefined SYS_pidfd_send_signal
    
    Bug: https://bugs.gentoo.org/714100
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 ...linux-2.35.1-001-include_sys_types-header.patch | 58 ++++++++++++++++++++++
 ...il-linux-2.35.1-002-cleanup-pidfd-include.patch | 36 ++++++++++++++
 2 files changed, 94 insertions(+)
Comment 17 Larry the Git Cow gentoo-dev 2020-03-25 14:14:13 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=935c99eeed01166ca391aed5711ad63b566661e5

commit 935c99eeed01166ca391aed5711ad63b566661e5
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-03-25 14:09:40 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-03-25 14:10:40 +0000

    sys-apps/util-linux: fix compile error caused by undefined SYS_pidfd_send_signal
    
    Closes: https://bugs.gentoo.org/714100
    Package-Manager: Portage-2.3.94, Repoman-2.3.21
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 .../util-linux-2.35.1-cleanup-pidfd-include.patch  | 36 ++++++++++++++
 ...til-linux-2.35.1-include_sys_types-header.patch | 58 ++++++++++++++++++++++
 sys-apps/util-linux/util-linux-2.35.1.ebuild       |  5 ++
 3 files changed, 99 insertions(+)

Additionally, it has been referenced in the following commit(s):

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

commit f11becf1878b20de4fa39699ee74df999245e019
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-03-25 14:05:09 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-03-25 14:10:39 +0000

    sys-kernel/genkernel: bump to v4.0.5
    
    Bug: https://bugs.gentoo.org/714100
    Package-Manager: Portage-2.3.94, Repoman-2.3.21
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 sys-kernel/genkernel/Manifest                                           | 2 +-
 sys-kernel/genkernel/{genkernel-4.0.4.ebuild => genkernel-4.0.5.ebuild} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
Comment 18 jms 2020-03-25 14:49:28 UTC
(In reply to Thomas Deutschmann from comment #15)
> OK, thanks for testing. I'll release 4.0.5 with these patches shortly. But I
> still don't understand why you need them and others don't.

sorry to no be able to help on this that much.

If this is related to i/o on disk this could be related to this bug I had 
https://bugzilla.kernel.org/show_bug.cgi?id=202665
about my NVMe device .
This bug has been sorted in kernel since kernel 5.5.? but maybe there could be a link.

Otherwise no clue.

At first I thought this could have been due to me changing from  
march=znver1 to march=znver2
but reverting to march=znver1 lead to same result
also changing from gcc-9.2.0-r4 to gcc-9.3.0

Anyway thanks for your help.

Respect